Bios calls in Python?

Martin Bless m.bless at gmx.de
Thu Jun 7 22:01:29 CEST 2001


[mb]
>> What about DOS calls?
>> I know the DOS interrupt "get truename of a file" still exists, and
>> that's exactly what I'm looking for. (In case of substituted drives).
>> But I don't know how to call from Python.

[Dr. Faustus]

>>This will only work on 95/98/Me.  It will not work on NT/2K/XP.

Are you sure? Does that mean my oh so very important dos application
(no joke) won't run with XP any more?

>There is definitely a Win32 API call that will do this on all those
>platforms.

Ha, I'd love to see it!

>Depending on exactly what you want, this is probably
>GetFullPathName, which is wrapped in the win32api library.

Unfortunately IT'S NOT GetFullPathName. The business is not expanding
from relative to absolute, like in:
   win32api.GetFullPathName('m:\\')  ->  'm:\\'

but from substituted to unsubstituted:
   rem Working dos example:
   m:>truename  m:\x.bat     ->  c:\somewhere\x.bat

It's a pity I don't have it. The idea is to have something like
os.samefile() on the windows platform. I'd like to prevent accidental
overwriting of files.

So the questions is still open.

Martin



More information about the Python-list mailing list