An XResources parser for python applications.
Project description
A very simple python library for parsing XResources.
Example Usage
import xrp
result = xrp.parse_file('.Xresources')
result.resources['*foreground'] == '#FFFFFF'
result.resources.x_statement('*foreground').value == 'white'
result.definitions['white'] == '#FFFFFF'
Installation
Install stable versions from PyPi
pip install xparser
and development versions by cloning
git clone https://github.com/taesko/xparser.git
cd xparser && pip install .
Documentation
The two main entry points to the API are the parse and parse_file functions in the xrp package
They both return an xrp.views.XFileView object, which has resources and definitions attributes with dict-like interface for accessing the parsed data.
No designated docs are written yet (but are planned to be) - use help() on the xrp.views.XFileView object for more information on usage.
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 xparser-0.0.4.tar.gz.
File metadata
- Download URL: xparser-0.0.4.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a7895aa35910117c7ee3a6327be17118e571864aaccdc4d9c07c4c95e4cfc0a
|
|
| MD5 |
a71b8e51cf5fbf2040e65b2a5d7ef7af
|
|
| BLAKE2b-256 |
d70d4de46ccf5a95afde119c53bb93682496d4b5dd5860456368ded9f9b1077f
|
File details
Details for the file xparser-0.0.4-py3-none-any.whl.
File metadata
- Download URL: xparser-0.0.4-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8623ee7d456e3a9acad5fc9163ece9532878b363182416878a027badcffe354
|
|
| MD5 |
b43747d78c2e9b6546a22e162993b3b2
|
|
| BLAKE2b-256 |
2c75a000c0e550c73b8e8d060bbcb6977d68e12f52961b5c806a40981db266ad
|