Re: [Tutor] Pythonic nested lists

2010-10-04 Thread Alan Gauld
"col speed" wrote HI again, I realise that I should have included more information in the above e-mail. Here goes: a/ I have a 9*9 nested list called "rows", which contains the given numbers in a sudoku puzzle - with "0"s where the blanks go. b/ I create roworder (roworder = [[str(j)+str

Re: [Tutor] subprocess.call warning

2010-10-04 Thread Norman Khine
thank you for the reply On Mon, Oct 4, 2010 at 12:47 AM, Steven D'Aprano wrote: > On Mon, 4 Oct 2010 06:44:54 am Norman Khine wrote: >> hello, from the docs http://docs.python.org/library/subprocess.html i >> see there is a WARNING about deadlock when using the subprocess.call. >> in my code i ha

Re: [Tutor] (de)serialization questions

2010-10-04 Thread Albert-Jan Roskam
Hi Alan, Wow, I'm impressed! You're right, it's near Glencoe! Coming from Edingburgh it's a couple of miles just before Glencoe. Marvellous place! Cheers!! Albert-Jan ~~ All right, but apart from the sanitation, the medicin

[Tutor] EXECUTING PYTHON AND SQL STAMENTS

2010-10-04 Thread Susana Iraiis Delgado Rodriguez
I'm developing a module to execute an external command. The module executes the command, but in order to make my code useful I have to enter some sql staments. This is my code: from dbf import * from osgeo import ogr import os import sys def call(): print "Ingresa el nombre para el nuevo mapa

[Tutor] Pythonic nested lists

2010-10-04 Thread col speed
Message: 6 Date: Tue, 28 Sep 2010 13:15:26 +0700 From: col speed To: tutor@python.org Subject: [Tutor] Pythonic nested lists Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi all, I've been trying to write a programme that solves sudoku problems for a while now. I'm getting cl

Re: [Tutor] EXECUTING PYTHON AND SQL STAMENTS

2010-10-04 Thread Norman Khine
On Mon, Oct 4, 2010 at 4:04 PM, Susana Iraiis Delgado Rodriguez wrote: > I'm developing a module to execute an external command. The module executes > the command, but in order to make my code useful I have to enter some sql > staments. This is my code: > from dbf import * > from osgeo import ogr

Re: [Tutor] EXECUTING PYTHON AND SQL STAMENTS

2010-10-04 Thread Steve Willoughby
On 04-Oct-10 07:32, Norman Khine wrote: On Mon, Oct 4, 2010 at 4:04 PM, Susana Iraiis Delgado Rodriguez wrote: os.system('"C:/Archivos de programa/FWTools2.4.7/bin/ogr2ogr.exe"'+" " +"arg1" +" "+ "-where" +" "+ "arg2" +" " +"arg3") You're including the text "arg1" in the command, not

Re: [Tutor] Matching relational data

2010-10-04 Thread David Hutto
Thanks for your replies, and reminding me of statistics(probably a quick crash course). The data I plan to use would be equally charted by a constant timestep in it's movement(type of movement graphed being dictated by the object being measured) So I thought that maybe the easiest way would be som

Re: [Tutor] Matching relational data

2010-10-04 Thread Steven D'Aprano
On Tue, 5 Oct 2010 02:04:09 am David Hutto wrote: > a = ['+','-','+','-','+','-','+','-','+','-','+'] > b = ['-','+','-','+','-','-','-','+','-','-','-'] > > count = 0 > lena = len(a) > lenb = len(b) > if lena == lenb: > for num in range(0,lena): > if a[num] == b[num]: >

Re: [Tutor] EXECUTING PYTHON AND SQL STAMENTS

2010-10-04 Thread Bill Allen
On Mon, Oct 4, 2010 at 9:04 AM, Susana Iraiis Delgado Rodriguez < susana.delgad...@utzmg.edu.mx> wrote: > I'm developing a module to execute an external command. The module executes > the command, but in order to make my code useful I have to enter some sql > staments. This is my code: > Question

Re: [Tutor] Matching relational data

2010-10-04 Thread Steven D'Aprano
On Mon, 4 Oct 2010 10:52:02 am Alan Gauld wrote: > One of the best programming stats tools is R > > http://en.wikipedia.org/wiki/R_%28programming_language%29 > > There is a python bionding for R too. > > Although R may be overkill for what you want, but at least > you'll know the theory and math a

Re: [Tutor] subprocess.call warning

2010-10-04 Thread Steven D'Aprano
On Mon, 4 Oct 2010 05:42:16 pm Norman Khine wrote: > >> the first calls the 'sox' library which joins all the .wav files > >> into one file and then i use the 'wav2swf' library to create a SWF > >> output of the file. > >> > >> can the code be improved? > > > > Code can always be improved :-) What

[Tutor] Downloading data from web

2010-10-04 Thread Crusier
I am trying to extract web data and put it into a database for analysis.I am just wondering what is the best way to do it and I will try to dig up information from there. Please help me how can I kick start this project. Cheers, Hank ___ Tutor maillist

Re: [Tutor] Matching relational data

2010-10-04 Thread David Hutto
On Mon, Oct 4, 2010 at 6:31 PM, Steven D'Aprano wrote: > On Mon, 4 Oct 2010 10:52:02 am Alan Gauld wrote: > >> One of the best programming stats tools is R >> >> http://en.wikipedia.org/wiki/R_%28programming_language%29 >> >> There is a python bionding for R too. >> >> Although R may be overkill f

Re: [Tutor] Downloading data from web

2010-10-04 Thread Emile van Sebille
On 10/4/2010 7:01 PM Crusier said... I am trying to extract web data and put it into a database for analysis.I am just wondering what is the best way to do it and I will try to dig up information from there. Please help me how can I kick start this project. Check out beautiful soup. http://ww