Personal tools
You are here: Home Pythonレシピブック プロセスとプロセス間通信
Document Actions

Up one level
by Papasan — last modified 2008-11-19 16:36

Pythonからシェルコマンドを投入して結果を得る。:

 >>> import commands
 >>> cond = commands.getoutput("ls")
 >>> cond
'Desktop\nPython-2.5\nPython-2.5.tgz\nXrootenv.0\nanaconda-...