-
-
Save anonymous/142cc47ba7e780bb88d6 to your computer and use it in GitHub Desktop.
Issue attachments for pydot/pydot-ng#65: https://github.com/pydot/pydot-ng/issues/65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: pydot.py | |
=================================================================== | |
--- pydot.py (revision 29) | |
+++ pydot.py (working copy) | |
@@ -539,11 +539,33 @@ | |
path = os.path.join(os.environ['PROGRAMFILES'], 'ATT', 'GraphViz', 'bin') | |
+ # All the recent versions of GraphViz append a version number | |
+ # Check the directory of PROGRAMFILES until you see Graphviz | |
+ if not os.path.exists(path): | |
+ for dir in os.listdir(os.environ['PROGRAMFILES']): | |
+ if 'Graphviz' in dir: | |
+ path = os.path.join(os.environ['PROGRAMFILES'], dir, 'bin') | |
+ break | |
+ | |
else: | |
#Just in case, try the default... | |
path = r"C:\Program Files\att\Graphviz\bin" | |
+ # Check Program Files | |
+ if not os.path.exists(path): | |
+ for dir in os.listdir(r"C:\Program Files"): | |
+ if 'Graphviz' in dir: | |
+ path = os.path.join(r"C:\Program Files", dir, 'bin') | |
+ break | |
+ | |
+ # Check Program Files (x86) | |
+ if not os.path.exists(path): | |
+ for dir in os.listdir(r"C:\Program Files (x86)"): | |
+ if 'Graphviz' in dir: | |
+ path = os.path.join(r"C:\Program Files (x86)", dir, 'bin') | |
+ break | |
+ | |
progs = __find_executables(path) | |
if progs is not None : |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment