Skip to main content
Solved

Identify fme desktop session's os


bo
Contributor
Forum|alt.badge.img+10
  • Contributor

We have the need to determine OS on which FME destop session is running, such as Windows or Linux/Mac.

For lack of an elegant solution, we get the application path from FME_HOME / FME_HOME_UNIX to make the "assumption". I would appreciate if someone can share better alternatives.

Best answer by takashi

Hi @bo, Python platform.system() method may be helpful.

>>> import platform
>>> print (platform.system())
Windows

See also here: Python Documentation > 15.15. platform

View original
Did this help you find an answer to your question?

3 replies

takashi
Influencer
  • Best Answer
  • June 20, 2016

Hi @bo, Python platform.system() method may be helpful.

>>> import platform
>>> print (platform.system())
Windows

See also here: Python Documentation > 15.15. platform


takashi
Influencer
  • June 20, 2016
takashi wrote:

Hi @bo, Python platform.system() method may be helpful.

>>> import platform
>>> print (platform.system())
Windows

See also here: Python Documentation > 15.15. platform

There is a similar Q&A;: Identify which Operating System is being used?


bo
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • June 20, 2016

Thanks, @takashi. I have implemented your solution in my workspace!

I have also made a suggestion on creating a system parameter for OS platform.

https://knowledge.safe.com/content/idea/30007/syst...


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings