[Tutor] Importing serial module

Alan G alan.gauld at freenet.co.uk
Mon Aug 22 09:18:18 CEST 2005

>ImportError: No module named win32file
>   Is there something else that I need to specify?

Do you have the winall package installed? Its a separate download
to the official Python package or comes prebundled in the
ActiveState version of Python.

> 2) I want to send data (ascii text) to a serial port, but at the 
> same
> time want to keep monitoring incoming data in that same serial port.
> Whats the best approach to do this? Multithreading?

Multithreading will work but for a serial port you might be easier
just to create a loop that reads/writes alternately. Just read and
write faitrly small blocks of data and it should seem to function
concurrently. If you can't do that then threads are your next best

Alternatively write two programs and join them via a common UI
program using popen or subprocess...

Alan g 

More information about the Tutor mailing list