Use raw ctypes to read Unicode environment variables directly from the OS, even where Python's own `os` module is incomplete or restricted.
Project description
read-unicode-environment-variables-dictionary
Use raw ctypes to read Unicode environment variables directly from the OS, even where Python's own
osmodule is incomplete or restricted.
Modern Python, Real Environment
The traditional os module in Python keeps you at arm's length from the operating system - especially on unusual
platforms (think Android and iOS). Sometimes, that means missing features, incomplete access, or just plain
frustration.
read-environment-variables-dictionary is the essential building block for serious system scripting and tooling:
- Bypasses the
osmodule entirely. - Accesses the actual process environment directly through
ctypes, using POSIX and Win32 APIs - no wrappers, no middlemen, no artificial restrictions. - Fully Unicode - even fixes Python 2's legacy handling.
If you're creating tools, build systems, cross-platform utilities, deployment scripts, or Python-based automation, * this is the reliable, lowest-level method for reading the environment.* Use it directly, or build on top of it.
Usage
# coding=utf-8
from __future__ import print_function
from read_unicode_environment_variables_dictionary import read_unicode_environment_variables_dictionary
env = read_unicode_environment_variables_dictionary()
print(env[u'PATH'])
Install
pip install read-unicode-environment-variables-dictionary
Contributing
Contributions are welcome! Please submit pull requests or open issues on the GitHub repository.
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file read_unicode_environment_variables_dictionary-0.1.0a0.tar.gz.
File metadata
- Download URL: read_unicode_environment_variables_dictionary-0.1.0a0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76dc7cf7256cdb5434d699ae241de801b99f72052cdbeda17f918420b2bafa6f
|
|
| MD5 |
a5d1415e37bec057dc87578193714b9b
|
|
| BLAKE2b-256 |
2d9e9fe88a3f4cd88164371bf86b085c33773520310221c191ec35af417af7af
|
File details
Details for the file read_unicode_environment_variables_dictionary-0.1.0a0-py2.py3-none-any.whl.
File metadata
- Download URL: read_unicode_environment_variables_dictionary-0.1.0a0-py2.py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c187f2d798f5d713cb5fbc850c5faa3cbabf3fc79ccd61ad0aade6559b6ea3d
|
|
| MD5 |
654d6a550d2ca8ccf8e4b9484f5fdf6f
|
|
| BLAKE2b-256 |
1a15690ce1c414a6d93516e7f92e07114fa94e44d9e2f383a88dd49799a3834e
|