[Tutor] not invoking the shell from python
shuying at gmail.com
Tue Jun 21 10:28:06 CEST 2005
I've got an external program that I'm calling from python with
os.popen. The problem is that I need to pass this program an arbitrary
body of text. I've tried escaping characters before passing it as
input but the shell still expands out certain characters. I noticed
with python2.4. How do I bypass the shell and hand arguments directly
to the program?
The problematic line in question looks like this:
os.popen('''rt create -t ticket set requestor='%s' owner='%s'
queue='%s' subject="%s" text="%s" status='%s' ''' %
thanks in advance,
More information about the Tutor