check [Solved] Detect operating system

1 year 4 months ago - 1 year 4 months ago #5336 by Ralf Ebert
Hi,

is there any way to detect the operating system within a script? I have used
platform.system()
but this failed because platform is unknown ...

Best regards
Ralf Ebert

Please Log in or Create an account to join the conversation.

1 year 4 months ago #5337 by ffe
Hi Ralf Elbert,

You can detect the system using the Java system properties. For example, run the following code in the Modelio Jython script view.
from  java.lang import System
print System.getProperty("os.name")

You can find the list of Java System properties in the Oracle site.

Please Log in or Create an account to join the conversation.

1 year 4 months ago #5338 by Ralf Ebert
Hi ffe,

thank you very much for your hint

Best regards
Ralf

Please Log in or Create an account to join the conversation.

Moderators: tmaebr
Time to create page: 0.033 seconds
^ Back to Top