[Tutor] kernel serie

Jonas Melian jonasmg at softhome.net
Fri May 20 00:28:46 CEST 2005


I want get the kernel serie, so 2.x only (2.6 or 2.4)

info_kernel = platform.release() # get the kernel version
info_kernel = '.'.join(info_kernel.split('.',2)[:2])

is there any way of get it in one line only?

Thanks in advance!


More information about the Tutor mailing list