Re: Calling ftp commands from python

2005-08-31 Thread Mike Meyer
"Thierry Lam" <[EMAIL PROTECTED]> writes: > Is it possible to run an ftp command to connect to some remote computer > on the network. Yes, but why would you want to do taht? > For example, if I want to retrieve some data from > \\remcomputer\datafiles on the network and copy it to my local > com

Re: Calling ftp commands from python

2005-08-31 Thread Maurice LING
Thierry Lam wrote: > Is it possible to run an ftp command to connect to some remote computer > on the network. > > For example, if I want to retrieve some data from > \\remcomputer\datafiles on the network and copy it to my local > computer, how do I do it in python on the Unix side? > > I don't

Re: Calling ftp commands from python

2005-08-31 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >Your best bet would be to use "pexpect" module. Code may look something >like: > >import pexpect >import sys >child = pexpect.spawn ('ftp ftp.site.com') >child.expect ('Name .*: ') >child.sendline ('username') >child.ex

Re: Calling ftp commands from python

2005-08-31 Thread Steve Holden
Thierry Lam wrote: > Is it possible to run an ftp command to connect to some remote computer > on the network. > > For example, if I want to retrieve some data from > \\remcomputer\datafiles on the network and copy it to my local > computer, how do I do it in python on the Unix side? > > I don't

Re: Calling ftp commands from python

2005-08-31 Thread Robert Kern
Thierry Lam wrote: > Is it possible to run an ftp command to connect to some remote computer > on the network. If the remote computer is running an ftp server, yes. If not, no. > For example, if I want to retrieve some data from > \\remcomputer\datafiles on the network and copy it to my local > c

Re: Calling ftp commands from python

2005-08-31 Thread [EMAIL PROTECTED]
Your best bet would be to use "pexpect" module. Code may look something like: import pexpect import sys child = pexpect.spawn ('ftp ftp.site.com') child.expect ('Name .*: ') child.sendline ('username') child.expect ('Password:') child.sendline ('password') child.expect ('ftp> ') child.sendline ('

Calling ftp commands from python

2005-08-31 Thread Thierry Lam
Is it possible to run an ftp command to connect to some remote computer on the network. For example, if I want to retrieve some data from \\remcomputer\datafiles on the network and copy it to my local computer, how do I do it in python on the Unix side? I don't want to use mount since I don't hav