2008/7/21 Martin Walsh <[EMAIL PROTECTED]>: > Neven Goršić wrote: >> I read from one file plenty of parameters and among them one file name >> of other file. >> That file name is 'e:\mm tests\1. exp files\5.MOC-1012.exp' and I hold >> it in variable s. > > As John pointed out, if you're really reading this string from a file > (with something like file.read or ConfigParser) it should already be > escaped properly, and you'd get back something like 'e:\\mm tests\\1. > exp files\\5.MOC-1012.exp' instead. Which would probably work for your > purposes. > > Can you show us an example of the approach you're using to 'read' > parameters from a file, including the variable assignment? > > Marty > > > > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > ------------------------------------------------------------------------------------------------------------
I reconfigured file my parameter file. I left only one parameter in that line (path) and write path without ''. Then f.readline() get correct raw string and I can get path and file name properly by means of os.path.split(line). Thank you for your good will Neven Gorsic _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor