Retaining an object

sysfault sysfault at scrpy.org
Tue Aug 9 20:09:26 EDT 2005


Hello, I have a function which takes a program name, and I'm using
os.popen() to open that program via the syntax: os.popen('pidof var_name',
'r'), but as you know var_name is not expanded within single quotes, I
tried using double quotes, and such, but no luck. I was looking for a way
to have var_name expanded without getting a syntax error by ommiting the
surrounding quotes. I need to use a variable, it's the argument to a
function.

-- 
A wise man knows he knows nothing.




More information about the Python-list mailing list