Is it any cross-platform way to check that my python script is executed under admin rights? Unfortunately, os.getuid() is UNIX-only and is not available under windows :(.
Is it any cross-platform way to check that my python script is executed under admin rights? Unfortunately, os.getuid() is UNIX-only and is not available under windows :(.
"Admin rights" is meaningless. Both Unix and Windows have a long list of different privileges that a particular user may or may not have. You should just try to do what you want to do and use exceptions to deal with lack of privileges. That's that they're there for.