[PYTHON] How to create a config file

You may want to output the Dictionary type as it is as a configuration file. In such a case, it is easier to use a script like the one below.

config = {
	"A":"a",
	"B":"b",
	"C":"c"
}
config = '¥n'.join(map('='.join, config.iteritems())

# config= "A=a¥nB=b¥nC=c"

This config is the string you want, so write it out.

Recommended Posts

How to create a config file
How to create a Conda package
How to create a virtual bridge
How to create a Dockerfile (basic)
How to create a clone from Github
How to create a git clone folder
How to create a repository from media
Script to create a Mac dictionary file
How to create a CSV dummy file containing Japanese using Faker
How to read a CSV file with Python 2/3
How to disguise a ZIP file as a PNG file
How to create a Python virtual environment (venv)
How to create a function object from a string
How to create a shortcut command for LINUX
[Note] How to create a Ruby development environment
How to create a Kivy 1-line input box
How to create a multi-platform app with kivy
How to create a Rest Api in Django
How to read a file in a different directory
[Note] How to create a Mac development environment
Upload a file to Dropbox
How to hack a terminal
Create a dummy data file
[Go] How to create a custom error for Sentry
How to turn a .py file into an .exe file
How to convert a mel spectrogram back to a wav file
How to create a local repository for Linux OS
Python script to create a JSON file from a CSV file
[Python] How to create a 2D histogram with Matplotlib
How to create a kubernetes pod from python code
How to make a Japanese-English translation
How to write a Python class
How to put a hyperlink to "file: // hogehoge" with sphinx-> pdf
How to put a symbolic link
How to run a Python file at a Windows 10 command prompt
Steps to create a Django project
What you can understand because you are a beginner How to create a file (first post)
How to make a slack bot
Write standard output to a file
How to create your own Transform
How to import a file anywhere you like in Python
How to create an email user
How to make a crawler --Advanced
How to create a flow mesh around a cylinder with snappyHexMesh
Create a binary file in Python
How to make a recursive function
[Python Kivy] How to create a simple pop up window
How to create / delete symbolic links
How to make a deadman's switch
Create a 1MByte random number file
How to create a SAS token for Azure IoT Hub
How to delete a Docker container
5 Ways to Create a Python Chatbot
How to use a file other than .fabricrc as a configuration file
How to make a crawler --Basic
[Python Kivy] How to create an exe file with pyinstaller
[Python] How to output a pandas table to an excel file
How to create an ISO file (CD image) on Linux
A tool to convert Juniper config
How to use NUITKA-Utilities hinted-compilation to easily create an executable file from a Python script
Create a file uploader with Django