python argv用法

import numpy as np
import os,sys,_thread,threading
def cmd(s="pause"):os.system(s);
def p(s):print(s);return s
def thread_it(func, *args):
    t = threading.Thread(target=func, args=args)
    t.setDaemon(True);
    t.start();
def n__TO__n_ADD(S1=1,S2=100):
    C=0
    for n in range(S1,S2+1,1):
        C=C+n
    return C
if __name__ == '__main__':
    p(f"argv:={sys.argv}")
    p(n__TO__n_ADD(1,100000))#
    try:
        for I,N in enumerate(sys.argv):
            p(f"argc:={int(len(sys.argv)-1)};");
            p(f"argv[{I}]:=>>>{N};");
    except:
       pass       
thread_it(cmd,"""ipconfig | find "v4" """)#瞎搞,别学我.
cmd()
r"""--!--"""

你可能感兴趣的:(python,开发语言)