Python import module

import sys

print(sys.path) # print the environment variable
print(sys.argv) # print the passed parameter
print(sys.argv[2]) # print the second passed parameter

import them

# python calls the shell to create directories and files

cmd = rst = os.system('dir') # Execute the windows dir command without saving the result
print(cmd) # 0
os.popen('dir').read()

 

 

To be added later. . .

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324548453&siteId=291194637