Skip to main content
Solved

Identify fme desktop session's os

  • June 19, 2016
  • 3 replies
  • 15 views

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

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

takashi
Celebrity
  • 7843 replies
  • 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
Celebrity
  • 7843 replies
  • 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

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


bo
Contributor
Forum|alt.badge.img+10
  • Author
  • Contributor
  • 79 replies
  • 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...