Skip to main content

AIX stanza parser

Project description

aixstanzaparser

aixstanzaparser Python 3.x module. Subclasses configparser.ConfigParser to support parsing and writing AIX stanza files.

Usage

Here's an example of using AIXStanzaParser to parse lvupdate.data and update it to set llvupdate.llu to yes.

import aixstanzaparser

# Create parser instance
config = aixstanzaparser.AIXStanzaParser()

# Read and parse lvupdate.date
config.read("lvupdate.data")

# Update llvupdate.llu to yes
if 'llvupdate' not in config.sections():
    config['llvupdate'] = {}
config['llvupdate']['llu'] = "yes"

# write updated lvupdate.data
with open("lvupdate.data", "w") as configfile:
    config.write(configfile)

Limitations

Comments are lost when AIXStanzaParser parses a file. So reading, parsing, updating and writing an AIX stanza file with AIXStanzaParser will lose any existing comments.

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

aixstanzaparser-1.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aixstanzaparser-1.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file aixstanzaparser-1.1.0.tar.gz.

File metadata

  • Download URL: aixstanzaparser-1.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Linux/6.14.4-200.fc41.x86_64

File hashes

Hashes for aixstanzaparser-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9e717c9fb6cbb2fdcd4e146685ebd3f76c0124a514f2751c562c67e8cb1c67e9
MD5 74e56313994591f3a1f71ea62eeb42c8
BLAKE2b-256 d981c048b47fa6d1d89950b9c0f40a237a3fa21164735e1879af214443777eed

See more details on using hashes here.

File details

Details for the file aixstanzaparser-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: aixstanzaparser-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.3 Linux/6.14.4-200.fc41.x86_64

File hashes

Hashes for aixstanzaparser-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 853c4127bf98deb463e96ff525f3896bcd45a3e1a448a160934a5e7ec09ad895
MD5 127be1262da1892f81ee524cab256d1b
BLAKE2b-256 a5de12b8e4078c2af6efe474fa69167ef2c2e718f05db93aa49802ad8b3f40a6

See more details on using hashes here.

Supported by

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