Background – I am using paramiko to put files on a bunch of remote servers, running several different operating systems, and with no Python installed on the remote systems. I need to specify remote directories for where the file should be put. Because different operating systems specify paths differently, I wanted to use some module.
I wanted to use os.path.join, but that gets its configuration from my local machine. Is there any way to specify the platform in one of the os module’s methods, or something similar?
EDIT: Also during ssh sessions with paramiko.
Usually all of the different path modules are included,
os.pathis just the one for your local machine. Importntpathif you want to do Windows path manipulation, andposixpathfor Unix path manipulation.