Python on the AS/400?

Karl Hanson kchanson at us.ibm.com
Tue Apr 3 16:35:39 EDT 2001


Kragen Sitaker wrote:
> 
> In article <9ac4de$24k$1 at merck.com>,
> Paul Nicolay <paIulHATE_nicSPAMolay at merck.com> wrote:
> >I'll try to answer your questions...
> >
> >1. The AS/400 is indeed a reasonable platform (and scales way beyond what
> >others offer) to have network servers running, the question is however is
> >Python the best environment to write them in (which I doubt seriously) ?
> 
> I suppose it depends on the particular network server.  (Unless you
> mean "Python on the AS/400", in which case I share your serious
> doubts.)
> 
> So how do you do event-driven I/O on OS/400?
> 
> Unix assigns a small process-local integer to each I/O stream called a
> "file descriptor"; there's a system call called 'select' to which you
> pass three bitvectors: one with bits set at indices of file descriptors
> you want to be notified of readability on, one with bits set at indices
> of file descriptors you want to be notified of writability on, and wone
> with bits set at indices of file descriptors you want to be notified of
> "exceptional conditions" on.  You also pass a timeout.  When the
> timeout expires, or when one or more of the events you've requested
> notification of happens, select() returns, having cleared all the bits
> in these bitvectors that correspond to events that didn't happen ---
> leaving only the bits set that correspond to events that did happen.
> 
 <snip>

This may not be related, but there is a select() Sockets API.. for
details go here:
http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/index.htm?info/apis/aplist.htm

Select UNIX-Type, then Sockets APIs.

-- 

Karl Hanson



More information about the Python-list mailing list