1 diff --git a/dot2tex/dotparsing.py b/dot2tex/dotparsing.py
2 index 391b5dc..6dc77a3 100644
3 --- a/dot2tex/dotparsing.py
4 +++ b/dot2tex/dotparsing.py
5 @@ -180,18 +180,8 @@ def __find_executables(path):
7 """Locate Graphviz's executables in the system.
11 - First: Windows Registry (Windows only)
12 - This requires Mark Hammond's pywin32 is installed.
14 - Secondly: Search the path
15 - It will look for 'dot', 'twopi' and 'neato' in all the directories
16 - specified in the PATH environment variable.
18 - Thirdly: Default install location (Windows only)
19 - It will look for 'dot', 'twopi' and 'neato' in the default install
20 - location under the "Program Files" directory.
21 + It will look for 'dot', 'twopi' and 'neato' in
24 It will return a dictionary containing the program names as keys
25 and their paths as values.
26 @@ -199,75 +189,9 @@ def find_graphviz():
27 If this fails, it returns None.
30 - # Method 1 (Windows only)
32 - if os.sys.platform == 'win32':
34 - import win32api, win32con
36 - # Get the GraphViz install path from the registry
38 - hkey = win32api.RegOpenKeyEx(win32con.HKEY_LOCAL_MACHINE,
39 - "SOFTWARE\AT&T Research Labs\Graphviz", 0, win32con.KEY_QUERY_VALUE)
41 - path = win32api.RegQueryValueEx(hkey, "InstallPath")[0]
42 - win32api.RegCloseKey(hkey)
44 - # Now append the "bin" subdirectory:
46 - path = os.path.join(path, "bin")
47 - progs = __find_executables(path)
48 - if progs is not None:
49 - # print("Used Windows registry")
53 - # Print a messaged suggesting they install these?
55 - log.debug('The win32api is not installed')
58 - log.debug('Failed to access the registry key')
60 - # Method 2 (Linux, Windows etc)
62 - if 'PATH' in os.environ:
63 - for path in os.environ['PATH'].split(os.pathsep):
64 - progs = __find_executables(path)
65 - if progs is not None:
68 - # Method 3 (Windows only)
70 - if os.sys.platform == 'win32':
71 - # Try and work out the equivalent of "C:\Program Files" on this
72 - # machine (might be on drive D:, or in a different language)
74 - if 'PROGRAMFILES' in os.environ:
75 - # Note, we could also use the win32api to get this
76 - # information, but win32api may not be installed.
78 - path = os.path.join(os.environ['PROGRAMFILES'], 'ATT', 'GraphViz', 'bin')
81 - # Just in case, try the default...
82 - path = r"C:\Program Files\att\Graphviz\bin"
84 - progs = __find_executables(path)
86 - if progs is not None:
87 - # print("Used default install location")
91 - '/usr/bin', '/usr/local/bin',
93 - '/opt/bin', '/sw/bin', '/usr/share',
94 - '/Applications/Graphviz.app/Contents/MacOS/'):
95 - progs = __find_executables(path)
96 - if progs is not None:
97 - # print("Used path")
99 + progs = __find_executables('@graphviz@/bin')
100 + if progs is not None:
103 # Failed to find GraphViz