# Calling ftp commands from python

Maurice LING mauriceling at acm.org
Thu Sep 1 02:57:24 CEST 2005

```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 want to use mount since I don't have permission.
>
> Thanks
> Thierry
>

I use ftplib in the standard libraries.

from ftplib import FTP

def grab_geneontology():
ftp = FTP('ftp.geneontology.org')