Re: [Tutor] (no subject)

2005-03-05 Thread Jacob S.
I want to third the whitespace and comments. Also, looking at your code I notice that each of your while 1: play = raw_input("What is your choice? ") #Aks use to enter a choice from the menu if play == '3': #If user picks 3 print "\nHave a nice day!\n" #Tell them to have a nice day sys.exit() #Then

Re: [Tutor] Linked List

2005-03-05 Thread Shitiz Bansal
I could not understand what you exactly mean. In order to explain wat my problem is, here is an example code. Its not exactly what I am doing, I am using multiple threads and a rather complicated code so try and understand the sense rather than the code itself. >>> myls=range(50) >>> for i in my

Re: [Tutor] returning table elements with Beautiful Soup

2005-03-05 Thread Alan Gauld
> > I'm trying to use Beautiful Soup to scrape some data out of an HTML > > table. I can do this using A new one on me, but Beautiful Soup looks very interesting. I've just downloaded it. Thanks for pointing it out. Alan G. ___ Tutor maillist - Tuto

Re: [Tutor] (no subject)

2005-03-05 Thread Kent Johnson
Jacob S. wrote: while 1: play = raw_input("What is your choice? ") if play in options.keys():## This makes sure that the user input is one of our options 'if play in options' is preferable. options.keys() returns a list of keys that will be searched sequentially. options is a dict w

[Tutor] cataloging web Page Information

2005-03-05 Thread Lloyd Kvam
A minor addition to Kent's advice: urllib2 can be used to post form data to a web site. This is very convenient if the expected data format is stable. You will still need the urlencode from urllib to encode the data to be posted. -- Lloyd Kvam Venix Corp __

Re: [Tutor] Linked List

2005-03-05 Thread Kent Johnson
Shitiz Bansal wrote: I could not understand what you exactly mean. In order to explain wat my problem is, here is an example code. Its not exactly what I am doing, I am using multiple threads and a rather complicated code so try and understand the sense rather than the code itself. myls=range(50)

[Tutor] Anyone know of a window utility to reverse engineer unknown binary graphic file format?

2005-03-05 Thread R. Alan Monroe
I know it's a long shot but... I have some graphics files from an old DOS game that I want to convert to a normal .png or whatever. Anyone know of a program that can load binary data and view it multiple different ways? Like treating the raw data as 1 bit, 4 bit, 8 bit, planar, linear, adjust the

Re: [Tutor] Anyone know of a window utility to reverse engineer unknown binary graphic file format?

2005-03-05 Thread Danny Yoo
On Sat, 5 Mar 2005, R. Alan Monroe wrote: > I have some graphics files from an old DOS game that I want to convert > to a normal .png or whatever. Anyone know of a program that can load > binary data and view it multiple different ways? Like treating the raw > data as 1 bit, 4 bit, 8 bit, planar

Re: [Tutor] Linked List

2005-03-05 Thread Shitiz Bansal
Got ya, it doesnt however help in my case as inside the for loop also i intend to change the list elements. --- Kent Johnson <[EMAIL PROTECTED]> wrote: > Shitiz Bansal wrote: > > I could not understand what you exactly mean. > > > > In order to explain wat my problem is, here is an > > example c

Re: [Tutor] Anyone know of a window utility to reverse engineer unknown binary graphic file format?

2005-03-05 Thread Liam Clarke
Slightly OT, but I'd recommend Irfanview, a wonderful piece of freeware. If it can't open it, it's probably not in a standard graphics file format. On Sat, 5 Mar 2005 14:31:50 -0800 (PST), Danny Yoo <[EMAIL PROTECTED]> wrote: > > > On Sat, 5 Mar 2005, R. Alan Monroe wrote: > > > I have some gr

Re: [Tutor] Linked List

2005-03-05 Thread =?ISO-8859-1?Q?St=E9phane_Brunet?=
Kent Johnson wrote: What Jacob is saying is, one common way to deal with this is to make a copy of the list and iterate over that while changing the original list. Your sample would look like this: Hi, And what if the list is *really* big ? Don't you loose much speed/memory while making a copy ?

Re: [Tutor] (no subject)

2005-03-05 Thread Alan Gauld
> ## Now the fun part ## > ## We define a dictionary options that stores the strings that the user > would input as keys. The values > ## are the functions that we just defined > > options = {"3":altexit,# Notice no parenthesis--we don't want to > call the functions when putting them in the

Re: [Tutor] Linked List

2005-03-05 Thread Alan Gauld
> >>> myls=range(50) > >>> for i in myls: > print i > if i==20: > myls.insert(5,5) > > The point is, the list(both size and elements) is > changing even as it is being operated upon. You are quite right it is, in general a bad idea to alter the thing you are iterating over. > This particular ca

Re: [Tutor] Anyone know of a window utility to reverse engineer unknownbinary graphic file format?

2005-03-05 Thread Alan Gauld
> I have some graphics files from an old DOS game that I want to convert to > a normal .png or whatever. Anyone know of a program that can load > binary data and view it multiple different ways? Like treating the raw > data as 1 bit, 4 bit, 8 bit, planar, linear, adjust the pitch and > offset, etc.

Re: [Tutor] Linked List

2005-03-05 Thread Kent Johnson
Stéphane Brunet wrote: Kent Johnson wrote: What Jacob is saying is, one common way to deal with this is to make a copy of the list and iterate over that while changing the original list. Your sample would look like this: Hi, And what if the list is *really* big ? Don't you loose much speed/memor

Re: [Tutor] (no subject)

2005-03-05 Thread Adam Cripps
On Sun, 6 Mar 2005 07:38:54 +, Adam Cripps <[EMAIL PROTECTED]> wrote: > On Fri, 04 Mar 2005 12:14:28 -0500, Brian van den Broek > <[EMAIL PROTECTED]> wrote: > Kevin said unto the world upon 2005-03-04 10:43: > > Hello all. I have just completed my very first python program just a > > simple num

Re: [Tutor] (no subject)

2005-03-05 Thread Liam Clarke
How about everyone uses www.rafb.net/paste for long bits of code? I know I do, as it colours functions, classes differently, etc, and it respects tabs. On Sun, 6 Mar 2005 07:41:30 +, Adam Cripps <[EMAIL PROTECTED]> wrote: > On Sun, 6 Mar 2005 07:38:54 +, Adam Cripps <[EMAIL PROTECTED]>