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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -