bessagroup / rvesimulator

Automated representative volume element simulator via abaqus for material constitutive law discovery
https://bessagroup.github.io/rvesimulator/
MIT License
14 stars 2 forks source link

Checking which operating system is used can also be done with libraries instead of string comparison: #92

Open mpvanderschelling opened 10 months ago

mpvanderschelling commented 10 months ago

Problem

Checking which operating system is used can also be done with libraries instead of string comparison:

Possible solution

from sys import platform
if platform == "linux" or platform == "linux2":
    # linux
elif platform == "darwin":
    # OS X
elif platform == "win32":
    # Windows...