I have this script that processes strings containing Windows file paths. However, the script works on Linux. Is there a way to change the os library to handle the Windows file path while running on Linux?
I thought something like:
import os
os.pathsep = '\\'
(which does not work since os.pathsep for any 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)
source
share