Skip to content

Instantly share code, notes, and snippets.

View elrondwong's full-sized avatar
🌟
learning

elrond elrondwong

🌟
learning
View GitHub Profile
@elrondwong
elrondwong / ini2json.py
Created July 31, 2020 07:59 — forked from Natim/ini2json.py
Convert an ini configuration file into a json file
# -*- coding: utf-8 -*-
import json
import sys
from ConfigParser import (ConfigParser, MissingSectionHeaderError,
ParsingError, DEFAULTSECT)
class StrictConfigParser(ConfigParser):
def _read(self, fp, fpname):
@elrondwong
elrondwong / config.ini
Created July 14, 2020 16:00 — forked from tsuriga/config.ini
Simple config file validation in python
[DEFAULT]
; Operation mode
; This is a global value for all sections
mode = master
[server]
; Connection lifetime
timeout = 3600