<div>Hello members!</div>
<div> </div>
<div>I&#39;m running a python script to execute an ogr2ogr command. The process has been sucessful, but now I want to create a shp for each layer a shp has. I now I must use the command :</div>
<div><font size="2" face="Courier New">ogr2ogr newX.shp -where &quot;LAYER = &#39;layerValueX&#39;&quot; original.shp</font></div>
<div><font face="arial,helvetica,sans-serif">The code for the subprocess is as follows:</font></div>
<div><font face="courier new,monospace">for line in open(&quot;unico.txt&quot;, &quot;r&quot;).readlines():<br>  p = subprocess.Popen([C:/Archivos de programa/FWTools2.4.7/bin/ogr2ogr&#39;, line+&#39;.shp&#39;, </font></div>

<div><font face="courier new,monospace">&#39; -where&#39;, &#39;\&quot;LAYER= \&#39;line\&#39;\&quot;&#39;, b+&#39;.shp&#39;])</font><font face="arial,helvetica,sans-serif">unfortuanely wtih this code the module reads the variable line, which as the value of the layer has a string &quot;line&quot;: The problem is located after the word LAYER, I don&#39;t have idea about the properly way to write the quotes.</font></div>

<div> </div>
<div>Hope you can help, regards!</div>
<p style="COLOR: #000000"><br></p>