[Tutor] wxPython / Tkinter Grid

2005-03-30 Thread Liam Clarke
Hi, I know a wxPython grid is totally different to a Tkinter grid, but is there a Tkinter equivalent of a wxPython grid? I'm finding wxPython to be fiddly and restrictive... Regards, Liam Clarke -- 'There is only one basic human right, and that is to do as you damn well please. And with it c

[Tutor] how to setup gnu.py

2005-03-30 Thread jrlen balane
hi! i don't know if this is the proper forum but i'll ask anyway... how am i going to setup gnu.py(or gnuplot.py) gnuplot with python??? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] What is the best book to start?

2005-03-30 Thread gerardo arnaez
I really think alan gauld books, learning how to program is one of the best esp if you are new. On Wed, 30 Mar 2005 20:08:58 -0800 (PST), Hoffmann <[EMAIL PROTECTED]> wrote: > Hi All, > > I am starting to studying Python. I have some previous > experience with C (beginner level). Could, anyone

Re: [Tutor] What is the best book to start?

2005-03-30 Thread Kenneth Gomez
I have the Deitel book. Good book. I think you have two good books. Start with one and digest it. -KBG- On Wed, 30 Mar 2005 23:36:13 -0500, Bernard Lebel <[EMAIL PROTECTED]> wrote: > Hoffmann wrote: > > Hi All, > > > > I am starting to studying Python. I have some previous > > experience with C

Re: [Tutor] What is the best book to start?

2005-03-30 Thread Bernard Lebel
Hoffmann wrote: Hi All, I am starting to studying Python. I have some previous experience with C (beginner level). Could, anyone, please, suggest a good Python book? I have both "Learning Python" by Lutz & Ascher, and "Python How to Program" by Deitel and others. Are those good books? Thanks. Hoffm

Re: [Tutor] What is the best book to start?

2005-03-30 Thread Lee Cullens
I can only comment on what I know and I have the O'Reilly Python series which begins with the "Learning Python" book you have (if you have the 2nd ed.). Just getting started with Python myself. The first book has gone quite fast, but then I'm a retired software engineer. Even so, I think it

Re: [Tutor] What is the best book to start?

2005-03-30 Thread Hoffmann
Hi All, I am starting to studying Python. I have some previous experience with C (beginner level). Could, anyone, please, suggest a good Python book? I have both "Learning Python" by Lutz & Ascher, and "Python How to Program" by Deitel and others. Are those good books? Thanks. Hoffmann

[Tutor] Re: [Pythoncard-users] childWindow.Raise() works on Windows, not on Mac

2005-03-30 Thread Liam Clarke
Hi Brad, AFAIK, and Kevin Altis will no doubt correct me if I'm wrong... Class Parent(model.Background): def on_button1_mouseClick(self, event): x = model.ChildWindow(self, child.Child) x.id_emp = 20 Class Child(model.Background) def on_initialize(self, event):

Re: [Tutor] A simple question about creating a program

2005-03-30 Thread Danny Yoo
On Wed, 30 Mar 2005, Kevin wrote: > I was wondering, can you make a program the uses alot of classes do the > exact same thing with out useing classes? Hi Kevin, Yes. We can even do a lot of object oriented programming without classes, although it might be slightly painful. You asked an ea

Re: [Tutor] Sorting more than one list

2005-03-30 Thread Kent Johnson
Diego Galho Prestes wrote: Hi! I need to sort 4 lists but I need that they make the "sort together". I'll sort just one but when I change the position of the items of the 1st list I have to change the positions of the other 3 lists. Can I do this just using the sort() method of the list object? You

Re: [Tutor] Launching a file browser

2005-03-30 Thread Kent Johnson
Mike Hall wrote: I looked over the global module index and the closest thing I could find relating to my os (osx) was EasyDialogs, which has a few functions pertaining to this, "AskFileForOpen()" being one. Calling any function within EasyDialogs however yields an Apple Event error: AE.AEIntera

Re: [Tutor] Sorting more than one list

2005-03-30 Thread Max Noel
On Mar 31, 2005, at 04:19, Diego Galho Prestes wrote: Hi! I need to sort 4 lists but I need that they make the "sort together". I'll sort just one but when I change the position of the items of the 1st list I have to change the positions of the other 3 lists. Can I do this just using the sort() met

Re: [Tutor] Sorting more than one list

2005-03-30 Thread Brian van den Broek
Brian van den Broek said unto the world upon 2005-03-30 18:28: Diego Galho Prestes said unto the world upon 2005-03-30 21:19: Hi! I need to sort 4 lists but I need that they make the "sort together". I'll sort just one but when I change the position of the items of the 1st list I have to change the

Re: [Tutor] I am puzzled - help needed

2005-03-30 Thread John Carmona
John, Thanks firstly to point about emailing back using the "Reply to all" option. Thanks also about the explanation about the difference about the difference between 32 and "32", being a number and a string respectively, your explanation was very clear (you can see now my level in programming, b

Re: [Tutor] Class and methods?

2005-03-30 Thread Max Noel
On Mar 31, 2005, at 00:44, Kevin wrote: I am sorta starting to get it. So you could use __init__ to ask for a file name to see if there is one in a folder or not if there is then open that file and conitue where that file left off. If its not there create a new file with that name, then start the p

Re: [Tutor] Sorting more than one list

2005-03-30 Thread Brian van den Broek
Diego Galho Prestes said unto the world upon 2005-03-30 21:19: Hi! I need to sort 4 lists but I need that they make the "sort together". I'll sort just one but when I change the position of the items of the 1st list I have to change the positions of the other 3 lists. Can I do this just using the s

Re: [Tutor] I am puzzled - help needed

2005-03-30 Thread jfouhy
Quoting John Carmona <[EMAIL PROTECTED]>: > Hi John, thanks for the reply. Hey John, Please reply to the list, rather than to people directly. Clicking "reply to all" is probably what you want. > Ok No. 1, I have read about "ctime" which convert a time expressed in > seconds since the epoch

[Tutor] Sorting more than one list

2005-03-30 Thread Diego Galho Prestes
Hi! I need to sort 4 lists but I need that they make the "sort together". I'll sort just one but when I change the position of the items of the 1st list I have to change the positions of the other 3 lists. Can I do this just using the sort() method of the list object? If I can't, someone know a si

Re: [Tutor] A simple question about creating a program

2005-03-30 Thread Max Noel
On Mar 30, 2005, at 23:00, Kevin wrote: I was wondering, can you make a program the uses alot of classes do the exact same thing with out useing classes? Yes. At some point, a program always has to be translated to machine code to be executed by the processor. Machine language is not object-orie

Re: [Tutor] Class and methods?

2005-03-30 Thread Kevin
I am sorta starting to get it. So you could use __init__ to ask for a file name to see if there is one in a folder or not if there is then open that file and conitue where that file left off. If its not there create a new file with that name, then start the program? Or do I have that all wrong? Th

[Tutor] a FIFO with fixed capacity?

2005-03-30 Thread Marcus Goldfish
I need to implement a FIFO with a fixed maximum capacity. Is there a name for such a beast? Also, I read two excellent cookbook recipes on FIFOs: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/68436 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/210459 Would limiting the max c

Re: [Tutor] A simple question about creating a program

2005-03-30 Thread Liam Clarke
Yes you can, but if an app uses a lot of classes, chances are that it's the simplest way to do it. OOP is really just a convenient way to work with code. On Wed, 30 Mar 2005 16:00:03 -0500, Kevin <[EMAIL PROTECTED]> wrote: > I was wondering, can you make a program the uses alot of classes do > th

RE: [Tutor] A simple question about creating a program

2005-03-30 Thread Ryan Davis
Sure. Thanks, Ryan -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kevin Sent: Wednesday, March 30, 2005 4:00 PM To: tutor@python.org Subject: [Tutor] A simple question about creating a program I was wondering, can you make a program the uses alot of cla

Re: [Tutor] I am puzzled - help needed

2005-03-30 Thread Sean Perry
John Carmona wrote: I am not sure that it is possible to ask that question please feel free to turn me down if it is going against the forum rules. I have going through Josh Cogliati tutorial, I am stuck on one of the exercise. I need to rewrite the high_low.py program (see below) to use the la

[Tutor] A simple question about creating a program

2005-03-30 Thread Kevin
I was wondering, can you make a program the uses alot of classes do the exact same thing with out useing classes? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] I am puzzled - help needed

2005-03-30 Thread John Fouhy
John Carmona wrote: I have going through Josh Cogliati tutorial, I am stuck on one of the exercise. I need to rewrite the high_low.py program (see below) to use the last two digits of time at that moment to be the "random number". This is using the import time module. If you look at the docs for

Re: [Tutor] Class and methods?

2005-03-30 Thread Alan Gauld
> In a class is every def called a method Strictly speaking only those that have a 'self' parameter(or equivalent) The others are "unbound functions" and pretty useless, usually being the result of programmer errors!... > and the def __init__(self) is called the constructor method? Usually. >

Re: [Tutor] how to read from a txt file

2005-03-30 Thread Alan Gauld
> please help me! I'll try but I m9issed the early bit of this thread so jumping in cold... > > > so that i can read the text file created by this: > > > > > > self.filename = "%s\%s.txt" If the OS is Windows you might want to use two \\ just to be safe or alternatively use a forward slash inste

[Tutor] I am puzzled - help needed

2005-03-30 Thread John Carmona
I am not sure that it is possible to ask that question please feel free to turn me down if it is going against the forum rules. I have going through Josh Cogliati tutorial, I am stuck on one of the exercise. I need to rewrite the high_low.py program (see below) to use the last two digits of tim

Re: [Tutor] Calendar module

2005-03-30 Thread Kent Johnson
John Carmona wrote: Hi guys, I have typed this programme from the Josh Cogliati manual - import calendar year = input("Type in the year number: ") calendar.prcal(year) I get this error message Traceback (most recent call last): File "C:/P

Re: [Tutor] Float precision untrustworthy~~~

2005-03-30 Thread Kent Johnson
Jacob S. wrote: I've already deleted the recent thread-- But sometimes I agree with he who said that you can't trust floats at all. The scientific theory suggests that if an output is not what it should be, then the hypothesis is untrue. In this case, the hypothesis is the fact that float division

Re: [Tutor] Float precision untrustworthy~~~

2005-03-30 Thread Jeff Shannon
On Mon, 28 Mar 2005 22:13:10 -0500, Jacob S. <[EMAIL PROTECTED]> wrote: > I've already deleted the recent thread-- > > But sometimes I agree with he who said that you can't trust floats at all. > > The scientific theory suggests that if an output is not what it should be, > then the hypothesis is

[Tutor] issues with .remove method

2005-03-30 Thread Orri Ganel
Hello all, True to Pierre's suggestion, I have reimplemented LinkedList without embedding a list in it. I also took out the dictionary, on the basis that dictionaries can behave as badly as O(n), and often behave O(log(n)), depending on the hash function they're based on, and the point of a Linke

[Tutor] Calendar module

2005-03-30 Thread John Carmona
Hi guys, I have typed this programme from the Josh Cogliati manual - import calendar year = input("Type in the year number: ") calendar.prcal(year) I get this error message Traceback (most recent call last): File "C:/Python24/Example/cal.

Re: [Tutor] Launching a file browser

2005-03-30 Thread Jeff Shannon
On Mon, 28 Mar 2005 18:53:39 -0800, Mike Hall <[EMAIL PROTECTED]> wrote: > I my case the gui will be comprised of html and javascript, talking to > python through system calls. I basically want to know if there's an > equivalent of the "webbrowser()" module (which launches my browser) for > file d

Re: [Tutor] Class and methods?

2005-03-30 Thread Sean Perry
Kevin wrote: In a class is every def called a method and the def __init__(self) is called the constructor method? This class stuff is a little confusing. I don't have a problem writting a def I am still not clear on how to use a constructor. Is there a site that explains the constructor in great de

[Tutor] Class and methods?

2005-03-30 Thread Kevin
In a class is every def called a method and the def __init__(self) is called the constructor method? This class stuff is a little confusing. I don't have a problem writting a def I am still not clear on how to use a constructor. Is there a site that explains the constructor in great detail? Thanks

Re: [Tutor] RE: Using IDLE on Mac OS X?

2005-03-30 Thread Brian van den Broek
Lee Cullens said unto the world upon 2005-03-29 23:52: This is not a great way to start on this list, but I am having trouble with an annoyance that I have not been able to solve and have not found an answer to elsewhere. (Dual 2.5 Mac G5; 10.3.8; Python 2.3; retired software engineer getting s

Fwd: [Tutor] how to read from a txt file

2005-03-30 Thread Liam Clarke
Sweet as. You should forward stuff to the list though, click reply all. : ) Liam -- Forwarded message -- From: jrlen balane <[EMAIL PROTECTED]> Date: Wed, 30 Mar 2005 18:26:44 +0800 Subject: Re: [Tutor] how to read from a txt file To: Liam Clarke <[EMAIL PROTECTED]> many than

Re: [Tutor] how to read from a txt file

2005-03-30 Thread Liam Clarke
Nope, it's not that. You can just change your map(int, foo) calls to use float. (But that said, you don't need map, as you're operating on one item at a time.) Hmm try changing the following. for x in data: y = str(x).rstrip('\t\n') #This will remove any stray tabs or newlines on the end

Re: [Tutor] how to read from a txt file

2005-03-30 Thread Liam Clarke
>print temp1[x], temp2[x] This won't work. >>> fob = [] >>> gab = ["fooBar","Baz","aBBa"] >>> for line in gab: ... print line, ... x = line.replace('B', 'X') ... print x ... fob.append(x) ... print fob[line] ... fooBar fooXar Traceback (most recent call last): File "

Re: [Tutor] how to read from a txt file

2005-03-30 Thread Liam Clarke
So... you need those tabs? If you don't need them, go like this - > data_file = open(os.path.normpath(self.TextFile.GetValue()), 'r') for x in data: y = str(x) ( temp11, temp22, pyra11, pyra22, voltage11, current1) = y.split('\t') And that should be all your values, separated in string