cudadog / pydot

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

Invalid command line generated when extra parameters specified #68

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Generate any graph structure
2. Call the write function with a list as the parameter, using more than one 
value in the list. For example :
graph.write_svg(somefile, prog=['twopi', 'overlap=scale'])

Expected : The graph is generated using the extra settings specified
Actual : The library raises an error saying that the command line was invalid 
(with the example above : "InvocationException: Program terminated with status: 
2. stderr follows: Error: twopi: can't open overlap=scale")

Pydot-1.0.28-py2.7, on windows 7 x64

I think the bogus line is line 1985 :
cmdline = [self.progs[prog], '-T'+format, tmp_name] + args

The error is that the args list is appended at the end of the command list, 
while they should be placed between the -T and input elements (the rule being 
that the input files must be placed at the end of the command)

Original issue reported on code.google.com by xrogerma...@gmail.com on 8 Mar 2012 at 6:21

GoogleCodeExporter commented 9 years ago
Also the write_<format> function does not honour the program set using set_prog.

Original comment by himanshu...@gmail.com on 27 Mar 2012 at 10:53

GoogleCodeExporter commented 9 years ago
The correct form of attributes passed through the command line is, according to 
the manual pages:

  -(G|N|E)name=value

Hence, the following line works:

  graph.write_svg(somefile, prog=['twopi', '-Goverlap=scale'])

The issue in the comment is valid and will be fixed.

Original comment by ero.carr...@gmail.com on 26 Jun 2012 at 10:02