模块:
node2:/root/python#cat a2.py
import string
print string.Str
node2:/root/python#
node2:/root/python#cat string.py
Str='aaaaaaaaa'
def atoi(a,b):
return a+b
node2:/root/python#python a2.py
aaaaaaaaa
node2:/root/python#cat a2.py
import string
print string.Str
print string.atoi(3,5)
node2:/root/python#cat a3.py
from string import *
print Str
print atoi(100,200)
node2:/root/python#python a3.py
aaaaaaaaa
300