手机
当前位置:查字典教程网 >脚本专栏 >python >python访问系统环境变量的方法
python访问系统环境变量的方法
摘要:本文实例讲述了python访问系统环境变量的方法。分享给大家供大家参考。具体如下:#----------------------------...

本文实例讲述了python访问系统环境变量的方法。分享给大家供大家参考。具体如下:

#-------------------------------- # Name: enviroment_variables.py # Author: Kevin Harris # Last Modified: 02/13/04 # Description: This Python script demonstrates # how to acces enviroment variables. #-------------------------------- import os envVar = os.environ.get( "PATHEXT" ) print( "PATHEXT = " + envVar ) input( 'nPress Enter to exit...' )

希望本文所述对大家的Python程序设计有所帮助。

【python访问系统环境变量的方法】相关文章:

Python列表推导式的使用方法

如何运行Python程序的方法

python操作日期和时间的方法

python访问纯真IP数据库的代码

c++生成dll使用python调用dll的方法

python迭代器的使用方法实例

python三元运算符实现方法

python 实现堆排序算法代码

python中文乱码的解决方法

盘点提高 Python 代码效率的方法

精品推荐
分类导航