sys module is simple to use

SYS Import 

# sys.path.append () # to add a path to the system environment variables

print (sys.platform) # View the current system
print (sys.version) # get python interpreter version of system

#
#### ########################################
# command-line startup file, can be used to verify
Print (the sys.argv)
# # you can receive a terminal (the shell) things behind, and becomes a list
# # [ 'F:. \\ 1py \\ S10_sh \\ day \\ day16 \\ 06sys module. Py ']

username = the sys.argv [. 1]
pwd = the sys.argv [2]

# cmd be registered in this way,
IF username ==' CLY 'and pwd ==' 1234: '
login print (' welcome ' )
the else:
Print ( 'login illegal')

Guess you like

Origin www.cnblogs.com/pscly/p/11210196.html