[Python-checkins] r54890 - peps/trunk/pep2pyramid.py
andrew.kuchling
python-checkins at python.org
Fri Apr 20 22:55:17 CEST 2007
Author: andrew.kuchling
Date: Fri Apr 20 22:55:15 2007
New Revision: 54890
Modified:
peps/trunk/pep2pyramid.py
Log:
Escape backslashes in PEPs when writing an index.yml
Modified: peps/trunk/pep2pyramid.py
==============================================================================
--- peps/trunk/pep2pyramid.py (original)
+++ peps/trunk/pep2pyramid.py Fri Apr 20 22:55:15 2007
@@ -428,6 +428,7 @@
def write_pyramid_index(destDir, title):
filename = os.path.join(destDir, 'index.yml')
fp = codecs.open(filename, 'w', 'utf-8')
+ title = title.replace('\\', '\\\\') # Escape existing backslashes
fp.write(INDEX_YML % title.replace('"', '\\"'))
fp.close()
os.chmod(filename, 0664)
More information about the Python-checkins
mailing list