using subprocess.Popen env parameter

Nobody nobody at nowhere.com
Fri Mar 5 01:09:39 CET 2010


On Wed, 03 Mar 2010 09:05:47 -0800, enda man wrote:

> cl_path = ms_vc_path + '\VC\bin'

The backslash is used as an escape character within string literals.
Either use raw strings:

	cl_path = ms_vc_path + r'\VC\bin'

or escape the backslashes:

	cl_path = ms_vc_path + '\\VC\\bin'

or use os.path.join():

	cl_path = os.path.join(ms_vc_path, 'VC', 'bin')




More information about the Python-list mailing list