[Python] python访问系统环境变量 →→→→→进入此内容的聊天室

来自 , 2019-06-03, 写在 Python, 查看 101 次.
URL http://www.code666.cn/view/a36adbc3
  1. #------------------------------------------------------------------------------
  2. #           Name: enviroment_variables.py
  3. #         Author: Kevin Harris
  4. #  Last Modified: 02/13/04
  5. #    Description: This Python script demonstrates how to acces enviroment
  6. #                 variables.
  7. #------------------------------------------------------------------------------
  8.  
  9. import os
  10.  
  11. envVar = os.environ.get( "PATHEXT" )
  12.  
  13. print( "PATHEXT = " + envVar )
  14.  
  15. input( '\nPress Enter to exit...' )
  16.  
  17. #//python/8091

回复 "python访问系统环境变量"

这儿你可以回复上面这条便签

captcha