Mailing List Archive

how to access ports ?
Well, how do I access arbitrary ports?
I managed to read and write to serial ports easy, but I would like to access
an mca card at addresses 0x220 - 0x31f.
I checked the docs but did not see any reference to hardware access - or did
I not look in the right places?

Thanks for any hints.


Rolf
how to access ports ? [ In reply to ]
On 23 Jul 1999 r.skowronek@fz-juelich.de wrote:
> Well, how do I access arbitrary ports?
> I managed to read and write to serial ports easy, but I would like to access
> an mca card at addresses 0x220 - 0x31f.
> I checked the docs but did not see any reference to hardware access - or did
> I not look in the right places?

Hardware access is too hardware/software/OS dependent, generic langauage
like Python cannot handle it in portable way.
If you can program in C, and if you agree to learn "Python Extending and
Embedding" - write extension module for your particular task in C.

> Thanks for any hints.
>
> Rolf

Oleg.
----
Oleg Broytmann Netskate/Inter.Net.Ru phd@emerald.netskate.ru
Programmers don't die, they just GOSUB without RETURN.
how to access ports ? [ In reply to ]
Oleg Broytmann wrote:
>
> On 23 Jul 1999 r.skowronek@fz-juelich.de wrote:
> > Well, how do I access arbitrary ports?
> > I managed to read and write to serial ports easy, but I would like to access
> > an mca card at addresses 0x220 - 0x31f.
> > I checked the docs but did not see any reference to hardware access - or did
> > I not look in the right places?
>
> Hardware access is too hardware/software/OS dependent, generic langauage
> like Python cannot handle it in portable way.
> If you can program in C, and if you agree to learn "Python Extending and
> Embedding" - write extension module for your particular task in C.
>


That said, if you're using Windows check out the following qoute from
http://www.python.org/windows/

"(Many people find the Serial-IO module for Python under windows to be
very useful -
you can find it in the System utilities contrib dir, as sio-151.zip, or
the older
siomodule.zip for Python 1.4.)"

You may have to write your own extension for other platforms (though I
would be surprised if no one else has tried to "scratch this itch"
before).

--Paul