Python-DX |
:: Email ::
Download area
|
What is Python-DX?Long ago, in a galaxy far, far away... I compiled my own Python executable for MS-DOS. The result was called Python-DX and incorporated some features I missed in Python, but that were common in DOS compilers, like direct screen access, memory management, interrupt calls, etc. It was not very complete, and shortly after that I started using the Windows version, so it didn't get the chance to mature much. Occasionally, I still get requests from people looking for Python-DX. Apparently it's still mentioned in some places on the Net (and some people still use DOS). Unfortunately, all I have is a few executables of pre-2.0 Pythons. I tinkered with Python-DX in 1997-99, so the Python 2.x series was not involved. Also, in 2001 I moved to the US, and I had to leave much behind. As a result, I have no documentation and no source code. The executablesI uploaded a file
Python 1.5.2 (#21, Apr 14 1999, 22:19:01) [GCC 2.7.2] on ms-dos7 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> import _conio >>> dir(_conio) ['__doc__', '__name__', 'blinkvideo', 'clreol', 'clrscr', 'delline', 'error', 'g etch', 'gettextinfo', 'gotoxy', 'hidecursor', 'insline', 'intensevideo', 'printf ', 'showcursor', 'textbackground', 'textcolor', 'ungetch', 'wherex', 'wherey', ' window'] >>> _conio.getch() # wait for keystroke 97 >>> Python-DX has a number of custom modules. To see them, inspect sys.builtin_module_names: >>> import sys
>>> sys.builtin_module_names
('__builtin__', '__main__', '_conio', '_dos', '_graph', '_locale', '_pc', '_sb',
'array', 'avl', 'binascii', 'cPickle', 'cStringIO', 'cd', 'cmath', 'crypt', 'cu
rses', 'errno', 'fcntl', 'gdbm', 'grp', 'guibase', 'hirestimer', 'imp', 'kjbucke
ts', 'marshal', 'math', 'md5', 'memory', 'multiarray', 'mxDateTime', 'mxTextTool
s', 'mxTools', 'new', 'operator', 'parser', 'pcre', 'posix', 'pwd', 'rand', 'rea
dline', 'regex', 'reop', 'resource', 'rotor', 'saml1', 'select', 'sha', 'signal'
, 'socket', 'strop', 'struct', 'sys', 'termios', 'time', 'timing', 'xmap', 'zlib
')
>>>
The number of extra modules was cool for that time...
Python 1.5.2 (#4, Apr 14 1999, 21:03:54) [GCC 2.7.2] on ms-dos7
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import sys
>>> sys.builtin_module_names
('__builtin__', '__main__', 'array', 'binascii', 'cPickle', 'cStringIO', 'cmath'
, 'errno', 'fcntl', 'grp', 'imp', 'marshal', 'math', 'md5', 'new', 'operator', '
parser', 'pcre', 'posix', 'pwd', 'regex', 'rotor', 'select', 'sha', 'signal', 's
ocket', 'strop', 'struct', 'sys', 'time')
>>>
Finally, Python 1.5 (#59, Jan 30 1998, 15:00:00) [GCC 2.7.2] on ms-dos7
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import sys
>>> sys.builtin_module_names
('__builtin__', '__main__', '_pc', 'array', 'avl', 'binascii', 'cPickle', 'cStri
ngIO', 'cmath', 'conio', 'curses', 'dos', 'errno', 'fast_umath', 'fcntl', 'fftpa
ck', 'gdbm', 'imp', 'kjbuckets', 'lapack_lite', 'marshal', 'math', 'md5', 'memor
y', 'multiarray', 'mxDateTime', 'mxTools', 'new', 'operator', 'parser', 'pcre',
'posix', 'rand', 'ranlib', 'readline', 'regex', 'reop', 'rotor', 'select', 'sign
al', 'strop', 'struct', 'sys', 'time', 'timing', 'umath', 'zlib')
>>>
How to use itAs said, I have no access to any documentation, if it still exists at all. So, you're basically on your own here. If you want to use the executables, you'll have to experiment. However, I do remember a few things to get you started:
Do-it-yourselfWriting an extension module is not extremely easy, but it's not extremely difficult either. If I can do it, everyone can. So if these executables are not sufficient for your purposes, you may want to consider to roll your own DOS Python. You'll need a C compiler; I used DJGPP, which has the nice feature of being able to compile most Unix-oid modules (or at least it did back in the day, don't know how things are now). It is possible that other C compilers work too, although I never could get them to compile Python. Good luck... :-} Links
|