12345678910111213141516171819 |
- # -*- coding: utf-8 -*-
- # from PostgreSQL import PostgreSQL
- import sys
- print(sys.getdefaultencoding())
- import os
- # 获取PYTHONIOENCODING的值
- python_io_encoding = os.getenv('PYTHONIOENCODING')
- # 打印结果
- print(f"PYTHONIOENCODING: {python_io_encoding}")
- # pgconn = PostgreSQL(schema='gis')
- # pgconn = PostgreSQL()
- # rows = pgconn.execute(sql="SELECT 省,类型 from \"XZQH3857\"")
- # print(rows)
- # pgconn.close()
|