You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Other code... Now Check what kind of OS we are running
if os_used == "Windows":
# Do something for windows...
pass
elif os_used == "Darwin":
# Do something for Mac OS...
pass
elif os_used == "Linux":
# Do something for Mac OS...
pass
You can import put platform specific code behind an
if
that will only execute if you are on a specific os.This post on stackoverflow should be a good reference.
This way people can run the same file regardless of their machine.
Feel free to reach out with questions about this or anything else related to python; I am always happy to help.
The text was updated successfully, but these errors were encountered: