3

python: os.system does not execute shell comand

view full story
linux-howto

http://askubuntu.com – I need to execute shell command in python program (I have ubuntu). More specifically I want to create graph using graphviz in python script. My code is os.system("dot -Tpng graph.dot -o graph.png") It does not work, but if I just type "dot -Tpng graph.dot -o graph.png" in command line then everything is fine. Do you know what the problem? Thank you! Edit: Does not work means that nothing happens, there are no errors. Output from "dot -v -Tpng graph.dot -o graph.png" dot - graphviz version 2.26.3 (20100126.1600) Activated plugin library: libgvplugin_pango.so.6 Using textlayout: textlay (HowTos)