Subject: retrieving file data from an external server - where to start?
From: Lee Reilly CS1997 <[email-masked]>
Date: Tue, 20 Feb 2001 16:20:03 +0000
Newsgroups: comp.lang.python

hi there,

i'm using python with zope and am trying to do the following with python
method:

retrieveFileInfo(matric){

  username = getUsername(matric)
  filename = username + ".gif"
  server = "http://blahblahblah/yaddieyaddie/"

  # some code to determine whether or not the file exists
  # where do i start
  # e.g if (retrieve.(server+filename) != none):
  #        do something
}

e.g. given the matric value '9728430' i find that the corresponding user
has username == 'lreilly'. if this person has their image stored on the
external server then it will be called 'lreilly.gif'.

i don't need to actually retrieve the file from python - only determine
whether or not it exists or not. i.e. whether the http request reports a
404 or maybe even if the image size == 0 bytes.

could someone possible be kind enough to give me an idea where to start?
a url? a snippet of code?

thanks very much in advance,

lee