Esempio n. 1
0
 def func(self):
     caller = self.caller
     if caller.ndb.batch_batchmode == "batch_code":
         BATCHCODE.parse_file(caller.ndb.batch_pythonpath)
     else:
         BATCHCMD.parse_file(caller.ndb.batch_pythonpath)
     caller.ndb.batch_stackptr = 0
     caller.msg(format_code("File reloaded. Restarting from top."))
     show_curr(caller)
Esempio n. 2
0
 def func(self):
     caller = self.caller
     if caller.ndb.batch_batchmode == "batch_code":
         BATCHCODE.parse_file(caller.ndb.batch_pythonpath)
     else:
         BATCHCMD.parse_file(caller.ndb.batch_pythonpath)
     caller.ndb.batch_stackptr = 0
     caller.msg(format_code("File reloaded. Restarting from top."))
     show_curr(caller)
Esempio n. 3
0
 def func(self):
     caller = self.caller
     if caller.ndb.batch_batchmode == "batch_code":
         new_data = BATCHCODE.parse_file(caller.ndb.batch_pythonpath)
     else:
         new_data = BATCHCMD.parse_file(caller.ndb.batch_pythonpath)
     caller.ndb.batch_stack = new_data
     caller.msg(format_code("File reloaded. Staying on same command."))
     show_curr(caller)
Esempio n. 4
0
 def func(self):
     caller = self.caller
     if caller.ndb.batch_batchmode == "batch_code":
         new_data = BATCHCODE.parse_file(caller.ndb.batch_pythonpath)
     else:
         new_data = BATCHCMD.parse_file(caller.ndb.batch_pythonpath)
     caller.ndb.batch_stack = new_data
     caller.msg(format_code("File reloaded. Staying on same command."))
     show_curr(caller)
Esempio n. 5
0
    def func(self):
        "Starts the processor."

        caller = self.caller

        args = self.args
        if not args:
            caller.msg("Usage: @batchcommands[/interactive] <path.to.file>")
            return
        python_path = self.args

        #parse indata file

        try:
            commands = BATCHCMD.parse_file(python_path)
        except UnicodeDecodeError, err:
            caller.msg(_UTF8_ERROR % (python_path, err))
            return
Esempio n. 6
0
    def func(self):
        "Starts the processor."

        caller = self.caller

        args = self.args
        if not args:
            caller.msg("Usage: @batchcommands[/interactive] <path.to.file>")
            return
        python_path = self.args

        #parse indata file

        try:
            commands = BATCHCMD.parse_file(python_path)
        except UnicodeDecodeError, err:
            caller.msg(_UTF8_ERROR % (python_path, err))
            return