Re: [Tutor] Checking for a Valid Date

2008-09-01 Thread John Fouhy
2008/9/2 Wayne Watson <[EMAIL PROTECTED]>: > Is there some method or function that checks whether a date is valid. For > example, these are not valid (/mm/dd format here for reference.): [...] > Perhaps a Try is useful with some function? Yup. Have a look at time.strptime. Don't be afraid to

[Tutor] Checking for a Valid Date

2008-09-01 Thread Wayne Watson
Title: Signature.html Is there some method or function that checks whether a date is valid. For example, these are not valid (/mm/dd format here for reference.): 2008/02/33 2k+8/11/21 200.8/10/02 2006/3/five 2007/-6/18 2009/14/2 I'm assuming the program has determined there are three part

Re: [Tutor] monitor subprocess and get it's output during execution

2008-09-01 Thread Colin.Wang
2008/9/1 Kent Johnson <[EMAIL PROTECTED]> > On Sun, Aug 31, 2008 at 11:39 PM, 王珂 <[EMAIL PROTECTED]> wrote: > > > --Then I use: > > print "Download begin ..." > > p = subprocess.Popen(["robocopy.exe" +" " + "DownloadArgs"],Shell = > > True,stdout = PIPE) > > while not str(p.poll()).isdigit(): > >

Re: [Tutor] How Compute # of Days between Two Dates?

2008-09-01 Thread John Fouhy
2008/9/2 Wayne Watson <[EMAIL PROTECTED]>: > How do I just get the current time? The following gives me 00:00:00. > > import datetime > > dt = datetime.time() datetime.datetime.today() will give you "now" as a datetime. You can then extract a time object from it: >>> datetime.datetime.today() da

Re: [Tutor] How Compute # of Days between Two Dates?

2008-09-01 Thread Wayne Watson
Title: Signature.html How do I just get the current time? The following gives me 00:00:00. import datetime dt = datetime.time() print "dt: ", dt greg whittier wrote: On Mon, Sep 1, 2008 at 10:17 AM, Wayne Watson <[EMAIL PROTECTED]> wrote: That's the question in Subject. For exam

Re: [Tutor] Responding to Tutor Posts, Reply-To

2008-09-01 Thread Alan Gauld
"Wayne Watson" <[EMAIL PROTECTED]> wrote When I reply to a response to my post, it seems to go back to the respondent. I'd like it to just go back to the list. ...Did I set something up wrong when I subscribed? This has been a point of hot debate since the list was founded. Some of us like the

Re: [Tutor] Concatenation vs formatting

2008-09-01 Thread John Fouhy
2008/9/1 Richard Lovely <[EMAIL PROTECTED]>: > Just a couple of quick questions: > What differences are there in efficency (i.e. time and memory) between > string concatenation ("foo" + "bar") and printf style formatting > ("%s%s" % ("foo","bar")). The timeit module may provide some insight: Morp

Re: [Tutor] Responding to Tutor Posts, Reply-To

2008-09-01 Thread W W
On Mon, Sep 1, 2008 at 7:07 PM, Wayne Watson <[EMAIL PROTECTED]>wrote: > When I reply to a response to my post, it seems to go back to the > respondent. I'd like it to just go back to the list. I'm using Seamonkey > (Mozilla). I can do a reply-all but that sends it to the respondent and the > lis

[Tutor] Responding to Tutor Posts, Reply-To

2008-09-01 Thread Wayne Watson
Title: Signature.html When I reply to a response to my post, it seems to go back to the respondent. I'd like it to just go back to the list. I'm using Seamonkey (Mozilla). I can do a reply-all but that sends it to the respondent and the list. It seems as though other lists have a Reply-To, whic

Re: [Tutor] Concatenation vs formatting

2008-09-01 Thread bob gailer
Richard Lovely wrote: Just a couple of quick questions: What differences are there in efficency (i.e. time and memory) between string concatenation ("foo" + "bar") and printf style formatting ("%s%s" % ("foo","bar")). Is there any place where one is better than the othe concatenation should be mo

Re: [Tutor] How Compute # of Days between Two Dates?

2008-09-01 Thread greg whittier
On Mon, Sep 1, 2008 at 10:17 AM, Wayne Watson <[EMAIL PROTECTED]> wrote: > That's the question in Subject. For example, the difference between > 08/29/2008 and 09/03/2008 is +5. The difference between 02/28/2008 and > 03/03/2008 is 4, leap year--extra day in Feb. I'm really only interested in > yea

Re: [Tutor] How Compute # of Days between Two Dates?

2008-09-01 Thread William Allison
Wayne Watson wrote: > That's the question in Subject. For example, the difference between > 08/29/2008 > and 09/03/2008 is +5. The difference between 02/28/2008 and 03/03/2008 is 4, > leap year--extra day in Feb. I'm really only interested in years between, > say, > 1990 and 2050. In other wor

[Tutor] How Compute # of Days between Two Dates?

2008-09-01 Thread Wayne Watson
Title: Signature.html That's the question in Subject. For example, the difference between 08/29/2008 and 09/03/2008 is +5. The difference between 02/28/2008 and 03/03/2008 is 4, leap year--extra day in Feb. I'm really only interested in years between, say, 1990 and 2050. In other words not some

[Tutor] Concatenation vs formatting

2008-09-01 Thread Richard Lovely
Just a couple of quick questions: What differences are there in efficency (i.e. time and memory) between string concatenation ("foo" + "bar") and printf style formatting ("%s%s" % ("foo","bar")). Is there any place where one is better than the other, and any places where either should be avoided?

Re: [Tutor] monitor subprocess and get it's output during execution

2008-09-01 Thread Kent Johnson
On Sun, Aug 31, 2008 at 11:39 PM, 王珂 <[EMAIL PROTECTED]> wrote: > --Then I use: > print "Download begin ..." > p = subprocess.Popen(["robocopy.exe" +" " + "DownloadArgs"],Shell = > True,stdout = PIPE) > while not str(p.poll()).isdigit(): > print ">", > time.sleep(10) > #don't know how

Re: [Tutor] Tramline implementation

2008-09-01 Thread Kent Johnson
On Mon, Sep 1, 2008 at 4:03 AM, goldgod a <[EMAIL PROTECTED]> wrote: > > hi, > I want to implement a tramline python library. I created a virtual > host in apache and created a python(cgi) file with simple uploading > concepts.Tramline is not interacting with apache. I tried get examples bu

[Tutor] Tramline implementation

2008-09-01 Thread goldgod a
hi, I want to implement a tramline python library. I created a virtual host in apache and created a python(cgi) file with simple uploading concepts.Tramline is not interacting with apache. I tried get examples but they given for plone and zope. Is any idea or examples available. -- Thank