Vizible’s Blog

Python – Handle space in path name.

Posted in Tips by wearetherock on July 17, 2009

import subprocess as subp

# can’t start process there are spaces in path name
target =’C:\\Users\\BEER\\Documents\\Visual Studio 2008\\Projects\\EmbeddedBrowser\\EmbeddedBrowser\\bin\\Debug\\EmbeddedBrowser.exe’
subp.Popen(target)

# ok
target =r’C:\\Users\\BEER\\Documents\\Visual Studio 2008\\Projects\\EmbeddedBrowser\\EmbeddedBrowser\\bin\\Debug\\EmbeddedBrowser.exe’
subp.Popen(target)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: