[Tutor] windows and filenames

Paul Sidorsky paulsid@shaw.ca
Thu, 25 Apr 2002 22:25:39 -0600


"Ian!" wrote:

> Does anyone know of a way I can look up the full path-name, given the
> truncated pathname? I've tried setting and getting the path with os., but
> that doesn't change it.
> 
> Alternately, is anyone good with windows? The right-click menu calls:
> cmd.exe /c "f:\nerd stuff\clipurl.py" %1
> 
> where clipurl.py is the script. Is there a way I could make it pass the
> correct path, instead of the windows-style truncated path?

Yeah this is a Windows quirk, it happens with anything.  You probably
will have to use the Python win32 extensions to call the Windows API
function GetFullPathName().  I'm not sure if there's any way to get
Python to do this for you.

-- 
======================================================================
Paul Sidorsky                                          Calgary, Canada
paulsid@shaw.ca                        http://members.shaw.ca/paulsid/