Some Python things

execute shell commands from within python

import commands
(s, o) = commands.getstatusoutput('ls')
print s
print o
Where s holds the status and o the output of the command.

-- DerSchrecklicheSven - 18 Mar 2005

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2005-03-18 - AndreasWildauer
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback