Java Calling Python Script To Perform FTP Task

P

Paul D

I'm working on a project which requires the Java runtime to spawn a
process enabling a Python script to Get and Put files on a server (this
has been mandated as the preferred means to FTP files as Python offers
the "native" capability at a higher level than does Java).

Effectively, the Java method calls the Java runtime as
c:\python24\python c:\temp\GetFiles.py 192.23.23.1 c:\temp thisFile.txt
thatFile.txt.

The GetFiles.py script successfully handles the call **From The Command
Line** by connecting to the above IP address and transferring
thisFile.txt and thatFile.txt to the identified directory, c:\temp.

Now when the Java runtime makes the request and calls the Python script
above, the script fails with the error...
"C:\Python24\lib\ftplib.py, line 117, in connect for res in
socket.getaddrinfo(self.host, self.port, 0,
socket.SOCK.STREAM):socket.gaierror: (10106, 'getaddrinf failed')"

Anyone able to shed light on this Python FTP error using Java? Would
be much appreciated and thank you for your feedback/pointers.

Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top