Skip to main content

Python-based configuration reader

Project description

Python-based configuration reader

Simply enough, loads a file into a Python module object but does not place it in the module cache or otherwise bind it.

>>> import posixpath
>>> conf = load(posixpath.__file__)
>>> conf  # doctest: +ELLIPSIS
<module '<config>' from '...'>
>>> conf.pathsep
':'

And so on. You could also use load_dict to get a dict instead:

>>> type(load_dict(posixpath.__file__))
<type 'dict'>

Though, if you try to load files that aren’t recognized or loadable, you get an error:

>>> load("lala.ini")
Traceback (most recent call last):
  ...
ConfigurationError: no suitable loader for config module 'lala.ini'

Project details


Download files

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

Source Distribution

pyconf-0.4.1.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file pyconf-0.4.1.tar.gz.

File metadata

  • Download URL: pyconf-0.4.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyconf-0.4.1.tar.gz
Algorithm Hash digest
SHA256 4237ee00cd012bb6de8c1f1b8551e825c53e4e785c6820ea428c6cecf36b59c7
MD5 9780fb50e316f1e6042986b711641606
BLAKE2b-256 d1a5bd9db74d5436b635771007311550c521277cdc025a950c273f3dc885c094

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page