Problem with TimedRotatingFileHandler

2008-06-05 Thread Dominique.Holzwarth
Hi everyone I'm trying to use python's logging mechanism to write exception data into a log file with the TimedRotatingFileHandler but the rotating of the file is not working... Here's a bit of sample code of what I'm doing (just the interessting part of it ;-)): import logging import logging.

Easy install / setuptools

2008-05-29 Thread Dominique.Holzwarth
Hi everyone I'm trying to figure out the "best" way to distribute my own python packages. Basicly, what I want is to have something like an "installer.exe" (on windows) which puts my package under Python/Lib/site-packages (so that it can be found via the PYTHONPATH). I've played around a bit w

Problems with os.walk

2008-05-08 Thread Dominique.Holzwarth
Hi everyone The following code: scriptPath = os.path.dirname(__file__) (dirpath, dirnames, filenames) = os.walk(scriptPath) print 'dirpath\n' print dirpath print 'dirnames\n' pprint.pprint(dirnames) print 'filenames\n' pprint.pprint(filnames) Fails on the os.walk call with the following error:

Subprocess module

2008-04-23 Thread Dominique.Holzwarth
Hello all I want to convert a tex file into a pdf by using pdflatex. For that, I thought the 'subprocess' module might be a good option. My code doesn't work at all tho: Import os, subprocess def main(): scriptpath = os.path.dirname(__file__) p = subprocess.Popen("pdflatex --in

Problem with method overriding from base class

2008-03-31 Thread Dominique.Holzwarth
Hello everyone I have defined some sort of 'interface class' and a factory function that creates instance objects of specific classes, which implement that interface: Interface definition: *** import GUI.webGUI a

Pickle: several class instance objects in one file?

2008-03-27 Thread Dominique.Holzwarth
Hi everyone I've never used the module 'pickle' so far, thus I've got some questions about how to use it: Lets say I have instances of class A and class B: a = A() b = B() Is it possible to pickle both of these instances to the same pkl-file or will that have any bad impact for unpickle (i.e.