[Tutor] IDLE/tk in 10.6

2011-07-15 Thread Luke Thomas Mergner
Hi, I am not a professional programmer, but just trying to learn. I'm running Mac 10.6 Snow Leopard. I used MacPorts to install python26, python27, and python3. My python interpreter loads 2.7.2 after I ran the python_select command, which is added via MacPorts I think. I'd like to try IDL

[Tutor] Logger object not passed between modules

2011-07-25 Thread Luke Thomas Mergner
gger. self.logger = logging.getLogger('Frame') # The argument shouldn't matter, as I follow the examples. print self.logger self.logger.info('In frame __init__, the size is : ', self.GetSize) $ python app.py --The log prints -- 2011-07-26 01:39:07,642 - Main - INFO

[Tutor] Debugging While Loops for Control

2012-02-15 Thread Luke Thomas Mergner
Hi, I've been translating and extending the Blackjack project from codeacademy.com into Python. My efforts so far are here: https://gist.github.com/1842131 My problem is that I am using two functions that return True or False to determine whether the player receives another card. Because of th

Re: [Tutor] Debugging While Loops for Control

2012-02-16 Thread Luke Thomas Mergner
> > -- > > Message: 1 > Date: Wed, 15 Feb 2012 23:57:08 -0500 > From: Luke Thomas Mergner > To: tutor@python.org > Subject: [Tutor] Debugging While Loops for Control > Message-ID: > Content-Type

[Tutor] Datetime objects

2012-03-16 Thread Luke Thomas Mergner
Hi, I am having trouble comparing two datetime objects. Using Sqlalchemy I save a string as a date into an sqlite field (which has no native date format, I gather). > import datetime as dt > date_obj = dt.datetime.strptime(date_string,'%m.%d.%Y') I want to compare that date later with an inp

[Tutor] writing effective unittests

2013-01-02 Thread Luke Thomas Mergner
good tutorial that I've missed. Based on the O'Reilly 2-Part introduction, I hope that learning to write tests will make my code better. Thanks, -- Luke Thomas Mergner Glendale, CA Sent from Mutt. ___ Tutor maillist - Tutor@python.org

Re: [Tutor] writing effective unittests

2013-01-03 Thread Luke Thomas Mergner
* Albert-Jan Roskam wrote: > > > > Hi, > > > > > I am trying to learn a bit of test-driven programming using unittests and > > nosetests. I am having trouble finding resources that explain how to write > > effective tests. I am not a programmer or a student, so I do not have > > access to