← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #185801]: Start a file on Windows

 

Question #185801 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/185801

    Status: Open => Answered

RaiMan proposed the following answer:
Sikuli is "only" Python language. But the Interpreter internally used is
Jython 2.5.2, which corresponds to Python's language level 2.5.

Since Jython is Java based, some system dependent features (especially
those that are only accessible in a C-based API), may not be implemented
in Jython at all or differ in functionality.

os.startfile() does not exist at all in Jython.

You might try to submit a Windows start command with appropriate
parameters (I am sure you will find out yourself ;-) using os.popen():

import os
cmd = r'start "path-to-some-file"'
os.popen(cmd)

The above string setup for cmd is the one most flexible, since you can
insert apostrophes and \ without escaping.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.