Skip to main content

Simple text configuration file reading/writing

Project description


TextConfig is a Class for managing simple text configuration files with python. By simple, it means that they are simple text files, there are no sections and all options in the configuration files use a strict


format, with no spaces between OPTION, = and value. The same OPTION can be used more than once, so you can have multiple values, for example:


Here's a real-world example of such a file, taken from the slapt-get package manager repository configuration file in Salix:

# Working directory for local storage/cache.

# Exclude package names and expressions.
# To exclude pre and beta packages, add this to the exclude:
#   [0-9\_\.\-]{1}pre[0-9\-\.\-]{1}

# The Slackware repositories, including dependency information

# The Salix repository
# And the Salix extra repository

You may call it like this:

from textconfig import TextConfig
c = TextConfig('/path/to/configfile')

Project details

Release history Release notifications | RSS feed

This version


Download files

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

Files for textconfig, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size textconfig-0.1.tar.gz (15.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page