plz help how to print python variable using os.system()

Lutz Horn lutz.horn at fastmail.fm
Wed Jan 16 08:41:04 EST 2008


Hi,

On Wed, 16 Jan 2008 05:29:08 -0800 (PST), jitender001001 at gmail.com said:
>         var = "/home/anonymous"
>         os.system("echo $var)

os.system("echo %s" % var)

Lutz
-- 
GnuPG Key: 1024D/6EBDA359 1999-09-20
Key fingerprint = 438D 31FC 9300 CED0 1CDE  A19D CD0F 9CA2 6EBD A359
http://dev-random.dnsalias.net/0x6EBDA35.asc
http://pgp.cs.uu.nl/stats/6EBDA359.html




More information about the Python-list mailing list