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

Grant Edwards grante at
Fri Jan 18 17:46:15 CET 2008

On 2008-01-16, Lutz Horn <lutz.horn at> wrote:
> Hi,
> On Wed, 16 Jan 2008 05:29:08 -0800 (PST), jitender001001 at said:
>>         var = "/home/anonymous"
>>         os.system("echo $var)
> os.system("echo %s" % var)

Though one wonders why one would do that instead of simply doing

print var

Grant Edwards                   grante             Yow! I'm ZIPPY the PINHEAD
                                  at               and I'm totally committed
                                 to the festive mode.

More information about the Python-list mailing list