Hello everyone,

I'm trying make a the Simple Game program with GUI using wxPython. I used multiprocessing library in Python version 3.4. But, wx.CallLater Class doesn't work in subprocess.

classLOCthink(object):
    def__init__(self):
        super(LOCthink,self).__init__()

    defengine_think(self,queue_send,queue_command):

        importwx

        self.queue_command = queue_command
        self.queue_send = queue_send
        self.coord =0

        self.command = wx.CallLater(100,self.command_process)

    defcommand_process(self):
        fordummyinrange(10):
            self.queue_send.put_nowait(str(dummy))
        self.command.Start(100)

When I start Process at 'engine_think' function, then error occur with this message,

    self.command = wx.CallLater(100, self.command_process)
AttributeError: 'function' object has no attribute 'command_process'

In main process, I use same wx.CallAfter class and it works.
Is wx.CallLater not be able to use in subprocess? or I write wrong code in this class?

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to