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

2009-06-09 Thread Wayne
On Tue, Jun 9, 2009 at 8:31 AM, Lie Ryan wrote: > > Maybe python should issue some kind of warning when a module being > imported from a local path has the same name as an installed module? It > is never a good idea to name a module the same as an installed library > unless you're deliberately tr

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

2009-06-09 Thread Lie Ryan
Mike Hoy wrote: > On Tue, Jun 9, 2009 at 6:34 AM, The Green Tea Leaf > mailto:thegreenteal...@gmail.com>> wrote: > > I got an email from him that he had a gzip.pyc file in that folder. > Once he deleted that everything works OK. > > > Heh... I think I've made that mis

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

2009-06-09 Thread Mike Hoy
> > On Tue, Jun 9, 2009 at 6:34 AM, The Green Tea Leaf < > thegreenteal...@gmail.com> wrote: > >> I got an email from him that he had a gzip.pyc file in that folder. >> Once he deleted that everything works OK. > > > Heh... I think I've made that mistake before; > > "My import statement doesn't wor

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

2009-06-09 Thread Wayne
On Tue, Jun 9, 2009 at 6:34 AM, The Green Tea Leaf < thegreenteal...@gmail.com> wrote: > I got an email from him that he had a gzip.pyc file in that folder. > Once he deleted that everything works OK. Heh... I think I've made that mistake before; "My import statement doesn't work right! When I

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

2009-06-09 Thread The Green Tea Leaf
I got an email from him that he had a gzip.pyc file in that folder. Once he deleted that everything works OK. ___ 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-09 Thread Lie Ryan
The Green Tea Leaf wrote: > You don't happen to have a file called gzip.py in that catalog? > > On Tue, Jun 9, 2009 at 10:03, Mike Hoy wrote: >> >> On Tue, Jun 9, 2009 at 3:00 AM, Mike Hoy wrote: >>> Here's the screenshot: >>> >>> http://img40.imageshack.us/img40/7124/printtwice.png >>> >>> In ca

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

2009-06-09 Thread The Green Tea Leaf
You don't happen to have a file called gzip.py in that catalog? On Tue, Jun 9, 2009 at 10:03, Mike Hoy wrote: > > > On Tue, Jun 9, 2009 at 3:00 AM, Mike Hoy wrote: >> >> Here's the screenshot: >> >> http://img40.imageshack.us/img40/7124/printtwice.png >> >> In case the image goes down here's the

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

2009-06-09 Thread Mike Hoy
On Tue, Jun 9, 2009 at 3:00 AM, Mike Hoy wrote: > Here's the screenshot: > > http://img40.imageshack.us/img40/7124/printtwice.png > > In case the image goes down here's the code: > import gzip > import datetime > date = datetime.date.today() > name = date.strftime('%m-%d-%Y')+'.gz' > print "The n

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] 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] 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] 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