[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gulliver] Python et la gestion des signaux
|
From |
plaunay1 <pierre dot launay at ac-rennes dot fr> |
|
Subject |
Re: [gulliver] Python et la gestion des signaux |
|
Date |
Tue, 22 Apr 2008 15:01:39 +0200 |
Je cherchais comment faire un évenement avec la liaison série et la
réponse était devant mes yeux dans les exemples de pyserial :
/usr/share/doc/python-serial/examples/wxTerminal.py
# Create an own event type, so that GUI updates can be delegated
# this is required as on some platforms only the main thread can
# access the GUI without crashing. wxMutexGuiEnter/wxMutexGuiLeave
# could be used too, but an event is more elegant.
SERIALRX = wxNewEventType()
# bind to serial data receive events
EVT_SERIALRX = wxPyEventBinder(SERIALRX, 0) ...
Pour WxPython comme le prévoyait François de Liberlab
# I plan to rewrite this app using the liberlab module and WxPython
(j'ai pris la dernière version et c'est toujours pas fait)
Avis au amateur pour refaire liberlab sans Time avec des classes et sans
les lignes de Global
global ready, valuelength, adcchoice1, adcchoice2, adcchoice3,
adcchoice4, adcchoice5, adcchoice6, t1, t0
global tension1, tension2, tension3, tension4, physValue1;
physValue2, physValue3, physValue4, formula1, formula2, formula3, formula4
global physShow1, physShow2, physShow3, physShow4, resolution1,
resolution2, resolution3, resolution4 ...
Pierre