← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #264180]: how to import a file in other file between middle of the code

 

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

    Status: Answered => Open

manisha is still having a problem:
Apologies from my side, You are the right.
I have tried it but I got an error like below:

[error] Error message: Traceback (most recent call last):
 File "C:\DOCUME~1\kartheek.m\LOCALS~1\Temp\sikuli-tmp8900339240024860525.py", line 2, in 
 import MSTSC_SIM
 File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\SikuliImporter.py", line 45, in load_module
 File "C:\Program Files\Sikuli X\sikuli-script.jar\Lib\sikuli\SikuliImporter.py", line 29, in _load_module
ImportError: Errors in loading sikuli module: MSTSC_SIM
'with' will become a reserved keyword in Python 2.6 (MSTSC_SIM.py, line 62)
 - HOW TO FIX? Try adding "from sikuli import *" in the module.

and it is showing error on "import MSTSC_SIM"

my updated code is:

#######Main.sikuli
import csv
import MSTSC_SIM
reload(MSTSC_SIM)
from MSTSC_SIM import *

if ((scnName == "general") & (stpTest == "STP-GPSBL-002")): #checking the condition
    print "Done"
    startMstsc(1)
else:
    popup ("complete")

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