Question

I have a problem with getting os platform name under sikuli (using jython).

When I use os.uname()[0] or platform.system() the return value is 'Java'.

I would be very grateful if someone would give a workaround.

Edit: Sikuli function Env.getOS() also isn't a solution - return 'MAC' under my Ubuntu -.-.

Was it helpful?

Solution

Maybe try platform.platform():

>>> import platform
>>> platform.platform()
'Java-1.7.0_07-Java_HotSpot-TM-_64-Bit_Server_VM,_23.3-b01,_Oracle_Corporation-on-Mac_OS_X-10.7.5-x86_64'

There you'll find more useful methods: http://www.jython.org/docs/library/platform.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top