New submission from Stuart Axon <stu.a...@gmail.com>:

os.environ doesn't escape spaces, but does backslashes and others

In the windows python interpreter I echo'd the variable 'ProgramFiles',
then in the commandprompt.

>>> from os import environ
>>> environ['ProgramFiles']
'C:\\Program Files'
>>> ^Z

[C:\]echo %ProgramFiles%
C:\Program Files

This 'half' escapping seems odd, and is annoying when building file
paths for instance, probably the space should also be escaped.

----------
components: None
messages: 80765
nosy: stuaxo
severity: normal
status: open
title: Environ doesn't escape spaces properly
type: behavior
versions: Python 2.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5098>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to