I have this script which processes lines containing windows file paths. However the script is running on Linux. Is there a way to change the os library to do Windows file path handling while running on linux?
I was thinking something like:
import os
os.pathsep = '\\'
(which doesn't work since os.pathsep is ; for some reason)
My script:
for line in INPUT.splitlines():
package_path,step_name = line.strip().split('>')
file_name = os.path.basename(package_path)
name = os.path.splitext(file_name)[0]
print template % (name,file_name,package_path)