Souhaitez-vous apprendre à télécharger des fichiers à partir d’un serveur FTP à l’aide de Python? Dans ce tutoriel, nous allons vous montrer comment utiliser Python pour télécharger des fichiers à partir d’un serveur FTP sur un ordinateur fonctionnant sous 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.

Tutoriel connexe - Python

Sur cette page, nous offrons un accès rapide à une liste de tutoriels liés à Python.

Tutoriel Python 3 - Télécharger le fichier à partir du serveur FTP

Dressez la liste des fichiers distants à partir du serveur FTP à l’aide de Powershell.

Copy to Clipboard

Voici la sortie de commande.

Copy to Clipboard

Téléchargez un fichier à partir du serveur FTP à l’aide de Python.

Copy to Clipboard

Dans notre exemple, nous avons téléchargé une application nommée FIREFOXINSTALLER.

Dans notre exemple, nous avons enregistré le téléchargement à l’intérieur de l’annuaire TMP.

Dans notre exemple, nous avons utilisé le mode binaire.

Accédez à l’annuaire et vérifiez si le fichier a été téléchargé correctement.

Copy to Clipboard

Voici la sortie de commande.

Copy to Clipboard

En option, téléchargez un fichier à partir du serveur FTP.

Copy to Clipboard

félicitations! Vous pouvez télécharger des fichiers à partir du serveur FTP à l’aide de Python 3.

Tutoriel Python 2 - Télécharger le fichier à partir du serveur FTP

Téléchargez un fichier à partir du serveur FTP à l’aide de Python 2.

Copy to Clipboard

félicitations! Vous pouvez télécharger des fichiers à partir du serveur FTP à l’aide de Python 2.