<p>If you need to split a path, use <code>os.path.split(path_str)</code> instead of <code>path_str.split(os.path.sep)</code>. otherwise you'll have problems with absolute paths even if you use <code>os.path.join</code> to join everything altogether</p>
By clicking “Accept all”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage and assist in our marketing efforts. Check our privacy policies.