Unexpected Python String Encoding of '/b'

29 views Asked by At

I am very new to python, so please be kind.

I defined a list of strings (which are Windows 7 file paths):

iso_8859_files = ['dtSystem\delta3d\ext\inc\cpl_win32ce_api.h',
                  'dtSystem\delta3d\ext\inc\cpl_wince.h',
                  'dtSystem\delta3d\src\dtABC\beziercontroller.cpp',
                  'dtSystem\delta3d\src\dtDirectorNodes\dividemutator.cpp']

However, when i print the list to console I get:

['dtSystem\\delta3d\\ext\\inc\\cpl_win32ce_api.h', 'dtSystem\\delta3d\\ext\\inc\\cpl_wince.h', 'dtSystem\\delta3d\\src\\dtABC\x08eziercontroller.cpp', 'dtSystem\\delta3d\\src\\dtDirectorNodes\\dividemutator.cpp']

If you compare the before/after of the third string in the list, there seems to be an encoding error occurring with the character '\b'. Is there a way to setup the list to ensure the encoding does not change?

0

There are 0 answers