I'm trying to execute "dot" (a graph drawer thing from www.graphviz.org)
form IronPython. Here is my code:

import clr
clr.AddReference('System.Core')import System
clr.ImportExtensions(System.Reflection)
clr.ImportExtensions(System.Diagnostics)from System.Diagnostics import
Processfrom System.Reflection import Assemblyfrom System.IO import *
if __name__ == "__main__":

    p = Process()
    p.StartInfo.UseShellExecute = False
    p.StartInfo.RedirectStandardOutput = True
    p.StartInfo.WorkingDirectory  = "C:\\kod\\"
    p.StartInfo.FileName = 'dot'
    p.StartInfo.Arguments = '-Tgif uj.gv -o mamammikasza.gif'
    p.Start()
    p.WaitForExit()
    egyString = p.StandardOutput.ReadToEnd()
    print egyString
    print p.ExitCode

In my test project works fine. I copied to my real project (after all I
commented everything in main.py, only the this code remained) and gives me
this

exceptions.WindowsError occurredMessage: [Errno 22] The system cannot
find the file specified

at p.Start() Please help. I'm using VS 2010, .NET 4.0 IronPython (2.7.3
(2.7.0.40))

The "dot" was installed form msi provided by graphvis, and work fine from
everywhere.
_______________________________________________
Ironpython-users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to