标签:
os.uname()
Returns information identifying the current operating system. The return value is an object with five attributes:
For backwards compatibility, this object is also iterable, behaving like a five-tuple containing sysname, nodename, release, version, and machine in that order.
Some systems truncate nodename to 8 characters or to the leading component; a better way to get the hostname is socket.gethostname() or even socket.gethostbyaddr(socket.gethostname()).
Availability: recent flavors of Unix. #只适用于类Unix 系统
Changed in version 3.3: Return type changed from a tuple to a tuple-like object with named attributes.
os.uname() AttributeError: 'module' object has no attribute 'uname'
标签:
原文地址:http://www.cnblogs.com/yumuxu/p/4198685.html