Nov-08-2020, 04:03 PM
(Nov-07-2020, 06:14 PM)bowlofred Wrote:Quote:Help on function join in module posixpath:
join(a, *p)
Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components
will be discarded. An empty last part will result in a path that
ends with a separator.
Your second path starts with a separator, so it is considered an absolute path. Therefore the first path is discarded.
>>> os.path.join('/Volumes/Sidekick/SEER/Trip', '/data/source') '/data/source' >>> os.path.join('/Volumes/Sidekick/SEER/Trip', 'data/source') '/Volumes/Sidekick/SEER/Trip/data/source'
Thank you