Hello,

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

Well,
   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))
    else:
        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.
_______________________________________________
PythonCE mailing list
PythonCE@python.org
http://mail.python.org/mailman/listinfo/pythonce

Reply via email to