[PythonCE] FTP in Windows Mobile 6.1

Leandro - ProfessionalIT - Soluções em Tecnologia da Informação. leandro at professionalit.com.br
Fri Nov 13 13:02:12 CET 2009


  This is my first post and I'm writing from Brazil.

   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:

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:

# ----- Begin ----
import ftplib
import os

def upload(ftp, file):
    ext = os.path.splitext(file)[1]
    if ext in (".txt", ".htm", ".html"):
        ftp.storlines("STOR " + file, open(file))
        ftp.storbinary("STOR " + file, open(file, "rb"), 1024)

ftp = ftplib.FTP("ftp.myserver.com.br")
ftp.login("myuser", "mypassword")

upload(ftp, "0011211B.EXP")

# ----- End ----

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" ?

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.

PS: Sorry by terrible English.

-- Leandro.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonce/attachments/20091113/eae26495/attachment.htm>

More information about the PythonCE mailing list