win32+popen4

Robin Becker robin at jessikat.fsnet.co.uk
Fri Mar 1 09:54:22 EST 2002


In article <TsElcJAaB4f8EwQA at jessikat.demon.co.uk>, Robin Becker
<robin at jessikat.fsnet.co.uk> writes
>In article <a5ntnn$8t3dn$1 at ID-59885.news.dfncis.de>, Thomas Heller
><theller at python.net> writes
>.....
>>> Is there a proper way to get the 8.3 name?
>>
>>>>> import win32api
>>>>> win32api.FindFiles(r"c:\Program Files")
>>[(49, <PyTime:10/5/2000 9:34:56 AM>, <PyTime:3/1/2002 12:42:28 PM>, 
>><PyTime:2/26/2002 3:38:17 PM>, 0, 0, 100, 1244528, '
>>Program Files', 'PROGRA~1')]
>>>>> win32api.FindFiles(r"c:\Program Files")[0][-1]
>>'PROGRA~1'
>>
>>Thomas
>>
>>
>thanks, but it would still be better to get the popen methods to work
>properly wouldn't it?
after investigation it seems that module nt is using 
        cmd.exe /c string

to run programs and I can't find any way to quote things in the string.
A typically rubbish M$-ism.
-- 
Robin Becker



More information about the Python-list mailing list