[Pythonmac-SIG] two questions.....
Steve Spicklemire
steve@spvi.com
Wed, 22 Dec 1999 10:27:17 -0500 (EST)
Thanks for the help with sending keystrokes. Now I have two more problems. ;-)
1) Performance. My solution works.... very slowly. I have a MacPython frozen
application that uses ctb to monitor the serial port for incoming codes from
an IR remote control decoder I built. When it gets a code it converts it to
a 'key press' and sends it as an AppleEvent to AkuaSweets_InterfaceSweet. If you
have ideas about this... code is posted below.
2) Performance. Well.. this is more about my attempt to sort out (1).
I thought about building a module that doesn't use AppleEvents at all.
(I'm not sure that AppleEvents are the problem... but I need to get this
working of other reasons anyway...) I went out this morning and got the
latest stuff from CVS (Python and MacPython). When I try to build PythonCore.prj
I'm getting (CW5):
Link Error : export symbol '_PyImport_LoadDynamicModule' is undefined
Link Error : export symbol '__reopen' is undefined
Link Error : CFM68K_Startup.c: '__reopen' is undefined or is not an exportable object.
Link Error : CFM68K_Startup.c: '_PyImport_LoadDynamicModule' is undefined or is not an exportable object.
Link Error : venusMOS:Applications:Development:CWGUSI:src:GUSIMSLFile.cp: '__num_to_file' referenced from 'GUSISetupMSLSIOUX()' is undefined.
Link Error : venusMOS:Applications:Development:CWGUSI:src:GUSIMSLFile.cp: '__num_to_file' referenced from 'fwalk' is undefined.
Link Error : import.c: '_PyImport_DynLoadFiletab' referenced from '_PyImport_DynLoadFiletab' [DataPointer] is undefined.
What version of GUSI are folks using with these projects?
thanks!
-steve
P.S. For those still reading here are the relevant snippets of code:
....
class AkuaInterface(Akua_Interface_Sweets, Required_Suite.Required_Suite, \
Standard_Suite.Standard_Suite, aetools.TalkTo):
"""A class that can talk to Akua"""
pass
....
class macIR_App(FrameWork.Application):
"Application class for macIR.py"
....
def idle(self, event):
"Idle routine - process serial events.."
self.main_dialog.process()
class MyDialog(FrameWork.DialogWindow):
"Main dialog window for macIR"
def __init__(self, parent):
FrameWork.DialogWindow.__init__(self, parent)
self.ctbTool = ctb.CMNew('Serial Tool', None)
self.opened = 0
self.openSerial()
self.talker = AkuaInterface(SIGNATURE)
self.currentKeys = ''
....
def process(self):
""" we have time... process events..."""
self.ctbTool.Idle()
d, dummy = self.ctbTool.Read(1000, ctb.cmData, 1)
if d: # then process the code d.... and send it to self.talker
....
main()
anyway.... there is a significant delay after hitting the remote and getting a
keydown in the frontmost app. I'm wondering if there is any better way to get
'hit' with idle events. Any thoughts are appreciated.