Re: Using pipe in a system call

2015-10-10 Thread Emile van Sebille
On 10/10/2015 4:42 AM, Cecil Westerhof wrote: >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

Re: Using pipe in a system call

2015-10-10 Thread Cecil Westerhof
On Saturday 10 Oct 2015 13:42 CEST, Cecil Westerhof wrote: > On Saturday 10 Oct 2015 09:45 CEST, Frank Millman wrote: > >> "Cecil Westerhof" wrote in message >> news:87a8rsnkmw@equus.decebal.nl... >> >> This has got nothing to do with your question (which I found >> interesting) but I thought

Re: Using pipe in a system call

2015-10-10 Thread Cecil Westerhof
On Saturday 10 Oct 2015 09:45 CEST, Frank Millman wrote: > "Cecil Westerhof" wrote in message > news:87a8rsnkmw@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: >> expo

Re: Using pipe in a system call

2015-10-10 Thread Frank Millman
"Cecil Westerhof" wrote in message news:87a8rsnkmw@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

Re: Using pipe in a system call

2015-10-09 Thread Cecil Westerhof
On Friday 9 Oct 2015 15:12 CEST, Peter Otten wrote: > Dennis Lee Bieber wrote: > >> On Fri, 09 Oct 2015 08:56:18 +0200, Cecil Westerhof >> declaimed the following: >> >>> My bad, I intended to mention that ORDER BY gives the wrong order >>> (é comes after z and with sort it comes after e), so th

Re: Using pipe in a system call

2015-10-09 Thread Peter Otten
Dennis Lee Bieber wrote: > On Fri, 09 Oct 2015 08:56:18 +0200, Cecil Westerhof > declaimed the following: > >>My bad, I intended to mention that ORDER BY gives the wrong order (é >>comes after z and with sort it comes after e), so that is why I use >>the external sort command. >> > My books show

Re: Using pipe in a system call

2015-10-09 Thread Chris Angelico
On Fri, Oct 9, 2015 at 5:56 PM, Cecil Westerhof wrote: > My bad, I intended to mention that ORDER BY gives the wrong order (é > comes after z and with sort it comes after e), so that is why I use > the external sort command. Can you configure SQLite's locale? That ought to resolve that. Failing t

Re: Using pipe in a system call

2015-10-09 Thread Cecil Westerhof
On Friday 9 Oct 2015 02:11 CEST, Dennis Lee Bieber wrote: > On Fri, 09 Oct 2015 00:03:36 +0200, Cecil Westerhof > declaimed the following: > >> I want to do the following Bash command in Python: sqlite3 >> spreekwoorden.sqlite "SELECT spreekwoord FROM spreekwoorden;" | >> sort > spreekwoorden2.t

Re: Using pipe in a system call

2015-10-09 Thread Cecil Westerhof
On Friday 9 Oct 2015 00:26 CEST, Ian Kelly wrote: > On Thu, Oct 8, 2015 at 4:03 PM, Cecil Westerhof wrote: >> I want to do the following Bash command in Python: sqlite3 >> spreekwoorden.sqlite "SELECT spreekwoord FROM spreekwoorden;" | >> sort > spreekwoorden2.txt >> >> The following does this i

Re: Using pipe in a system call

2015-10-08 Thread Ian Kelly
On Thu, Oct 8, 2015 at 4:03 PM, Cecil Westerhof wrote: > I want to do the following Bash command in Python: > sqlite3 spreekwoorden.sqlite "SELECT spreekwoord FROM spreekwoorden;" | > sort > spreekwoorden2.txt > > The following does this in Python: > sqlite_pipe = Popen( > ( >

Using pipe in a system call

2015-10-08 Thread Cecil Westerhof
I want to do the following Bash command in Python: sqlite3 spreekwoorden.sqlite "SELECT spreekwoord FROM spreekwoorden;" | sort > spreekwoorden2.txt The following does this in Python: sqlite_pipe = Popen( ( 'sqlite3', 'spreekwoorden.sqlite', 'SE