<div dir="ltr">si ti confermo che si trova li.<div>Windows 2008r2 e win8</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">Il giorno 21 ottobre 2013 15:36, Marco Buttu <span dir="ltr"><<a href="mailto:mbuttu@oa-cagliari.inaf.it" target="_blank">mbuttu@oa-cagliari.inaf.it</a>></span> ha scritto:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>On 10/21/2013 12:45 PM, Marco Passanisi
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div><br>
      </div>
      <div>
        <pre style="margin-top:0px;margin-bottom:0px"><div style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;color:rgb(51,51,51);padding-left:10px"><span>import subprocess</span></div>
<div style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;color:rgb(51,51,51);padding-left:10px">
<span>output</span> <span style="font-weight:bold">=</span> <span>subprocess</span><span style="font-weight:bold">.</span><span>Popen</span><span>(</span><span style="color:rgb(221,17,68)">'"C:\Windows\System32\dnscmd.exe" /EnumZones'</span><span>,</span> <span>shell</span><span style="font-weight:bold">=</span><span style="color:rgb(153,153,153)">True</span><span>,</span> <span>stdout</span><span style="font-weight:bold">=</span><span>subprocess</span><span style="font-weight:bold">.</span><span>PIPE</span><span>,</span> <span>stderr</span><span style="font-weight:bold">=</span><span>subprocess</span><span style="font-weight:bold">.</span><span>PIPE</span><span>)</span></div>

<div style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;color:rgb(51,51,51);padding-left:10px"><span>out</span><span>,</span> <span>err</span> <span style="font-weight:bold">=</span> <span>output</span><span style="font-weight:bold">.</span><span>communicate</span><span>()</span></div>

<div style="font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;padding-left:10px"><span><font color="#333333">print</font></span><span style="color:rgb(51,51,51)">(err</span><span style="color:rgb(51,51,51)">)</span></div>
</pre>
      </div>
    </blockquote>
    <br>
    Ciao, innanzitutto, come ti hanno detto, dovresti usare delle
    stringhe raw. Pero' il problema non e' questo, perche' sei stato
    fortunato e nessuna delle sequenze di caratterei \x fa parte di una
    sequenza di escape ;) <br>
    Inoltre, quando usi shell=True, la stringa viene eseguita dalla
    shell sottostante, quindi avresti potuto scrivere direttamente:<br>
    <br>
    <pre style="margin-top:0px;margin-bottom:0px"><span>subprocess</span><span style="font-weight:bold">.</span><span>Popen</span><span>(</span><span style="color:rgb(221,17,68)">"C:\Windows\System32\dnscmd.exe /EnumZones"</span><span>,</span> <span>shell</span><span style="font-weight:bold">=</span><span style="color:rgb(153,153,153)">True</span><span>,...)

Quindi, anche se sembra banale, credo che il problema sia che nel tuo sistema non esiste il file </span><span><span style="color:rgb(221,17,68)">C:\Windows\System32\dnscmd.exe...</span> </span></pre>
    Puoi verificare? Ad esempio, nel mio non c'e':<br>
    <br>
    $ ls Windows/System32/dnsc*<br>
    Windows/System32/dnscacheugc.exe  Windows/System32/dnscmmc.dll<span class="HOEnZb"><font color="#888888"><br>
    <br>
    <br>
    <pre cols="72">-- 
Marco Buttu

INAF - Osservatorio Astronomico di Cagliari
Via della Scienza, Loc. Cuccuru Angius
09047 Selargius (CA)
Phone: 070 711 80 217
Email: <a href="mailto:mbuttu@oa-cagliari.inaf.it" target="_blank">mbuttu@oa-cagliari.inaf.it</a></pre>
  </font></span></div>

<br>_______________________________________________<br>
Python mailing list<br>
<a href="mailto:Python@lists.python.it">Python@lists.python.it</a><br>
<a href="http://lists.python.it/mailman/listinfo/python" target="_blank">http://lists.python.it/mailman/listinfo/python</a><br>
<br></blockquote></div><br></div>