[Python] basis sys module (library) method summary

sys

  Some modules are defined and system-related information

  sys.path: Get the search module path
  sys.version: get the version number

. 1  Import SYS
 2  
. 3  Print (the sys.path)
 . 4  Print (The sys.version)   # 3.7.4 (Tags / v3.7.4: e09359112e, Jul-2019. 8, 20:34:20) [v.1916 the MSC 64 'bit (the AMD64 )] 
. 5  
. 6  Print (the sys.argv)   # for receiving a command-line parameters [ 'D: /first_level/day08/demp08_sys.py'] 
. 7  
. 8  # input on the command line python D: \ first_level \ day08 \ demp08_sys Girl .py hee. 17 
. 9  # execution result [ 'D: \\ first_level \\ day08 \\ demp08_sys.py', ' hee', '. 17', 'Girl'] 
10  
. 11  Print (the sys.version_info)   # sys.version_info (major = 3, minor = 7, micro = 4, releaselevel = 'final',serial=0)

Guess you like

Origin www.cnblogs.com/Tree0108/p/12110229.html