コード例 #1
0
ファイル: robo_sim.py プロジェクト: jblee123/RoboSim_python
class RoboSim:
    def __init__( self ):
        self.console = Console( parent=Tkinter.Tk(), app_instance=self )

        self.shutting_down = false

        self.simulator = Simulator( app_instance=self )

        self.environment = Environment()

        self.communicator = ConsoleComm( app_instance=self )
        self.communicator.open()
        self.communicator.check_for_msgs()

    def run_mainloop( self ):
        self.console.mainloop()

    def killapp( self ):
        sys.exit( -1 )

    def set_environment( self, env ):
        self.environment = env
        self.console.update_environment( env )

    def exit_robo_sim( self ):
        self.console.destroy()
        sys.exit()

    def initiate_shutdown( self ):
        self.shutting_down = true
        self.communicator.send_killall()
        self.console.after( 1000, self.exit_robo_sim )
コード例 #2
0
ファイル: robo_sim.py プロジェクト: jblee123/RoboSim_python
class RoboSim:
    def __init__(self):
        self.console = Console(parent=Tkinter.Tk(), app_instance=self)

        self.shutting_down = false

        self.simulator = Simulator(app_instance=self)

        self.environment = Environment()

        self.communicator = ConsoleComm(app_instance=self)
        self.communicator.open()
        self.communicator.check_for_msgs()

    def run_mainloop(self):
        self.console.mainloop()

    def killapp(self):
        sys.exit(-1)

    def set_environment(self, env):
        self.environment = env
        self.console.update_environment(env)

    def exit_robo_sim(self):
        self.console.destroy()
        sys.exit()

    def initiate_shutdown(self):
        self.shutting_down = true
        self.communicator.send_killall()
        self.console.after(1000, self.exit_robo_sim)