[Tutor] httpFetch Usage

2006-05-19 Thread kieran flanagan
Hi, Does anyone know where I can get some info on the funtion httpFetch. Its being imported and used in a file I am adding code to and I would like to understand what it does. An example of its usage: response = httpFetch.httpFetch(url, sessionID, someValue) Thanks Kieran -- "Behind every great

Re: [Tutor] httpFetch Usage

2006-05-19 Thread Kent Johnson
kieran flanagan wrote: > Hi, > > Does anyone know where I can get some info on the funtion httpFetch. Its > being imported and used in a file I am adding code to and I would like > to understand what it does. An example of its usage: > > response = httpFetch.httpFetch(url, sessionID, someValue)

[Tutor] Lists of lists - different sized lists

2006-05-19 Thread Adam Cripps
I'm trying to sort [1] a list of people randomly into groups. My guess is that a list of lists will do the trick here. However, the randrange fails with an empty range. How can I check for this? I thought that my pupils list wouldn't reach zero with the while len(pupils)>0: would keep it above 0.

Re: [Tutor] New programmer, need some help getting started on my first project

2006-05-19 Thread Alan Gauld
Chris, > I do like the way you simplified using the random function, > I need to start thinking like that. It is quite clever but quite a subtle twist for a beginner to think of. However even in your version there is a pattern you should look out for: >> coin = random.randrange(2) >>

Re: [Tutor] Lists of lists - different sized lists

2006-05-19 Thread Kent Johnson
Adam Cripps wrote: > I'm trying to sort [1] a list of people randomly into groups. My guess > is that a list of lists will do the trick here. However, the randrange > fails with an empty range. How can I check for this? I thought that my > pupils list wouldn't reach zero with the while len(pupils)>

Re: [Tutor] New programmer, need some help getting started on my first project

2006-05-19 Thread Terry Carroll
On Thu, 18 May 2006, Chris Delgado wrote: > Kent, > > So if you have just been reading, I suggest you try writing a few small > programs as warmups." > > I think you are right on the money here. I need to write some more > simple stuff. Chris, I'd also suggest that, once you have a few toy p

Re: [Tutor] New programmer, need some help getting started on my first project

2006-05-19 Thread Bob Gailer
Terry Carroll wrote: > On Thu, 18 May 2006, Chris Delgado wrote: > > >> Kent, >> >> So if you have just been reading, I suggest you try writing a few small >> programs as warmups." >> >> I think you are right on the money here. I need to write some more >> simple stuff. >> > > Chris, I'd

[Tutor] Fwd: How do you create built-in objects (dicts, lists, etc) without specifying {}, [], etc...

2006-05-19 Thread Bill Carson
Note: forwarded message attached.__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --- Begin Message --- Howdy, Do you know how to create instances of dictionaries, lists, integers, longs, etc witho

Re: [Tutor] Fwd: How do you create built-in objects (dicts, lists, etc) without specifying {}, [], etc...

2006-05-19 Thread Kent Johnson
Bill Carson wrote: > Do you know how to create instances of dictionaries, lists, integers, > longs, etc without having to specify it in code... > > Instead of specifying: > a={"bla":1} > or ... > a=[1,2,3] > > Is there another way?? I'm not really sure what you are looking

[Tutor] Getting current class method name

2006-05-19 Thread Nelson, Scott
Ok, I’m looking to create a quick debug function that prints out the current function that is running (to help in debugging what functions are being run).  I know that I can use a debugger to get a stack trace (and I do), but I’m still curious about this problem.  Here’s what I’ve got so fa

[Tutor] Please help!!

2006-05-19 Thread MATATA EMMANUEL
Hi there, I'm tasked to write a Paython script which is supposed to hit a web site and download a shapefile from that web site. I don't have any clue and would like your help. I use 9.x if this matter. Thank you. Matt.   ___ Tutor maillist - Tutor@py

[Tutor] Tkinter pass-by-reference query

2006-05-19 Thread Henry Finucane
While attempting to add images to a canvas programmatically, I wrote the following: for i in os.listdir('./icons/terrain'): self.terrainScreen["height"] = str(int(self.terrainScreen["height"])+50) debug(self.terrainScreen["height"]+" height of terrainScreen",5) img = PhotoIm

Re: [Tutor] Please help!!

2006-05-19 Thread Henry Finucane
On 5/19/06, MATATA EMMANUEL <[EMAIL PROTECTED]> wrote: > > > > Hi there, Hi! > > I'm tasked to write a Paython script which is supposed to hit a web site and > download a shapefile from that web site. Cool. Look at urllib in your python documentation. > I don't have any clue and Me neither :) >

Re: [Tutor] Please help!!

2006-05-19 Thread Bernd Prager
Hey Matata, >From the website http://www.boddie.org.uk/python/HTML.html: import urllib # Get a file-like object for the Python Web site's home page. f = urllib.urlopen("http://www.python.org";) # Read from the object, storing the page's contents in 's'. s = f.read() f.close() Hope this helps,

Re: [Tutor] New programmer, need some help getting started on my first project

2006-05-19 Thread Chris Delgado
   Terry, Thank you for the suggestions. I am going to stick with these little toy programs as you aptly put them to make sure I have a good grasp on the basics. I completely agree with you that I need to do something that I want to solve a problem with and in fact, thats whats motivated me to find

Re: [Tutor] Tkinter pass-by-reference query

2006-05-19 Thread Kent Johnson
Henry Finucane wrote: > While attempting to add images to a canvas programmatically, I wrote > the following: > for i in os.listdir('./icons/terrain'): > self.terrainScreen["height"] = str(int(self.terrainScreen["height"])+50) > debug(self.terrainScreen["height"]+" height of terrainScre