Issue combining gzip and subprocess

2009-07-21 Thread Iwan Vosloo
Hi there, We tried to gzip the output of a shell command, but this results in a strange error: the resulting file seems to be the concatenation of the plaintext file with the zipped content. For example: f = gzip.open(filename, 'w') subprocess.check_call(['ls','-la'], stdout=f) f.close() Using

How to debug this import problem?

2009-05-08 Thread Iwan Vosloo
Hi there, We have a rather complicated program which does a bit of os.chdir and sys.path manipulations. In between all of this, it imports the decimal module several times. However, it imports a new instance of decimal sometimes. (Which is a problem, since a decimal.Decimal (imported at point

Re: Structuring larger applications - ideas

2005-05-16 Thread Iwan Vosloo
I know my foreign (to python) one class per module idea is what makes life more difficult for me here. And there is an argument to be made out that it is a stupid remnant I stick to from having used it in other programming languages (do I have to admit C++ in my background?) Two small examples

Re: Structuring larger applications - ideas

2005-05-16 Thread Iwan Vosloo
I know my foreign (to python) one class per module idea is what makes life more difficult for me here. And there is an argument to be made out that it is a stupid remnant I stick to from having used it in other programming languages (do I have to admit C++ in my background?) Two small examples