Curt, Thanks for the suggestion. I believe you are right. I no longer get the error message, but the command itself is not successful. Is there any other way in IronPython to run commands ?
Cheers, Jackie From: Curt Hagenlocher [mailto:[email protected]] Sent: Tuesday, December 18, 2012 4:03 PM To: Jackie Sproat Subject: Re: [Ironpython-users] Using System.Diagnostics.Process results in Errno 22 I believe StartInfo.FileName really needs to be a file name, and not a command line. Set it to java.exe and put everything else into Arguments. On Tue, Dec 18, 2012 at 1:54 PM, Jackie Sproat <[email protected]<mailto:[email protected]>> wrote: Using python I have no problem starting my process with subprocess.Popen('java -jar "C:\Program Files (x86)\Sikuli X\sikuli-script.jar" ' + finalname, shell=True) But, because the select module is not available, you can't use the subprocess module in IronPython. So, I have to use System.Diagnostics.Process instead. However, using this with IronPython, results in Errno 22: The system cannot find the file specified... file_name = 'java -jar "C:\Program Files\Sikuli X\sikuli-script.jar" ' file_name = "\"" + file_name + "\"" try: p = Process() p.StartInfo.UseShellExecute = True p.StartInfo.RedirectStandardOutput = False p.StartInfo.FileName = file_name print p.StartInfo.FileName p.StartInfo.Arguments = arg_file print p.StartInfo.Arguments p.StartInfo.WorkingDirectory = cwd_is p.Start() Any suggestions greatly appreciated. Cheers, Jackie _______________________________________________ Ironpython-users mailing list [email protected]<mailto:[email protected]> http://mail.python.org/mailman/listinfo/ironpython-users
_______________________________________________ Ironpython-users mailing list [email protected] http://mail.python.org/mailman/listinfo/ironpython-users
