Python doc problems example: gzip module

2005-08-31 Thread Chermside, Michael
Title: Python doc problems example: gzip module Xah Lee writes:     [...] > Fuck the Python programing[sic] morons.     [...] Peter Maas replies: > Here's the example:     [...] > Have a nice ... eh fucking day :) Thank you Peter... you're a hero. THIS is why c.l.py is such a helpfu

line-by-line output from a subprocess

2005-05-23 Thread Chermside, Michael
I am using the subprocess module to invoke a command-line utility and process the output. However, I would like to process the output line-by-line as it is generated rather than running the subprocess to completion and THEN processing the results. So, for instance, I'd like to write code like this

Converting strings to dates

2005-02-04 Thread Chermside, Michael
I'm trying to convert a string back into a datetime.date. First I'll create the string: Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import time, datetime >>> a_date = datetime.date.today()