How to check if a path is absolute path or relative path in cross platform way with Python? -


unix absolute path starts '/', whereas windows starts alphabet 'c:' or '\'. python has standard function check if path absolute or relative?

os.path.isabs returns true if path absolute, false if not. the documentation says works in windows (i can confirm works in linux personally).

os.path.isabs(my_path) 

Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -