Using pipe in a system call
Frank Millman
frank at chagford.com
Sat Oct 10 03:45:25 EDT 2015
"Cecil Westerhof" wrote in message news:87a8rsnkmw.fsf at Equus.decebal.nl...
This has got nothing to do with your question (which I found interesting)
but I thought I would mention it.
> export_spreekwoorden is defined as:
> export_spreekwoorden = '''
> SELECT spreekwoord
> FROM spreekwoorden
> ORDER BY spreekwoord COLLATE LOCALIZED
> '''
This works fine, but if anyone examines the resulting sql, it is full of
extra spaces and newlines.
To avoid this, I have adopted this habit -
export_spreekwoorden = (
"SELECT spreekwoord "
"FROM spreekwoorden "
"ORDER BY spreekwoord COLLATE LOCALIZED"
)
To my eye, the result is nicer, at virtually no extra effort. Just don't
forget the trailing space on all but the last line.
Frank Millman
More information about the Python-list
mailing list