def get_platform():
""" get_platform()
Get a string that specifies the platform more specific than
sys.platform does. The result can be: linux32, linux64, win32,
win64, osx32, osx64. Other platforms may be added in the future.
"""
# Get platform
if sys.platform.startswith('linux'):
plat = 'linux%i'
elif sys.platform.startswith('win'):
plat = 'win%i'
elif sys.platform.startswith('darwin'):
plat = 'osx%i'
else: # pragma: no cover
return None
return plat % (struct.calcsize('P') * 8) # 32 or 64 bits
评论列表
文章目录