[python-win32] win32com can't find file but I can see it, confused

Tim Roberts timr at probo.com
Fri Mar 9 21:00:04 CET 2012


Randy Syring wrote:
> Do you need to quote the value sent to shell.run() since there is a
> space in it?
>
> shell.Run('"C:\Documents and
> Settings\dave\Desktop\MyMobile\MyMobiler\MyMobiler.exe"')

Right.  More than that, he needs to escape the backslashes or use a raw
string, as in:

  shell.Run(r'"C:\Documents and Settings..."')

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list