Re: [Tutor] Why doesn't it choose a new number each time?

2007-02-14 Thread Alan Gauld
"Rikard Bosnjakovic" <[EMAIL PROTECTED]> wrote > On 2/14/07, Nathan Pinno <[EMAIL PROTECTED]> wrote: > >> I wrote a rock, paper, scissors game and every time you play >> without >> exiting, it chooses the same number. How can I fix this problem? >> The >> relative code is below: > [...] >>

Re: [Tutor] critique my script: add columns in a file

2007-02-14 Thread Alan Gauld
"Christopher Spears" <[EMAIL PROTECTED]> wrote > I modified a script I found in "Programming Python" I assume it was the first edition of Programming Python? > #!/usr/bin/python > import string > > def find_longest_line(fileName): > longest_col = [] > for lines_in_file in open(fileName, 'r').rea

Re: [Tutor] critique my script: add columns in a file

2007-02-14 Thread Kent Johnson
Christopher Spears wrote: > I created a file called table.txt. Here is the file's > contents: > > 1 5 10 2 1.0 > 2 10 20 4 2.0 3 > 3 15 30 8 3 2 1 > 4 20 40 16 4.0 > > I modified a script I fo

[Tutor] Mulltiple TK frames

2007-02-14 Thread Hazlett, Les
Thank you Alan and John, No doubt the widow vs. frame terminology is simpe "once you understand it". But I am still confused. John used the labels "Main Window" and "Other Window" and Alan said you normally have many frames inside a single window. Knowing that I am still confused by the windo

Re: [Tutor] Mulltiple TK frames

2007-02-14 Thread Kent Johnson
Hazlett, Les wrote: > I would love to see a simple sample that uses multiple "userforms". You might want to look at EasyGui. I don't think it will do exactly what you want but it has many examples of how to put up simple dialogs. http://www.ferg.org/easygui/ Kent __

Re: [Tutor] Why doesn't it choose a new number each time?

2007-02-14 Thread Rikard Bosnjakovic
On 2/14/07, Alan Gauld <[EMAIL PROTECTED]> wrote: > I don't think that's a problem. The fact that the computers numbers > don't correspond with the users numbers shouldn't matter provided > the 'if' tests align with the choice result, which they do. Alan, You're right, ofcourse. I approached the

[Tutor] Replying to the tutor-list

2007-02-14 Thread Rikard Bosnjakovic
All texts that I reply to this list are automatically sent to the author, or - by selecting "Reply all" in my mail client - the tutorlist gets a CC. Why is there no reply-to-tag in all the posts, making the list recipient at all times? -- - Rikard. __

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread Mike Hansen
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Rikard Bosnjakovic > Sent: Wednesday, February 14, 2007 9:21 AM > To: tutor@python.org > Subject: [Tutor] Replying to the tutor-list > > All texts that I reply to this list are automatically sent to

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread Dave Kuhlman
On Wed, Feb 14, 2007 at 05:20:44PM +0100, Rikard Bosnjakovic wrote: > Why is there no reply-to-tag in all the posts, making the list > recipient at all times? Believe it or not -- The email reader that I use (mutt on a FreeBSD machine that I telnet/ssh into) has a reply-to-list operation. That's

[Tutor] How to make epydoc behave like doxygen

2007-02-14 Thread Hilton Garcia Fernandes
Dear all, unfortunately, i could not make epydoc 2.1 (stable) behave like doxygen, in the sense that it could not make it generate function (or method) callgraphs. The only diagrams i could make it creat e were class inheritance ones. Besides that, it transcribed the user-provided documentation

Re: [Tutor] Accessing class attributes: use methods only?

2007-02-14 Thread Dave Kuhlman
On Tue, Feb 13, 2007 at 11:35:47PM -0500, Kent Johnson wrote: > Bob Gailer wrote: > > I really like the simplicity of a.b = 3. I groan when put in other > > environments where a method call is required. > > > > And Python has the magic method __setattr__ to intercept attribute > > assignment for

[Tutor] information

2007-02-14 Thread Konan Zimin Albert-Eric
Hi,i just subscribed to the python mailist. i know nothing about programming. i downloaded the python software but i need help to know what i'm able to do with it, to understand programming in general, and python in particular. So, i will deadly be waiting for an answer.

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread J or M Montgomery
On Wed, 14 Feb 2007 09:08:38 -0800 Dave Kuhlman <[EMAIL PROTECTED]> wrote: > On Wed, Feb 14, 2007 at 05:20:44PM +0100, Rikard Bosnjakovic wrote: > > > Why is there no reply-to-tag in all the posts, making the list > > recipient at all times? > I use Sylpheed 2.2.7 in a Linux box. There are 'Reply

Re: [Tutor] Accessing class attributes: use methods only?

2007-02-14 Thread Kent Johnson
Dave Kuhlman wrote: > Some of us old school types feel that properties are non-Pythonic. > They are a way to write code that does something that it does not > look like that code is doing. It hides your intend. So, it is not > explicit. > > "Explicit is better than implicit." >

[Tutor] question

2007-02-14 Thread Caicedo, Richard IT2 NSWC
I am trying to get the $ python promt I can't seem to get it. I can get the python shell but when I press enter I don't get the $ python? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] How to make epydoc behave like doxygen

2007-02-14 Thread Kent Johnson
Hilton Garcia Fernandes wrote: > Dear all, > > unfortunately, i could not make epydoc 2.1 (stable) behave like doxygen, in > the sense that it could not make it generate function (or method) callgraphs. I don't know about epydoc but you might be interested in pycallgraph: http://pycallgraph.slow

Re: [Tutor] information

2007-02-14 Thread Kent Johnson
Konan Zimin Albert-Eric wrote: > Hi,i just subscribed to the python mailist. i know nothing about > programming. i downloaded the python software but i need help to know > what i'm able to do with it, to understand programming in general, and > python in particular. So, i will deadly be waiting

Re: [Tutor] question

2007-02-14 Thread Luke Paireepinart
Alan Gauld wrote: > "Doug Potter" <[EMAIL PROTECTED]> wrote > >> I don't get the output I would expect from the following. >> > > > a = open('arp.txt') > file = a.read() > file = file.split('\n') > > > Easier to do > > file = open('arp.txt').readlines() > > Bu

Re: [Tutor] question

2007-02-14 Thread Luke Paireepinart
Caicedo, Richard IT2 NSWC wrote: > > I am trying to get the $ python promt I can't seem to get it. I can > get the python shell but when I press enter I don't get the $ python? > I don't understand what you're asking. What is the $ prompt? If you have a python shell you mean you have a python int

Re: [Tutor] Accessing class attributes: use methods only?

2007-02-14 Thread Terry Carroll
On Wed, 14 Feb 2007, Dave Kuhlman wrote: > On Tue, Feb 13, 2007 at 11:35:47PM -0500, Kent Johnson wrote: > > Bob Gailer wrote: > > > I really like the simplicity of a.b = 3. I groan when put in other > > > environments where a method call is required. > > > > > > And Python has the magic method

Re: [Tutor] Mulltiple TK frames

2007-02-14 Thread Alan Gauld
"Hazlett, Les" <[EMAIL PROTECTED]> wrote > No doubt the widow vs. frame terminology is simpe A Window is a GUI concept, it is the thing with the iconify/delete buttons and title bar. A Frame is literally a container for other widgets. Its conventional to create your Windows with a Frame as the to

Re: [Tutor] Mulltiple TK frames

2007-02-14 Thread Alan Gauld
Here is another reference to the standard dialogs: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123 And to correct my previous comment, the link I posted was by Fred Lundh and opening the tkFileDioalog moduler we discover that he was in fact the author of the code! So he does doc

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread Alan Gauld
"Rikard Bosnjakovic" <[EMAIL PROTECTED]> wrote > All texts that I reply to this list are automatically sent to the > author, or - by selecting "Reply all" in my mail client - the > tutorlist gets a CC. Yep, that makes sense. It's how mail tools work in a sane world. You Reply and it goes to the

Re: [Tutor] Mulltiple TK frames

2007-02-14 Thread Kent Johnson
Alan Gauld wrote: > Here is another reference to the standard dialogs: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123 > > And to correct my previous comment, the link I posted was > by Fred Lundh and opening the tkFileDioalog moduler we > discover that he was in fact the aut

Re: [Tutor] Replying to the tutor-list

2007-02-14 Thread Terry Carroll
On Wed, 14 Feb 2007, Rikard Bosnjakovic wrote: > All texts that I reply to this list are automatically sent to the > author, or - by selecting "Reply all" in my mail client - the > tutorlist gets a CC. > > Why is there no reply-to-tag in all the posts, making the list > recipient at all times? I

[Tutor] User Input List and Sort

2007-02-14 Thread [EMAIL PROTECTED]
Every example of a list that I've seen involves working with, sorting, etc pre-populated list. How can I create a list where the user inputs a string of numbers and then sorts it? I've tried: print "Input list separated by commas" lst=[raw_input()] print lst print len(lst) lst.sort() print lst

Re: [Tutor] User Input List and Sort

2007-02-14 Thread Rikard Bosnjakovic
On 2/14/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Every example of a list that I've seen involves working with, sorting, etc > pre-populated list. How can I create a list where the user inputs a string > of numbers and then sorts it? The code of yours gets a commaseparated _string_, whi

Re: [Tutor] Mulltiple TK frames

2007-02-14 Thread ALAN GAULD
> > So he does document these but not in his standard > > Tkinter tutorial and not in the standard module documentation > > It is in Fredrik Lundh's Introduction to Tkinter: > http://www.pythonware.com/library/tkinter/introduction/standard-dialogs.htm I thought it should be, but couldn't see the

Re: [Tutor] question

2007-02-14 Thread William Allison
Caicedo, Richard IT2 NSWC wrote: > > I am trying to get the $ python promt I can't seem to get it. I can > get the python shell but when I press enter I don't get the $ python? > > > > ___