operating system - Escape \n in pathname to use os python module -


i have path of form input_path=c:\users\ngv\workspace\filename1.

i using dir,file = os.path.split(input_path).

this prints: `dir= c:\users

gv\workspace` treating \n of \ngv newline

and file = filename1. how fix this? cannot seem find way escape \n. tried input_path=input_path.replace('\n','\\n') , input_path.replace('\\n','\\\n') failed results.

please note using exec() in python. , during exec() invoke file path name changes.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -