# -*- coding: utf-8 -*-
'a test module'
__author__ = 'angel'
import sys
def test():
args = sys.argv
if 1 == len(args):
print('hello world!')
elif 2 == len(args):
print(f'hello {args[1]}')
else:
print('args too many')
# print(__name__) # 输出__main__
if __name__ =='__main__': #判断被其他模块调用时,不进行test
test()
import 模块 #居然可以汉字
模块.test()
Sign in to make a reply
Promethues
# -*- coding: utf-8 -*-
'a test module'
__author__ = 'angel'
import sys
def test():
args = sys.argv
if 1 == len(args):
print('hello world!')
elif 2 == len(args):
print(f'hello {args[1]}')
else:
print('args too many')
# print(__name__) # 输出__main__
if __name__ =='__main__': #判断被其他模块调用时,不进行test
test()
import 模块 #居然可以汉字
模块.test()