Short form of file names
mikle at tomsk.net
Sat Jul 7 04:40:43 CEST 2001
Saturday, July 07, 2001, 2:42:25 AM, you wrote:
> Skip Montanaro <skip at pobox.com> writes:
>> Mikhail> Is there some Python module for converting Windows long paths
>> Mikhail> to short form, i.e. 8.3? os.path.normpath() does not do this..
>> Try importing dospath directly:
>> >>> import dospath
>> >>> dospath.normpath("/supercalifragilisticexpealidocious.py")
> Yeah, but shouldn't it return '\\superca~1.py' ? I believe the
> algorithm to produce the ~1 part is dependent on what else is in the
> same directory. I guess the ActiveState win32 modules hide an API
> somewhere that gets this information directly from the filesystem.
Yes, I think so too. I just wanted to know if someone already wrote
such pyd calling appropriate Win32 API function. Actually my problem
is the bug in os.chdir() function - it does not work with long
filenames under Win9x. :(
I'll create pyd myself. Well, thanks to all for responses!
More information about the Python-list