pombreda / pydot

Automatically exported from code.google.com/p/pydot
MIT License
0 stars 0 forks source link

Problem with Graphviz path with space #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install Graphviz to some directory with space e.g. C:\Program Files\...
2. Use pydot
3.

What is the expected output? What do you see instead?
Expected: pydot should be able to locate and execute appropriate executable
file in Graphviz
What I see: pydot does not found executable files.

What version of the product are you using? On what operating system?
Windows XP SP2
pydot 0.9.1
Python 2.4.4

Please provide any additional information below.
Workaround: 
modify pydot's code in find_graphviz() as follows:
            if os.path.exists(path+os.path.sep+prg):
                progs[prg] = path+os.path.sep+prg
            elif os.path.exists(path+os.path.sep+prg + '.exe'):
                # BEGIN Edited by Chat to add " to the path namew with spaces
                prog_path = path+os.path.sep+prg + '.exe'
                if (" " in prog_path):
                    prog_path = '"' + prog_path + '"'
                progs[prg] = prog_path
                # END Edited by Chat to add " to the path namew with spaces
    return progs

Original issue reported on code.google.com by omn...@gmail.com on 22 Jan 2008 at 6:52

GoogleCodeExporter commented 9 years ago
Should be fixed in pydot 1.0.2

Original comment by ero.carr...@gmail.com on 14 Feb 2008 at 10:04