Re: [Tutor] A mergesort

2013-09-03 Thread Prasad, Ramit
D.V.N.Sarma wrote: [snip recursive merge sort algorithm] > Especially the statement > > v = (a[0] < b[0] and a or b).pop(0) > > gives a.pop(0), if a[0] < b[0] otherwise b.pop(0). I believe this idiom was used before the ternary if statements were introduced (in 2.5 I believe). In modern Python y

Re: [Tutor] os.system vs subprocess.Popen args problems

2013-09-03 Thread Oscar Benjamin
On 3 September 2013 14:48, eryksun wrote: >> It occurs to me that another possibility is if ffmpeg isn't really an >> .exe on PATH but rather a .bat file or something. In that case >> os.system or subprocess shell=True would pick it up but subprocess >> shell=False might not. I say "might" because

Re: [Tutor] os.system vs subprocess.Popen args problems

2013-09-03 Thread eryksun
On Tue, Sep 3, 2013 at 5:54 AM, Oscar Benjamin wrote: > On 3 September 2013 05:49, eryksun wrote: > > I've previously tried to find documentation that explains how MSVCRT > handles this. I didn't find anything as explicit as the explanation in > the subprocess docs. For example: > http://msdn.mic

Re: [Tutor] os.system vs subprocess.Popen args problems

2013-09-03 Thread Oscar Benjamin
On 3 September 2013 05:49, eryksun wrote: > On Mon, Sep 2, 2013 at 10:19 AM, learner404 wrote: >> >> I can't understand why the command below works with os.system but not with >> subprocess.Popen (on windows, recording video with FFMPEG.exe) >> >> cmd=('ffmpeg -f dshow -i video="%s" -f dshow -i a

Re: [Tutor] Using tkinter for cross platform application

2013-09-03 Thread Alan Gauld
On 03/09/13 02:32, Max Bedacht wrote: Hello; I'm looking for a quick, if possible, solution to a problem I'm having. :-) Does anyone ever look for a slow solution?... The problem that I am now trying to resolve, which I hope is the last one, is the following: When running a packaged 'compil

Re: [Tutor] help with postgreSQL and .csv

2013-09-03 Thread Peter Otten
Ismar Sehic wrote: > hello. Ismar, please post in plain text. The markup appears as funny stars over here. > i wrote the following code, to insert some values from a csv file to my > postgres table : > > *** > *import psycopg2* > *conn = psycopg2.connect("host = ***.***.***.*** user=**