Thanks for the suggestion - I tried both solutions but, neither one of them 
solves the problem.
System.Diagnostics.Process seems to only work if you want to launch an .exe 
with given arguments

-----Original Message-----
From: Jeff Hardy [mailto:[email protected]] 
Sent: Tuesday, December 18, 2012 4:23 PM
To: Jackie Sproat
Cc: [email protected]
Subject: Re: [Ironpython-users] Using System.Diagnostics.Process results in 
Errno 22

On Tue, Dec 18, 2012 at 1:54 PM, Jackie Sproat <[email protected]> 
wrote:
> 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" '

My guess is the backslashes are causing problems. You have two options:

1) Escape the backslashes:
    file_name = 'java -jar "C:\\Program Files\\Sikuli X\\sikuli-script.jar" '

2) Use a raw string, which disables backslash escapes (also useful for regexes):
    file_name = r'java -jar "C:\Program Files\Sikuli X\sikuli-script.jar" '

- Jeff


_______________________________________________
Ironpython-users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/ironpython-users

Reply via email to