Re: Parsing a commandline from within Python

2007-10-11 Thread Andreas Huesgen
e shlex module:: > > >>> import shlex > >>> shlex.split('"foo bar" "some text"') > ['foo bar', 'some text'] > Thanks, that is exactly what i need. Andreas Huesgen -- http://mail.python.org/mailman/listinfo/python-list

Parsing a commandline from within Python

2007-10-11 Thread andreas . huesgen
strings "foo bar" and "some text" from the commandline <"foo bar" "some text">)? If not, do you have any other ideas how to handle this problem (increasing commandline length, xml files might be a way)? Regards, Andreas Huesgen Viel oder

Find out the name of a variable passed as an argument

2006-10-04 Thread Andreas Huesgen
var2) var2 thanks in advance, greets Andreas Huesgen -- http://mail.python.org/mailman/listinfo/python-list

Re: python reference counting and exceptions

2006-09-13 Thread Andreas Huesgen
onstruct, which is *not* the same as a try/except. The > finally clause is always executed, whether or not an exception is raised. Yes, of course it must be the try finally construct and not try/except. Shame on me ;) Andreas Huesgen -- http://mail.python.org/mailman/listinfo/python-list

python reference counting and exceptions

2006-09-12 Thread Andreas Huesgen
imic the c++ code snipped above in python without adding a try-except-unlock-rethrow block around every peace of code that locks some resources. Greets, Andreas Huesgen -- http://mail.python.org/mailman/listinfo/python-list