¿Desea aprender a cargar archivos en un servidor FTP con Python? En este tutorial, vamos a mostrarle cómo utilizar Python para cargar un archivo en un servidor FTP en Linux.

• Ubuntu 20
• Ubuntu 19
• Ubuntu 18
• Python 3.8.5
• Python 2.7.18

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

Tutorial relacionado - Python

En esta página, ofrecemos acceso rápido a una lista de tutoriales relacionados con Python.

Tutorial Python 3 - Cargar archivo en el servidor FTP

Cargue un archivo en el servidor FTP mediante Python.

Copy to Clipboard

En nuestro ejemplo, cargamos un archivo de texto denominado TEST desde el directorio TMP al servidor FTP.

En nuestro ejemplo, usamos el modo binario.

Enumere los archivos remotos del servidor FTP mediante Python.

Copy to Clipboard

Aquí está la salida del comando.

Copy to Clipboard

¡Felicitaciones! Puede cargar archivos en un servidor FTP mediante Python 3.

Tutorial Python 2 - Cargar archivo en el servidor FTP

Cargue un archivo en el servidor FTP mediante Python 2.

Copy to Clipboard

¡Felicitaciones! Puede cargar archivos en un servidor FTP mediante Python 2.