<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><br><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div class="y_msg_container">giustamente hai ragione.<br>E' forse per questo che non riesco a passare conn[contatore] con parametro al thread? <br><div id="yiv3240036958"><div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:12pt;">Ci provo subito e al volo<br clear="none">grazie delle risp.<br clear="none">py.Re<br clear="none"><div><span><br clear="none"></span></div><div><br clear="none"></div> <div class="yiv3240036958yqt3611771388" id="yiv3240036958yqt16338"><div style="font-family:times new roman, new york, times, serif;font-size:12pt;"> <div style="font-family:times new roman, new york, times,
serif;font-size:12pt;"> <div dir="ltr"> <hr size="1"> <font face="Arial" size="2"> <b><span style="font-weight:bold;">Da:</span></b> Marco Beri <marcoberi@gmail.com><br clear="none"> <b><span style="font-weight:bold;">A:</span></b> Remo The Last <py.remothelast@yahoo.it>; Discussioni generali sul linguaggio Python <python@lists.python.it> <br clear="none"> <b><span style="font-weight:bold;">Inviato:</span></b> Giovedì 3 Ottobre 2013 17:59<br clear="none"> <b><span style="font-weight:bold;">Oggetto:</span></b> Re: [Python] list di connessioni<br clear="none"> </font> </div> <div class="yiv3240036958y_msg_container"><br clear="none"><div id="yiv3240036958"><div><div dir="ltr">2013/10/3 Remo The Last <span dir="ltr"><<a rel="nofollow" shape="rect" ymailto="mailto:py.remothelast@yahoo.it" target="_blank" href="mailto:py.remothelast@yahoo.it">py.remothelast@yahoo.it</a>></span><br clear="none"><div
class="yiv3240036958gmail_extra"><div class="yiv3240036958gmail_quote"><blockquote class="yiv3240036958gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex;">
<div><div style="font-size:12pt;font-family:'times new roman', 'new york', times, serif;"><div><span style="font-size:12pt;">2° listato che mi si impalla</span><br clear="none"></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman', 'new york', times, serif;">
<span>conn = []</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman', 'new york', times, serif;"><span>contatore = 0</span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman', 'new york', times, serif;">
<span>while contatore <= 10:</span><br clear="none"><span> conn[contatore] = telnetlib.Telnet(address,23,7)</span><br clear="none"><span> contatore += 1<br clear="none"></span></div><div style="font-style:normal;font-size:16px;background-color:transparent;font-family:'times new roman', 'new york', times, serif;">
<span></span></div></div></div></blockquote><div><br clear="none"></div><div>Se vuoi fare conn[contatore] come se fosse un dictionary, devi inizializzarlo come dictionary:</div><div class="yiv3240036958yqt5290175748" id="yiv3240036958yqtfd51765"><div><br clear="none"></div><div>conn = {}</div></div><div><br clear="none"></div><div>Altrimenti devi fare:</div>
<div><br clear="none"></div><div>conn.append(telnetlib.Telnet(address,23,7))<br clear="none"></div><div><br clear="none"></div><div>Ciao.</div><div>Marco.</div><div><br clear="none"></div></div><div><br clear="none"></div>-- <br clear="none"><div><div><div><div><a rel="nofollow" shape="rect" target="_blank" href="http://beri.it/">http://beri.it/</a> - Un blog</div>
<div><a rel="nofollow" shape="rect" target="_blank" href="http://beri.it/i-miei-libri/">http://beri.it/i-miei-libri/</a> - Qualche libro</div><div class="yiv3240036958yqt5290175748" id="yiv3240036958yqtfd18586"><div><br clear="none"></div></div></div></div></div><div class="yiv3240036958yqt5290175748" id="yiv3240036958yqtfd00447">
</div></div></div></div></div><br clear="none"><br clear="none"></div> </div> </div></div> </div></div></div><br><br></div> </div> </div> </div></body></html>