I am using Python on Mac OSX Leopard.
I am trying to run the dot program (part of Graphviz) from Python:
# -*- coding: utf-8 -*- import os print os.environ['PATH'] print os.system("ls >> a.txt") print os.system("dot -o9.png -Tpng ./6.dot")
The ls command is just to make sure python is in the correct directory. It. As a result, I get:
/ Usr / bin: / bin: / usr / sbin: / sbin 0 32512
I understand that error 32512 means that python could not find the file, and since there is a 6.dot file (if I run "dot -o9.png -Tpng./6.dot" from the terminal, I get no error and it turns out 9.png), I believe that Python cannot find the point file.
I probably need to add the dot file to the path. But I do not know where it is. If I run:
whereis dot
I do not get an answer.
How can I find a point executable?
Alternatively, can I run a point program as a command from within Python?
source share