`

python -- 包含 类库、引用其他文件

阅读更多

//hello.py

def PrintHello():
    print 'hello, andylin\n';

#PrintHello();
 

 

 

//pysys.py

import sys;

print 'the command line arguments are:';

for i in sys.argv:
    print i;

print '\n\nThe PYTHONPATH is ', sys.path, '\n';

#import using_name;
#print 'file name:', __name___, '\n';

#as c include
import hello
hello.PrintHello();

from hello import PrintHello

PrintHello();

import sys;
dir(sys);

print 'end of test dir\n';
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics