RE: plz help how to print python variable using os.system()
- From: "Delaney, Timothy (Tim)" <tdelaney@xxxxxxxxx>
- Date: Mon, 21 Jan 2008 06:35:48 +0800
Grant Edwards wrote:
On 2008-01-16, Lutz Horn <lutz.horn@xxxxxxxxxxx> wrote:
Hi,
On Wed, 16 Jan 2008 05:29:08 -0800 (PST), jitender001001@xxxxxxxxx
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
Only reason I can think of is to learn how to use os.system before doing
something larger. But the OP should be using subprocess or popen in most
cases anyway ...
Tim Delaney
.
- References:
- Re: plz help how to print python variable using os.system()
- From: Grant Edwards
- Re: plz help how to print python variable using os.system()
- Prev by Date: Re: Linux/Win32 func. to get Python instdir (not exedir) + site-packages => extensions mgmt
- Next by Date: Re: Basic inheritance question
- Previous by thread: Re: plz help how to print python variable using os.system()
- Next by thread: Unknown cause to error (new to python)
- Index(es):
Relevant Pages
|
|