DOS Python

Hans Nowak ivnowa at hvision.nl
Fri Oct 8 04:36:57 EDT 1999


On 7 Oct 99, at 13:00, William Tanksley wrote:

> >> Great.  I'll do that right away, if I can find an .arj extractor.
> >> Speaking of which, is there any particular reason why you used .zip for
> >> the executable and .arj for the (required) libraries?
> 
> >That's more for hysterical raisins; I wrote a script which packs a 
> >directory and all its subdirectories in an arj file; I did not manage 
> >to do so for zip files (back then, that is :).
> 
> pkzip -ad ?  It's part of the zip command set.

I suppose so; I never liked pkzip much, I preferred other (often more 
obscure) archivers like rar, ace, and jar. :)

> But anyhow, this still isn't working for me, and I'm slamming up against
> a nasty deadline.  The problem is that I have to run this under pure DOS,
> and I _must_ call an external program.  When I do "import os" under wpy,
> it tells me that there's no such module.
> 
> The PythonDX library has long file names, which aren't supported under DOS.

If you unpack them with arj, the name should be sliced off to 8.3 
format. Not the ugly tilde notation, mind you; exceptions.py will 
become exceptio.py rather than except~1.py. You should be able to do 
'import exceptions' and it still finds them. (It should, anyway)

Don't forget to set your PYTHONPATH variable correctly, of course, 
and since this is DOS, setting the PYTHONCASEOK variable will help a 
lot too. In fact, if you have a file called OS.PY in DOS (rather than 
os.py), Python might not find it unless you do a SET PYTHONCASEOK=1. 

The Python source is Unix-based and making it work correctly on a 
case-insensitive, 8.3-filename based OS takes a few tricks. 

> arj appears to have two options for truncating the long file names.  Which
> of them should I use?

Hmmz, I just do arj x archive.arj -y and it doesn't ask me any 
questions... 

> >> Okay, this will clearly take some more work.  It seems that the arj
> >> program doesn't support long file names, but the arj archive includes
> >> them.  (How'd you manage that?)
> 
> >Oh it does, if you have the right version. Here's one:
> >http://www.cuci.nl/~hnowak/stuff/Arj.exe
> >I believe this link *is* on my site somewhere. :-)
> 
> Not that I could find.  You don't suppose that you could zip the archive up,
> do you?

I could use WinZip. ;-) 

> That'd be convenient.  Of course, I already have ARJ and so on, but for other
> people -- and perhaps for me as well.
> 
> I'm in a world of hurt.  I hope someone can fix this!

Aww... I'll see what I can do...


--Hans Nowak (ivnowa at hvision.nl)
Homepage: http://fly.to/zephyrfalcon
Snippets: http://tor.dhs.org/~zephyrfalcon/snippets/




More information about the Python-list mailing list