Reading data from an ISA port

Diez B. Roggisch deets at
Tue Jul 24 00:09:46 CEST 2007

Gabriel Dragffy schrieb:
> Dear list members
> I must admit I am a new user of Python, but it is a language that I 
> enjoy using.
> For one of my university projects I need to write a program that can 
> read several bytes from an ISA port. It has been suggested to me that I 
> look at using C or Pyinline. If I can I would prefer to continue to use 
> Python, and Pyinline won't play ball.
> I am sure Python can do this for me, but the question is how? What 
> modules and code do I need to look? I'd be very grateful for any 
> suggestions and advice.

Python as-is won't help. It has no concept of memory addresses and 
direct access to them. However, a trivial C-extension together with the 
struct and/or ctypes module will help.

What you essentially need to code is a C-extension that will allow you 
to directly access memory. Wrap that either in an extension or using ctypes.


More information about the Python-list mailing list