KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Can python detect OS and then contruct a if/else statement for File System. I would need to replace C:\CobaltRCX\ in Fn string with the FileSys string. import os.path, csv from time import strftime if os.path.?????:## Windows FileSys = r"C:\\working\\" else: ##linux FileSys = r"\\working\\" y=(strftime("%y%m%d")) Fn = (r"C:\\working\\Setup%s.csv" %y)
Tags (comma-separated)
Save Edits
Cancel