Re: [Tutor] noobie question,,,error related

2011-01-30 Thread Alex Hall
On 1/30/11, walter weston wrote: > I get this error when I try and load the datetime module, > > Traceback (most recent call last): > File "C:/Python27/TIMED_PROGRAM.py", line 2, in > datetime.ctime() > AttributeError: 'module' object has no attribute 'ctime' > > > why is this? Did you actu

[Tutor] noobie question,,,error related

2011-01-30 Thread walter weston
I get this error when I try and load the datetime module, Traceback (most recent call last): File "C:/Python27/TIMED_PROGRAM.py", line 2, in datetime.ctime() AttributeError: 'module' object has no attribute 'ctime' why is this? ___ Tutor maillis

Re: [Tutor] print stack traces not caused by errors

2011-01-30 Thread Kirk Bailey
test On 1/4/2011 7:06 PM, Corey Richardson wrote: On 01/04/2011 06:59 PM, Alan Gauld wrote: "Alex Hall" wrote expected at all. I tried the pdb module, but I am running a wx program so it is not helping. I tried: python -m pdb c:\prog\solitaire\game.py The key to using any debugger in a GUI

Re: [Tutor] Wrapping my head around global variables!!

2011-01-30 Thread Alan Gauld
"Nevins Duret" wrote import tkinter.font When I try and run this code, I get the error: |Traceback (most recent call last): File "/home/neduret/pythonproj/alphabet3.py", line 21, in lgFont = tkinter.font(family = "HELVETICA", size = 200) TypeError: 'module' object is not callable|

[Tutor] decimal module and precision

2011-01-30 Thread Richard D. Moores
Python 3.1 The decimal module continues to puzzle me from time to time. Here's one of those. I want to use Alex Martelli's factory function as much as possible. Turns out it has a problem with precision in addition and multiplication. = from decimal import D

Re: [Tutor] pywin32 help

2011-01-30 Thread Dave Angel
(please don't top-post. Insert the ">" symbol in front of whatever lines you're quoting, and put your response under the quote. Most email programs can be configured to do this easily, or even automatically.) On 01/-10/-28163 02:59 PM, Elwin Estle wrote: I'm not 100% sure, but I think the Ac

Re: [Tutor] Wrapping my head around global variables!!

2011-01-30 Thread Nevins Duret
Hello Elwin, Elwin I have no objections with you taking the idea, all I want to do is learn and connect with my some and give him something to aspire to and just plain out challenge. I purchased several python books so if you have any recommendations on others that helped you to become ,wh

Re: [Tutor] Python and Tuples

2011-01-30 Thread bob gailer
On 1/30/2011 4:29 AM, Becky Mcquilling wrote: I'm fairly new to python and I am trying to do some math with tuples. If I have a tuple: t =( (1000, 2000), (2, 4), (25, 2)) I want to loop through and print out the results of the multiplying the two numbers like so: 1000 x 2000 2 x 4 The one-

Re: [Tutor] Python and Tuples

2011-01-30 Thread Alan Gauld
"Becky Mcquilling" wrote I'm fairly new to python and I am trying to do some math with tuples. If I have a tuple: t =( (1000, 2000), (2, 4), (25, 2)) Thats a tuple of tuples. The pairs of numbers each make up a tuple. And the triple of pairs makes up another tuple. I want to loop through

Re: [Tutor] pywin32 help

2011-01-30 Thread Elwin Estle
I'm not 100% sure, but I think the Active State version of python comes with pywin32... http://www.activestate.com/activepython/downloads ...but I could be mistaken. --- On Sun, 1/30/11, walter weston wrote: From: walter weston Subject: [Tutor] pywin32 help To: tutor@python.org Date: Sunday,

Re: [Tutor] Python and Tuples

2011-01-30 Thread delegbede
Thanks Karim. That's a way to go. Cheers. Sent from my BlackBerry wireless device from MTN -Original Message- From: Karim Sender: tutor-bounces+delegbede=dudupay@python.org Date: Sun, 30 Jan 2011 10:50:31 To: Becky Mcquilling; python mail list Subject: Re: [Tutor] Python and Tuple

Re: [Tutor] Python and Tuples

2011-01-30 Thread delegbede
Nice Steve, No one does it better. Weldone. Sent from my BlackBerry wireless device from MTN -Original Message- From: Steven D'Aprano Sender: tutor-bounces+delegbede=dudupay@python.org Date: Sun, 30 Jan 2011 20:47:08 To: Subject: Re: [Tutor] Python and Tuples Becky Mcquilling wro

Re: [Tutor] Python and Tuples

2011-01-30 Thread Karim
Hello, for x, y in t: print x*y Regards Karim On 01/30/2011 10:29 AM, Becky Mcquilling wrote: I'm fairly new to python and I am trying to do some math with tuples. If I have a tuple: t =( (1000, 2000), (2, 4), (25, 2)) I want to loop through and print out the results of the multiplying

Re: [Tutor] Python and Tuples

2011-01-30 Thread Steven D'Aprano
Becky Mcquilling wrote: I'm fairly new to python and I am trying to do some math with tuples. If I have a tuple: t =( (1000, 2000), (2, 4), (25, 2)) I want to loop through and print out the results of the multiplying the two Start with a basic loop through the objects in the tuple: >>> t = (

Re: [Tutor] pywin32 help

2011-01-30 Thread Tim Golden
On 30/01/2011 6:42 AM, walter weston wrote: hello I am running python 2.7 , I am trying to install pywin32 version 2.7 when I run the setup.py file a black console windows pops up displays some text and dissappears before I can read any of the text . I dont know what says so I cant give details

[Tutor] Python and Tuples

2011-01-30 Thread Becky Mcquilling
I'm fairly new to python and I am trying to do some math with tuples. If I have a tuple: t =( (1000, 2000), (2, 4), (25, 2)) I want to loop through and print out the results of the multiplying the two numbers like so: 1000 x 2000 2 x 4 etc. I'm not sure of the syntax for that. Any ideas? Bec