DOS Python

Hans Nowak ivnowa at hvision.nl
Thu Oct 7 12:29:41 EDT 1999


On 6 Oct 99, Nolan Darilek wrote:

> Just a completely random question:
> 
> How much of the standard Unixish features does the DOS version of
> Python support? I don't use DOS, but it might be kinda neat to say
> that my software runs on everything from DOS to Linux. And, if it
> doesn't, no big deal; I'm merely curious if all of the standard
> libraries, or at least a large subset, are supported.

Let's see. Most of the standard libraries are supported... except for 
those that only make sense in a Unix environment, like mailbox 
specific thingies, etc. 

It has modules like crypt, curses, fcntl, gdbm, grp, pwd and termios 
built in. 

Due to the nature of DOS, Python-DX does not have threads, so any 
modules depending on that won't work. GUI stuff (Tkinter) obviously 
won't work either. There is a socket module, which works... in some 
cases. It is known to work for getting and sending mail, other 
features are not supported.

Then there are some "look and feel" things, which are more Unixish 
than Windows-ish, like exiting with Ctrl-D (rather than Ctrl-Z), 
using '/' as a path separator (rather than '\'), os.path is posixpath 
(rather than ntpath), etc), and incidental features, like a working 
os.popen() function.

The main reason it's close to Unix is that I compiled it with DJGPP, 
which is a DOS port of gcc, and it brings a lot of Unixish behavior 
with it. 

I can say that most Python code works, unless they're using GUI or 
networking stuff. (Since I am currently writing code which does use 
that, I'm using the Windows version now. :-) DOS can't do everything, 
but in spite of its limitations I think Python-DX is quite an 
acceptable Python.

--Hans Nowak (zephyrfalcon at hvision.nl)
Homepage: http://fly.to/zephyrfalcon
Python Snippets: http://tor.dhs.org/~zephyrfalcon/snippets/
The Purple Kookaburra Forum: http://www.delphi.com/kookaburra/




More information about the Python-list mailing list