Pregunta

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 -.-.

¿Fue útil?

Solución

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top