Re: [Tutor] Where is www.wxpython.org?

2009-06-08 Thread Emile van Sebille
On 6/8/2009 7:20 PM Christopher Spears said... Hey, I am trying to get to www.wxpython.org, but my connection keeps timing out. Is the site down? I just want to download wxPython for Python 2.6 (Windows Vista 32 bit). Will this one work? http://sourceforge.net/project/showfiles.php?group

[Tutor] Where is www.wxpython.org?

2009-06-08 Thread Christopher Spears
Hey, I am trying to get to www.wxpython.org, but my connection keeps timing out. Is the site down? I just want to download wxPython for Python 2.6 (Windows Vista 32 bit). Thanks. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailm

Re: [Tutor] Suggested source code folder layout

2009-06-08 Thread Walker Hale IV
On Mon, Jun 8, 2009 at 1:12 PM, Allen Fowler wrote: > >> > >> My 2 cents... >> >> 1) Since you are describing your source code layout, any virtual >> environment should be outside. A virtual environment (virtualenv) is >> part of deployment and not part of source. If you need to make a >> reproduci

Re: [Tutor] creating a range above & below a given number

2009-06-08 Thread Kent Johnson
On Mon, Jun 8, 2009 at 12:56 PM, Gonzalo Garcia-Perate wrote: > Kent, Emile thank you both. You're absolutely right, I was going for > range because I thought it made the code more readable/more explicit. > I hadn't taken into account the performance hit of creating the list > and iterating through

Re: [Tutor] question about class

2009-06-08 Thread Vincent Davis
Accidentally sent I have added the rest (by the way I refrain from using the terms attribute, method, as I will likely miss use them) > I am reading several tutorials about classes and trying to figure out > how to apply it to my project. I have a working program that basically > matches up ap

[Tutor] question about class

2009-06-08 Thread Vincent Davis
I am reading several tutorials about classes and trying to figure out how to apply it to my project. I have a working program that basically matches up applicants and schools. Schools and applicants have and "true" quality and an "observed" quality. Then there is an algorithm that matches them up.

[Tutor] smtplib question

2009-06-08 Thread Albert-jan Roskam
Hi, I made a very simple program to send everybody I know a change of address I am parsing the .msg files with another function, which returns a set called 'recipients'. The code below works, but it displays all recipients in the 'to' field. That is, in the Nth iteration, N recipients are sho

Re: [Tutor] smptlib question

2009-06-08 Thread Tino Dai
On Mon, Jun 8, 2009 at 5:15 PM, Albert-jan Roskam wrote: > > (sorry for posting this again, but something might have gone wrong) > > Hi, > > I made a very simple program to send everybody I know a change of address I > am parsing the .msg files with another function, which returns a set called >

Re: [Tutor] smptlib question

2009-06-08 Thread David
Albert-jan Roskam wrote: (sorry for posting this again, but something might have gone wrong) Hi, I made a very simple program to send everybody I know a change of address I am parsing the .msg files with another function, which returns a set called 'recipients'. The code below works, but it

[Tutor] smptlib question

2009-06-08 Thread Albert-jan Roskam
(sorry for posting this again, but something might have gone wrong) Hi, I made a very simple program to send everybody I know a change of address I am parsing the .msg files with another function, which returns a set called 'recipients'. The code below works, but it displays all recipients in

Re: [Tutor] Can't figure out why this is printing twice

2009-06-08 Thread Wayne
On Mon, Jun 8, 2009 at 10:53 AM, The Green Tea Leaf < thegreenteal...@gmail.com> wrote: > On Mon, Jun 8, 2009 at 17:26, Wayne wrote: > > On Mon, Jun 8, 2009 at 10:07 AM, The Green Tea Leaf > > wrote: > >> > >> Could it be some import statement? That the gzip file is "shadowed" in > >> some way? >

Re: [Tutor] Suggested source code folder layout

2009-06-08 Thread Allen Fowler
> > My 2 cents... > > 1) Since you are describing your source code layout, any virtual > environment should be outside. A virtual environment (virtualenv) is > part of deployment and not part of source. If you need to make a > reproducible deployment environment, then you need a deployment syst

Re: [Tutor] Need better understanding of **kwargs

2009-06-08 Thread Eduardo Vieira
On Sat, Jun 6, 2009 at 11:10 PM, wesley chun wrote: >>> Hello, I thought I understood **kwargs until I stumbled with this >>> function: >>> >>> def changeflexion(myword, mytag, **dicty): >>>        : >>> >>> but when I import the module and call: >>> a = conjugate.changeflexion('estaban', 'VLFin',

Re: [Tutor] creating a range above & below a given number

2009-06-08 Thread Gonzalo Garcia-Perate
Kent, Emile thank you both. You're absolutely right, I was going for range because I thought it made the code more readable/more explicit. I hadn't taken into account the performance hit of creating the list and iterating through it. I'm not sure it was more readable either. the function now reads

Re: [Tutor] Can't figure out why this is printing twice

2009-06-08 Thread The Green Tea Leaf
On Mon, Jun 8, 2009 at 17:26, Wayne wrote: > On Mon, Jun 8, 2009 at 10:07 AM, The Green Tea Leaf > wrote: >> >> Could it be some import statement? That the gzip file is "shadowed" in >> some way? > > based on what the OP said, there's really nothing that should produce that > that I can think of t

Re: [Tutor] Can't figure out why this is printing twice

2009-06-08 Thread Wayne
On Mon, Jun 8, 2009 at 10:07 AM, The Green Tea Leaf < thegreenteal...@gmail.com> wrote: > Could it be some import statement? That the gzip file is "shadowed" in some > way? based on what the OP said, there's really nothing that should produce that that I can think of that would produce the given

Re: [Tutor] Can't figure out why this is printing twice

2009-06-08 Thread The Green Tea Leaf
Could it be some import statement? That the gzip file is "shadowed" in some way? On Mon, Jun 8, 2009 at 16:11, Alan Gauld wrote: > > "Mike Hoy" wrote > > >> I have the following code: > > Is this in a file or are you typing it at the python > interpreter >>> primpt? > >> import gzip >> import dat

Re: [Tutor] Hi

2009-06-08 Thread Alan Gauld
"Eddie" wrote Hi, I'm new and just starting to learn Python. Just testing if this works or not and if anybody reads it lol. Welcome! If you take a look at the archive on the web site you'll see that quite a lot of folks read it - and many reply too! You might even find answers to a lot

Re: [Tutor] Can't figure out why this is printing twice

2009-06-08 Thread Alan Gauld
"Mike Hoy" wrote I have the following code: Is this in a file or are you typing it at the python interpreter >>> primpt? import gzip import datetime date = datetime.date.today() name = date.strftime('%m-%d-%Y')+'.gz' date.strftime('%m-%d-%Y')+'.gz' print "The name of the file will be", na

Re: [Tutor] Stop a long loop in python console or in wxpython?

2009-06-08 Thread Alan Gauld
"xbmuncher" wrote Thanks for the reply Alan. I'm unfamiliar on both methods you suggested. Can you give me examples with code of them? Yes: In a console(untested): # x = 0 try: while True: x += 1 print x sleep(0.1) except KeyboardInterrupt: print 'stopped'

Re: [Tutor] Stop a long loop in python console or in wxpython?

2009-06-08 Thread phpfood
Thanks for the reply Alan. I'm unfamiliar on both methods you suggested. Can you give me examples with code of them? I saw this piece of code on your webpage: import msvcrt def doKeyEvent(key): if key == '\x00' or key == '\xe0': # non ASCII key = msvcrt.getch() # fetch second character

Re: [Tutor] Stop a long loop in python console or in wxpython?

2009-06-08 Thread spir
Le Mon, 8 Jun 2009 09:23:08 +0100, "Alan Gauld" s'exprima ainsi: > There are two normal ways to do this in a GUI: > 1) break the loop into small chunks and run them in response > to timer events. The function then calls the timer at the end of > each chunk until it completes its task. This frees

Re: [Tutor] Hi

2009-06-08 Thread Christian Witts
Eddie wrote: Hi, I'm new and just starting to learn Python. Just testing if this works or not and if anybody reads it lol. Eddie ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor Welcome to the list and enjoy you

Re: [Tutor] Stop a long loop in python console or in wxpython?

2009-06-08 Thread xbmuncher
Thanks for the reply Alan. I'm unfamiliar on both methods you suggested. Can you give me examples with code of them? I saw this piece of code on your webpage: import msvcrt def doKeyEvent(key): if key == '\x00' or key == '\xe0': # non ASCII key = msvcrt.getch() # fetch second characte

Re: [Tutor] Hi

2009-06-08 Thread Kent Johnson
On Mon, Jun 8, 2009 at 7:30 AM, Eddie wrote: > Hi, I'm new and just starting to learn Python. Just testing if this > works or not and if anybody reads it lol. Yes, it works. Welcome! Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/ma

[Tutor] Hi

2009-06-08 Thread Eddie
Hi, I'm new and just starting to learn Python. Just testing if this works or not and if anybody reads it lol. Eddie ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Can't figure out why this is printing twice

2009-06-08 Thread Christian Witts
Mike Hoy wrote: I have the following code: import gzip import datetime date = datetime.date.today() name = date.strftime('%m-%d-%Y')+'.gz' date.strftime('%m-%d-%Y')+'.gz' print "The name of the file will be", name the output is: The name of the file will be The name of the file will be 06-08-20

Re: [Tutor] Can't figure out why this is printing twice

2009-06-08 Thread Andre Engels
On Mon, Jun 8, 2009 at 11:57 AM, Mike Hoy wrote: > I have the following code: > > import gzip > import datetime > date = datetime.date.today() > name = date.strftime('%m-%d-%Y')+'.gz' > date.strftime('%m-%d-%Y')+'.gz' > print "The name of the file will be", name > > the output is: > The name of the

Re: [Tutor] Can't figure out why this is printing twice

2009-06-08 Thread The Green Tea Leaf
This doesn't happen on my machine. What is the filename ? -- The Green Tea Leaf thegreenteal...@gmail.com thegreentealeaf.blogspot.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] Can't figure out why this is printing twice

2009-06-08 Thread Mike Hoy
I have the following code: import gzip import datetime date = datetime.date.today() name = date.strftime('%m-%d-%Y')+'.gz' date.strftime('%m-%d-%Y')+'.gz' print "The name of the file will be", name the output is: The name of the file will be The name of the file will be 06-08-2009.gz I can't fi

Re: [Tutor] Stop a long loop in python console or in wxpython?

2009-06-08 Thread Alan Gauld
"xbmuncher" wrote def longLoop(): x = 0 for n in range(10): time.sleep(5) x = x + n It will run in the console for a long time. How can I send a command and cause it to stop and pursue hello() function? You can use Ctrl-C and put the loop insiode a try/except clause t