Re: [Tutor] EXECUTING PYTHON AND SQL STAMENTS

2010-10-06 Thread Norman Khine
hello On Tue, Oct 5, 2010 at 5:57 PM, Susana Iraiis Delgado Rodriguez wrote: > Hello, I already solved the problem, I change all the code, instead of using > os.system I changed to subprocess.Popen() and it worked fine: > import shlex, subprocess > def process(): > print "Ingresa en el sigui

Re: [Tutor] EXECUTING PYTHON AND SQL STAMENTS

2010-10-05 Thread Alan Gauld
"Susana Iraiis Delgado Rodriguez" wrote it throws me that "C:/Archivos" is not recognized as an executable external or internal command, programm or file. You can only use / in paths used by Python. You are passing this to the CMD processor via os.system so CMD complains. It expects / to

Re: [Tutor] EXECUTING PYTHON AND SQL STAMENTS

2010-10-05 Thread Walter Prins
Thank you for taking the time to answer. I already changed my os.system() for your code. I got an error, when I executed this: > os.system(" 'C:/Archivos de programa/FWTools2.4.7/bin/ogr2ogr.exe ' "+arg1 > +" -where "+arg2 +" " +arg3) > it throws me that "C:/Archivos" is not recognized as an exec

Re: [Tutor] EXECUTING PYTHON AND SQL STAMENTS

2010-10-05 Thread Susana Iraiis Delgado Rodriguez
Hello, I already solved the problem, I change all the code, instead of using os.system I changed to subprocess.Popen() and it worked fine: import shlex, subprocess def process(): print "Ingresa en el siguiente orden:" print "Nombre del nuevo mapa.shp Nombre de la capa Nombre del mapa ori

Re: [Tutor] EXECUTING PYTHON AND SQL STAMENTS

2010-10-05 Thread Susana Iraiis Delgado Rodriguez
Hello Norman: Thank you for taking the time to answer. I already changed my os.system() for your code. I got an error, when I executed this: os.system(" 'C:/Archivos de programa/FWTools2.4.7/bin/ogr2ogr.exe ' "+arg1 +" -where "+arg2 +" " +arg3) it throws me that "C:/Archivos" is not recognized as

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] 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] 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

[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