Should I use Python for these programs?

Nick Craig-Wood nick at craig-wood.com
Tue Jul 10 09:30:03 EDT 2007


CC <crobc at BOGUS.sbcglobal.net> wrote:
>  I have considerable C and assembly language experience.  However, these 
>  are mostly on embedded microcontrollers since I moved away from PC 
>  programming all the way back in 1988 :-O
> 
>  I wish to accomplish a few PC programming tasks, and am considering to 
>  learn Python:
> 
>  1.  Develop a simple GUI program to run on Linux and Windows which can 
>  send parameters and small blocks of data to an embedded microcontroller 
>  device via RS-232 or USB.  Also display simple data (probably single 
>  numbers) sent from the device.
> 
>  Note, if it is USB, then the client will be implemented by me using FTDI 
>  chips that appear to the PC as a serial port.

No problems - pyserial, wxPython work fine cross platform. You can
also use libusb from python from windows and linux also for low level
USB stuff.  I've managed to use all those things successfully.

>  I would prefer to be able to write a program that is cross-platform 
>  between Linux and Windows.  I realize this might be especially 
>  problematic with the serial comms.

On the contrary, pyserial does a very good job of abstracting the
serial port away.

>  I am also confused by the plethora of Python GUI extensions, though 
>  Tkinter seems like a likely candidate.  I am uncertain if I will have 
>  difficulty learning how to use this if I don't know Tcl/Tk.

Use wxPython would be my advice.  tk is OK, but a bit clunky.  it does
have the advantage that it is built into the language though.

>  Do you think Python is the right language for these projects?

Yes!

-- 
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick



More information about the Python-list mailing list