On Fri, May 8, 2015, at 15:00, zljubisic...@gmail.com wrote: > As I saw, I could solve the problem by changing line 4 to (small letter > "r" before string: > ROOTDIR = r'C:\Users\zoran' > > but that is not an option for me because I am using configparser in order > to read the ROOTDIR from underlying cfg file.
configparser won't have that problem, since "escaping" is only an issue for python source code. No escaping for backslashes is necessary in files read by configparser. >>> import sys >>> import configparser >>> config = configparser.ConfigParser() >>> config['DEFAULT'] = {'ROOTDIR': r'C:\Users\zoran'} >>> config.write(sys.stdout) [DEFAULT] rootdir = C:\Users\zoran -- https://mail.python.org/mailman/listinfo/python-list