• Home
  • Most Popular
  • Submit
  • About Us
  • Contact Us

Softpile

Free Downloads

Categories
  • Home
  • Most Popular
  • Communications
  • Desktop
  • Games & Entertainment
  • Graphic Apps
  • Network & Internet
  • Security & Privacy
  • System Utilities
Alternative to itextsharp 2022.11.10347
IronPDF offers an itextsharp alternative for HTML to PDF conversion with C# code examples, documentation, and ...
VShell Server for Linux and Mac 4.8
VShell is a versatile and secure file transfer server that supports multiple protocols and is compatible ...
PDF Studio PDF Editor for Linux 2022
PDF Studio is a cost-effective PDF editor that delivers full compatibility with the PDF Standard. It's ...
VQ Probe for Linux 1.5
VQ Probe is a comprehensive software tool that enables objective and subjective video quality analysis. The ...
Resilient Server 2.3
This Debian GNU/Linux (Buster) based software has a customized partitioning scheme that enhances robustness against filesystem ...
Valentina Studio for Linux 9.6
Valentina Studio is a cross-platform GUI manager for Mac, Windows, and Linux. It allows users to ...
VPN Lifeguard for Linux 1.0.58
The software monitors VPN connection and automatically terminates apps during connection loss, re-establishes the connection and ...
G_Viewer 0.84
G_Viewer is a Linux software that serves as both a file system and photo/image viewer. It ...
Checksome File Hash Tool for Linux 1.1
This software allows for the generation and verification of file hashes. It is a quick and ...
KeyWrangler Password Manager for Linux 1.2
A password management software that is secure, offline and extensible. It offers military-grade encryption to protect ...
Home Linux Pyfig Download

Pyfig

September 28, 2009
This software is a lightweight tool that parses configuration files written in Python. It is specifically designed to be a simple solution for developers who need to read and modify configuration files quickly and easily.
Version 2.0
License GPL
Platform Linux
Supported Languages English
Homepage phpns.com
Developed by Alec Henriksen
Pyfig is a fantastic software tool that parses various config formats with ease, written in just above 100 lines of Python code. It supports comments and has a very simple and easy-to-use interface. If you need a clean and efficient solution for parsing your config files, Pyfig is definitely worth checking out.

To illustrate how easy it is to use Pyfig, here's an example of a typical config file that Pyfig can handle:

# This is a configuration file
max_number_of_tries = 3
player_name = toaster_phun
score = 1104
# do not edit this
session_id = 23ade_asdfeasd3#$rfasdasdkjzzei3
# connection type (comment out for autodetection)
;connection_type= DSL

To parse the config file, you simply need to import Pyfig and initialize the class with the path to the config file. Then, you can extract whatever information you need using the provided functions:

from pyfig import Pyfig

# init the class with path to config file
pyfig = Pyfig("path/to/config")

# print player_name
print(pyfig.grab("player_name"))

# print the whole dict
print(pyfig.config)

If you want to use Pyfig in your own project, it's a snap to import and start using. Just put the pyfig.py file in your working directory, or somewhere that's easy for the __import__ function to find. Then, you can import the module using either:

import pyfig
from pyfig import Pyfig

Initializing the class is very straightforward, since all you need to do is pass the filepath of the config file as an argument:

the_configuration = pyfig.Pyfig('path/to/config/file')

Once you have the class initialized, you can extract any information you need using the grab() method. You can also count the number of configurations in the file, view the raw config or configuration keys by accessing certain attributes of the class, or use the change() method to change specific configurations in the file.

Overall, Pyfig is a powerful and easy-to-use config file parser that makes managing your configurations a breeze. Try it out today!
What's New

Version 2.0: N/A

Free Download 9.2K
326
  • Share on:

Most Popular

  1. Quicksilver Forums 1.4.2
    155
  2. Dvgrab 3.4
    95
  3. DynVPN 1.0
    82
  4. CherryTV 0.1
    80
  5. SlideMap 1.2.2
    75
  6. porm r2
    70
  7. Hills 2.0
    70
  8. crick-info 1.0
    69
  9. fuseftp 0.8
    68
  10. Swiftfox 3.0b5pre-2
    67

Related Downloads

Mac Final
A theme for GNOME desktop that brings the look and feel of ...
Kolf
Kolf is a 2D miniature golf game for KDE 4, supporting up ...
Open Liero
Open Liero is a software that precisely duplicates Liero but with minor ...
cover2kopete
Cover2kopete is a script for Amarok that extracts and displays the current ...
GTKRawGallery
This open source software enables Linux users to view images and supports ...
Nightfall
Nightfall is a software program that models eclipsing binary star systems.
fancylogin
Fancylogin is a robust Linux login software with advanced features, offering secure ...
CPX-MINI USB
CPX-MINI USB is a compact, bootable USB drive that contains a scaled-down ...
PyStemmer
The Snowball stemming algorithms are a tool for information retrieval that aims ...
Apache2::AuthenSecurID::Auth
This software is an authentication handler designed for Apache2::AuthenSecurID, providing secure authentication ...
Copyright © 1999-2025 Softpile Free Downloads
  • Most Popular
  • Submit
  • About Us
  • Contact Us
  • Privacy Policy
  • Disclaimer
  • Terms of Use

Can we use your data to tailor ads for you?

Our partners will collect data and use cookies for ad personalization and measurement.

By choosing "I agree", closing this pop-up or clicking on any element on the page, you agree to the use of cookies to help us provide you with a better user experience.

Learn how Softpile and our partners collect and use data.

You can change your choice at any time in our privacy center.

Cookie Settings

Our website stores four types of cookies. At any time you can choose which cookies you accept and which you refuse. You can read more about what cookies are and what types of cookies we store in our Cookie Policy.

are necessary for technical reasons. Without them, this website may not function properly.

are necessary for specific functionality on the website. Without them, some features may be disabled.

allow us to analyse website use and to improve the visitor's experience.

allow us to personalise your experience and to send you relevant content and offers, on this website and other websites.