[Tutor] using re

2007-06-03 Thread johnf
I have the following pattern='^([0-9]{0,%s})(\.[0-9]{0,%s})?$' % (self.IntegerWidth, self.DecimalWidth) ) if re.match(pattern, self.GetValue())==None: self.BackColor == "pink" else: self.BackColor == "white" self.IntegerWidth = 2 self.DecimalWidth=2 the pr

Re: [Tutor] newbie: Reading text file

2007-06-03 Thread Preecha Bundrikwong
Dear all, Thanks for all your help. I followed Alan's suggestion -- dealing with the directory search path, by the method sys.path.append(). At first I thought it would mess up the whole sys.path after running the script. But it actually doesn't. Thanks again! Regards, PB ___

Re: [Tutor] ftp

2007-06-03 Thread Alan Gauld
"Jason Coggins" <[EMAIL PROTECTED]> wrote > What would be the best method to (1) check if there is a > particular file available for download on the internet and (2) > if the file is available, download the file to a particular > directory. Since you mention ftp in the subject line I'll assume

Re: [Tutor] Suggestions for a first object orientated program

2007-06-03 Thread Alan Gauld
"Matt Smith" <[EMAIL PROTECTED]> wrote > I have been reading up on OOP in Python recently and feel ready to > attempt my first program using OOP principals. Can anyone suggest a > suitable first OOP project for me to get my teeth into? > > I haven't done any real GUI programming but I have starte

Re: [Tutor] Command Line Promps

2007-06-03 Thread Alan Gauld
"Jason Coggins" <[EMAIL PROTECTED]> wrote >I am using Linux and yes I am wanting the program to run another >program. I > have tried these before but, if I remember correctly, these methods > caused > the original program to "freeze" while waiting on the "spawned" > program to > return a value

Re: [Tutor] ftp

2007-06-03 Thread Kent Johnson
Jason Coggins wrote: > What would be the best method to (1) check if there is a particular file > available for download on the internet and (2) if the file is available, > download the file to a particular directory. Use ftplib. Here are some examples: http://effbot.org/librarybook/ftplib.htm

[Tutor] ftp

2007-06-03 Thread Jason Coggins
What would be the best method to (1) check if there is a particular file available for download on the internet and (2) if the file is available, download the file to a particular directory. Jason___ Tutor maillist - Tutor@python.org http://mail.pyth

Re: [Tutor] Command Line Promps

2007-06-03 Thread Jason Coggins
Will the program that is started by the thread continue to run if the program that started the thread exits? Jason - Original Message - From: "jim stockford" <[EMAIL PROTECTED]> To: "Jason Coggins" <[EMAIL PROTECTED]> Cc: Sent: Sunday, June 03, 2007 5:37 PM Subject: Re: [Tutor] Command

Re: [Tutor] More trouble debugging my game of life program

2007-06-03 Thread Brian van den Broek
Matt Smith said unto the world upon 06/03/2007 04:12 PM: > Hi, > > I've got my program working correctly (or so it seems) with my original > data file (r-pentomino.txt - attached) but when I run it with a larger > (30*30) file (big-r-pentomino - also attached) in an attempt to make it > work with

Re: [Tutor] Command Line Promps

2007-06-03 Thread jim stockford
sounds like threading is a solution. On Jun 3, 2007, at 2:05 PM, Jason Coggins wrote: > I am using Linux and yes I am wanting the program to run another > program. I > have tried these before but, if I remember correctly, these methods > caused > the original program to "freeze" while waiting

Re: [Tutor] Command Line Promps

2007-06-03 Thread Jason Coggins
I am using Linux and yes I am wanting the program to run another program. I have tried these before but, if I remember correctly, these methods caused the original program to "freeze" while waiting on the "spawned" program to return a value (usually either true or false). I am planning on havi

Re: [Tutor] Command Line Promps

2007-06-03 Thread Bob Gailer
Please always reply to the list, not just me. We are all working on these questions and we all learn from them. Jason Coggins wrote: > These seem to be ways of getting imput from the user. I do not want > to send a command line to the user (for example, in the form of a > question) and get the

[Tutor] Suggestions for a first object orientated program

2007-06-03 Thread Matt Smith
Hi, I have been reading up on OOP in Python recently and feel ready to attempt my first program using OOP principals. Can anyone suggest a suitable first OOP project for me to get my teeth into? I haven't done any real GUI programming but I have started gutting to grips with the curses module und

[Tutor] More trouble debugging my game of life program

2007-06-03 Thread Matt Smith
Hi, I've got my program working correctly (or so it seems) with my original data file (r-pentomino.txt - attached) but when I run it with a larger (30*30) file (big-r-pentomino - also attached) in an attempt to make it work with out so many edge effects it returns the following error message: Tra

Re: [Tutor] Command Line Promps

2007-06-03 Thread Bob Gailer
Jason Coggins wrote: > Is it possible to have a Python program issue a command line promp to > the terminal while the program is running? See raw_input() and input() built-in functions. > -- Bob Gailer 510-978-4454 ___ Tutor maillist - Tutor@python

[Tutor] Command Line Promps

2007-06-03 Thread Jason Coggins
Is it possible to have a Python program issue a command line promp to the terminal while the program is running? Jason___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor