sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02813
Re: [Question #157247]: How to search for an image with dynamic text
Question #157247 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/157247
Status: Open => Answered
RaiMan proposed the following answer:
For things regarding the file system, it is much easier to use the
features provided by Python in the modules os, os.path and shutil.
e.g. check, wether a directory exists and make it, if it is not there:
import os
baseDir = r'c:\path-to-working-dir'
newDir = "newDir"
makeDir = os.path.join(baseDir, newDir)
if not os.path.exists(makeDir)
os.mkdir(makeDir)
After this you can be sure, that the new directory exists, if you got no
error.
modul os: http://docs.python.org/library/os.html#module-os
modul os.path: http://docs.python.org/library/os.path.html
modul shutil: http://docs.python.org/library/shutil.html#module-shutil
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.