#-*-coding:utf-8-*-ImportPlatformdeftestplatform ():Print("----------Operation System--------------------------") #Windows would be: (32bit, WindowsPE) #Linux would be: (32bit, ELF) Print(Platform.architecture ())#Windows would be:windows-xp-5.1.2600-sp3 or windows-post2008server-6.1.7600 #Linux would be:linux-2.6.18-128.el5-i686-with-redhat-5.3-final Print(Platform.platform ())#Windows would be:windows #Linux would be:linux Print(Platform.system ())Print("--------------Python Version-------------------------") #Windows and Linux would be:3.1.1 or 3.1.3 Print(Platform.python_version ())defuseplatform (): Sysstr=Platform.system ()if(Sysstr = ="Windows"): Print("Call Windows Tasks") elif(Sysstr = ="Linux"): Print("Call Linux Tasks") Else: Print("Other System Tasks") Useplatform () Testplatform ()View Code
Check the platform's Python script