using subprocess.Popen env parameter

Nobody nobody at nowhere.com
Thu Mar 4 19:09:39 EST 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