Hello,<div><br></div><div> <span class="Apple-style-span" style="font-family: monospace; font-size: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">This is my first post and I'm writing from Brazil.</span></div>
<div><font class="Apple-style-span" face="monospace" size="4"><span class="Apple-style-span" style="font-size: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"> </span></font></div><div>
<font class="Apple-style-span" face="monospace" size="4"><span class="Apple-style-span" style="font-size: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">Well,</span></font></div><div>
<font class="Apple-style-span" face="monospace" size="4"><span class="Apple-style-span" style="font-size: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"> I'm developing a "Sales Force System" with PythonCE and PocketPyGui to a Palm Tre Pro(with Windows Mobile 6.1 Professional, with touch screen support) and in this moment I have two problems:</span></font></div>
<div><font class="Apple-style-span" face="monospace" size="4"><span class="Apple-style-span" style="font-size: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font></div><div>
<font class="Apple-style-span" face="monospace" size="4"><span class="Apple-style-span" style="font-size: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">1) I do a W-Lan(wifi) connection and try send a file to a FTP server. In my test I'm trying execute this code:</span></font></div>
<div><font class="Apple-style-span" face="monospace" size="4"><span class="Apple-style-span" style="font-size: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font></div><div>
<font class="Apple-style-span" face="monospace" size="4"><span class="Apple-style-span" style="font-size: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"># ----- Begin ----</span></font></div>
<div><font class="Apple-style-span" face="monospace" size="4"><span class="Apple-style-span" style="font-size: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><div>import ftplib</div><div>
import os</div><div><br></div><div>def upload(ftp, file):</div><div> ext = os.path.splitext(file)[1]</div><div> if ext in (".txt", ".htm", ".html"):</div><div> ftp.storlines("STOR " + file, open(file))</div>
<div> else:</div><div> ftp.storbinary("STOR " + file, open(file, "rb"), 1024)</div><div><br></div><div>ftp = ftplib.FTP("<a href="http://ftp.myserver.com.br">ftp.myserver.com.br</a>")</div>
<div>ftp.login("myuser", "mypassword")</div><div><br></div><div>upload(ftp, "0011211B.EXP")</div><div><br></div><div># ----- End ----</div><div><br></div><div>Well, when a execute this code (double-click in the windows explorer of my mobile device) the pythonCE open and try execute the code but it show me many errors(socket erros and a message: "Connection reset by peer"). When a execute this code in my Desktop PC it's run ok. Any Idea of how to resolve this problem or "how to send/put a file in a FTP server with PythonCE" ?</div>
<div><br></div><div>2) How to detect/make a GPRS connection with PythonCE ? There are a example code ? where I can find a sample ? because the "sales man" will operate the system out (in the "street") with a 3G GPRS Connection.</div>
<div><br></div><div>PS: Sorry by terrible English.</div><div><br></div><div>-- Leandro.</div></span></font></div>