Python读取配置文件
来源:互联网 发布:软件配置管理报告 编辑:程序博客网 时间:2024/06/08 12:52
#!/usr/bin/env python# coding=utf8# si.hairui, 2016.11.24# Http Client, Python 2.7.5def readCfgFile(): try: with open('config.cfg', 'r') as f: return f.read() # 返回字符串 except: print "Error: ReadCfgFile fail!" return Noneif __name__ == "__main__": fileStr = readCfgFile() # print "fileStr = ", fileStr cfginfo = eval(fileStr) print cfginfo
0 0
- Python读取ini配置文件
- Python读取配置文件
- python读取配置文件
- 用Python读取配置文件
- Python读取ini配置文件
- python读取配置文件
- python 读取配置文件
- python读取properties配置文件
- Python读取配置文件
- 【Python】配置文件读取
- Python读取配置文件
- python 读取配置文件
- Python读取INI配置文件
- Python 读取配置文件
- python读取配置文件
- python 读取配置文件
- python读取配置文件configparser
- python读取配置文件
- Javaweb中JavaScript的运算符
- linux下安装LAMP环境部署与lamp下mysql的远程连接
- 96. Unique Binary Search Trees 等题
- Git冲突:commit your changes or stash them before you can merge.
- OkHttp2.x简单使用说明
- Python读取配置文件
- Apache POI使用详解
- Python入门——初识Python
- 点乘a*b和叉乘aXb
- Unity Profiler 性能分析
- Android adb实现原理
- Android沉浸式状态栏之高仿QQApp
- 生产环境基于HA的Spark搭建
- Spark入门基础教程