Python commands

Paul Dexter dextech at terrigal.net.au
Thu Apr 3 06:37:26 CEST 2003


    Hi all,
                I have just discovered Python and I was wondering if anyone
could help me find an equivalent command in Python for the "OUT" and "INP"
commands in Qbasic. I wish to convert a Qbasic program to Python.
    The following snippet is an example of the task I wish to perform;

base0 = &H378:

interface:
OUT base0, &HA0
OUT base0, &H80
OUT base0 + 2, &H8

V = (INP(base0 + 1) AND &H10) * &H8

    The base address is 378 (lpt) and the "interface" subroutine outputs
data to the port (378) and "V" is the input data statement I have used. I
also use the "GETKEY", "LOCATE" and "DRAW" commands in Qbasic

    Does anyone know how to perform the same tasks/commands in Python or are
they even available. I have come across other Basic computer language
variations that do not support the commands I require.

    Thankyou for any help,
                                        Paul








More information about the Python-list mailing list