Skip to content

Instantly share code, notes, and snippets.

@YurZ
YurZ / fixed_len_2_sqlite.py
Created November 28, 2012 21:30
Basic Python 3 script to read fixed length data and upload into SQLite Database
#!/usr/bin/env python3
## Author: Yuri Zhylyuk <yuri@zhylyuk.com> ##
# Amend parameters below for your needs:
## *import_file* - file where data gets imported from.
## Script is supposed to be ran in the same directory where import_file is located.
## *db_file* - name of the SQLite DB file to be created (for the first import) or overwritten.
## *dic* - dictionary of field names and their lengths.