CVS: nondist/sandbox/dallasj/Gnosis/lib/Gnosis GnosisGUI.py,1.2,1.3
"Dallas T. Johnston" <[email protected]> Fri, 08 Nov 2002 04:04:37 -0800
| Newsgroups | gmane.comp.python.anygui.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/anygui/nondist/sandbox/dallasj/Gnosis/lib/Gnosis
In directory usw-pr-cvs1:/tmp/cvs-serv10174/Gnosis/lib/Gnosis
Modified Files:
GnosisGUI.py
Log Message:
Now uses multiple threads for request...
Index: GnosisGUI.py
===================================================================
RCS file: /cvsroot/anygui/nondist/sandbox/dallasj/Gnosis/lib/Gnosis/GnosisGUI.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** GnosisGUI.py 6 Jan 2002 07:03:02 -0000 1.2
--- GnosisGUI.py 8 Nov 2002 12:04:35 -0000 1.3
***************
*** 1,4 ****
--- 1,5 ----
from anygui import *
from Gnosis import Gnosis
+ from thread import start_new_thread
lbx = None
***************
*** 10,17 ****
actions = {0: gn.GetWebSearchInfo, 1: gn.GetDefinition, 2: gn.GetSynonyms, 3: gn.GetEncyclopediaInfo}
! def send_query(**kwds):
! global lbx, txf, txa, actions
txa.text = actions[lbx.selection](txf.text)
!
def main():
--- 11,20 ----
actions = {0: gn.GetWebSearchInfo, 1: gn.GetDefinition, 2: gn.GetSynonyms, 3: gn.GetEncyclopediaInfo}
! def query(lbx, txf, txa, actions):
txa.text = actions[lbx.selection](txf.text)
!
! def send_query(event):
! global lbx, txf, txa, actions
! start_new_thread(query, (lbx, txf, txa, actions))
def main():
***************
*** 39,41 ****
if __name__=='__main__':
main()
!
\ No newline at end of file
--- 42,44 ----
if __name__=='__main__':
main()
!
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en