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



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
.



Relevant Pages

  • Re: bitcopy in delphi.
    ... > Delphi. ... part of the reason your code looks simpler. ... destination buffers overlap. ...
    (alt.comp.lang.borland-delphi)
  • Re: Whtas the Story with document.createElement(iframe) in IE?
    ... var iframe = document.createElement; ... The answer he was looking for was really the *official* reason why the ... stupid mystical incantation in necessary in the first place ... That may be what you consider official, but it is nonsense nonetheless. ...
    (comp.lang.javascript)
  • Re: SolidWorks Subscription
    ... likely that if my VAR won't give me a break I simply won't ante up at ... 2006 for that reason, and I probably won't be anytime soon. ... > development in the last six years as a licensed user. ... > customers to continue this practice. ...
    (comp.cad.solidworks)
  • Re: how does this function work?
    ... others to display. ... Any reason for that? ... Geoff ... > var ig = 0; ...
    (comp.lang.javascript)
  • Re: AJAX methodology
    ... var AJAX = ... There is no good reason not to wrap this into a prototype object. ... /** The reason we can't use 'this' inside handler since it would not ... `XHR' will always have the ...
    (comp.lang.javascript)