sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #00188
Re: [Question #138472]: Trying to use system path for sikuli script and import it in other scripts.
Question #138472 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/138472
Status: Open => Answered
RaiMan proposed the following answer:
@Anshu
--- 1.
when an "import myLib" works, an "from myLib import *" always works too. the only difference is, that in the first case you have to qualify everything with myLib.someFunction(), whereas in the second case, this is not needed. Just use the plain names contained in myLib. In the second case you are responsible yourself, to avoid naming conflicts between main script and imported scripts.
--- 2. The libs folder contains the native libraries. It is not
recommended to put anything else there.
--- 3. The folder Lib (it might not be there, just create it in this
case) is already in sys.path (as you can see in the above listing). So
if you use this folder to store your libraries, there would be no need
to care about sys.path. Only import would be needed.
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.