how to create .bat file to run sikuli script , program language is python

Asked by Ju1+i-我. on 2018-01-11

hi ,all
here is my code:

    def subMain(self):
        fName = 'proc'
        #print detailed error log information
        logMsg = 'Class[%(cName)s] Function[%(fName)s] is start.' %{'cName': self.CNAME, 'fName': fName}
        self.mylog.write_log("subMain start")
        #execute function
        SikuliBaseClass.stepExecute(self, self.getParameter)
        SikuliBaseClass.stepExecute(self, self.copyWorkFile)
        SikuliBaseClass.stepExecute(self, self.renameFile)
        SikuliBaseClass.stepExecute(self, self.updTime)
        SikuliBaseClass.stepExecute(self, self.openSAP)
        SikuliBaseClass.stepExecute(self, self.sMICM)
        SikuliBaseClass.stepExecute(self, self.dbADmin)
        #print detailed error log information
        logMsg = 'Class[%(cName)s] Function[%(fName)s] is end.' %{'cName': self.CNAME, 'fName': fName}
        self.mylog.write_log("subMain end")

    # 終了関数
    #fixed code
    def end(self):
        fName = 'end'
        #print detailed error log information
        logMsg = 'Class[%(cName)s] Function[%(fName)s] is start.' %{'cName': self.CNAME, 'fName': fName}
        self.mylog.write_log(logMsg)
        #print detailed error log information
        logMsg = 'Class[%(cName)s] Function[%(fName)s] is end.' %{'cName': self.CNAME, 'fName': fName}
        self.mylog.write_log(logMsg)

task = testforNWP()
task.subMain()

now i want to run this script in bat, could you please tell me how to do it ?
thank you so much

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
Ju1+i-我.
Solved:
2018-01-11
Last query:
2018-01-11
Last reply:
2018-01-11
Ju1+i-我. (1ju2+i-a.) said : #2

thank you so much