#coding=utf-8
'''
Created on 2012-5-28
@author: air
'''
import os,sys
print sys.platform
import getpass
print getpass.getuser() # 获取系统的用户名
print os.environ['USERNAME']# 获取系统的用户名
print os.path.getsize('log.txt')#返回文件的大小
ex=compile('100+2000',
'','eval')
print eval(ex)
print callable(ex)
exex = compile("""
req = input('count:')
for each in range(req):
print each
""", '', 'exec')
exec exex
'''
2100
False
count:3
0
1
2
'''
'''
Created on 2012-5-28
@author: air
'''
import os,sys
print sys.platform
import getpass
print getpass.getuser() # 获取系统的用户名
print os.environ['USERNAME']# 获取系统的用户名
print os.path.getsize('log.txt')#返回文件的大小
ex=compile('100+2000',
'','eval')
print eval(ex)
print callable(ex)
exex = compile("""
req = input('count:')
for each in range(req):
print each
""", '', 'exec')
exec exex
'''
2100
False
count:3
0
1
2
'''