Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍👧‍👦
Parenting

Henrik Heimbuerger hheimbuerger

👨‍👧‍👦
Parenting
View GitHub Profile
@hheimbuerger
hheimbuerger / settings.py
Last active Aug 29, 2015
define AppConfig for kombu in settings.py
View settings.py
from django.apps import AppConfig
class KombuApp(AppConfig):
name = 'kombu.transport.django'
label = 'django_kombu'
INSTALLED_APPS = (
'myproj.settings.KombuApp',
)
View CsvConverter.py
import csv
with open('input.csv', 'rb') as input, open('output.csv', 'wb') as output:
reader = csv.reader(input, delimiter=';')
writer = csv.writer(output, delimiter=';')
for input_row in reader:
firstname, name, accno, bsc, amount = input_row
output_row = [name, '%s %s' % (firstname, name), accno, bsc, amount]
writer.writerow(output_row)