Win32: shortpathname to longpathname

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Tue May 8 21:21:00 EDT 2007


En Tue, 08 May 2007 21:04:50 -0300, Jim Tittsler <jtittsler at gmail.com>  
escribió:

> I wrap my cross platform application up with py2exe on Windows, and
> have the installer associate a particular file type with it.  When a
> user double clicks on a document to launch my application, Windows
> appears to pass me the "short" Windows pathname.  How can I convert to
> the long version of the pathname?  (Ideally using the standard library
> rather than win32all AKA pywin32.)

You want GetLongPathName:  
http://msdn2.microsoft.com/en-us/library/aa364980.aspx
It's not directly available on the standard library; you can either use  
win32api.GetLongPathName or call it using ctypes.

-- 
Gabriel Genellina




More information about the Python-list mailing list