我有一個運行這樣一個Python 3.2程序:確定如果Python是在Ubuntu正在運行Linux
import platform
sysname = platform.system()
sysver = platform.release()
print(sysname+" "+sysver)
和Windows返回:
的Windows 7
但在Ubuntu和其他回報:
Linux 3.0.0-13-generic
我需要這樣的東西:
Ubuntu 11.10或Mint 12
http://docs.python.org/library/platform.html#platform.linux_distribution – Gazler
謝謝,我真的應該讀該文件更多,呃? – triunenature