37, python module learning module -sys

! # / usr / bin / the env python 
#__author: HLC 
#date: 2019/6/8 

# SYS module and the python interpreter interacts 
# Import SYS 
# Print (the sys.argv) # receive incoming parameters, a first for the file name, the second is passed in the first parameter 
# DEF POST (): 
# Print ( "the ok") 
# DEF download (): 
# Pass 
# IF sys.argv [1] == "POST": 
POST # () 
# elif the sys.argv [. 1] == "downloads": 
# downloads () 
# perform python sys_module.py post / python sys_module.py download at the shell 

# the sys.exit (0) to exit the program # 
# print (sys.version) # python interpreter program to obtain the current version 
# print (sys.path) # returns the search path module 
# print (sys.platform) # returns the current platform name 
# sys.stdout.write ( "please: \ n ") # is equivalent to print (" please: "); call is substantially sys.stdout.write (obj + '\ n'), Print when you print will automatically add a line break
# Val = sys.stdin.readline () [: - 1] # standard input, standard input all acquired, including the end of the '\ n-',
# Sys.stdin.readline () .strip ( '\ n') # wrap can be removed, corresponding to input

  

Guess you like

Origin www.cnblogs.com/hlc-123/p/10989903.html