Skip to main content

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'


Install stable versions from PyPi

pip install xparser

and development versions by cloning

git clone
cd xparser && pip install .


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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for xparser, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size xparser-0.0.4-py3-none-any.whl (9.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size xparser-0.0.4.tar.gz (8.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page