Home/Support/Support Forum/X4 : How to Write local file and upload this by ftp ?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

X4 : How to Write local file and upload this by ftp ?

0 votes
Dear
I'm using ConnectPort X4:

1) from ftplib import FTP
no module named ftplib ??

2) I'm trying to open a local file:
logfile = open("log_file.csv, "a")
no file exist ???
Someone could be help me ?
Best regards.
asked Oct 15, 2015 in Digi Connect Cellular by Rolland New to the Community (10 points)

Please log in or register to answer this question.

1 Answer

0 votes
Have you looked through the Samples in the ESP for Python? I seem to recall there was a sample that does this.
answered Oct 15, 2015 by mvut Veteran of the Digi Community (11,300 points)
No, for ftp you must include in X4 a compatible library ftplib (python 2.4 !!!) , since X4 doesn't included it.
Roland,

That is what I am referring to.  The Digi ESP for Python is a software tools that uses Python 2.4 to help you write your Python applications, compile and upload them to the Gateways.  If I recall, one of the Samples provided in the ESP does what you want.
...