1. Home
  2. Computing & Technology
  3. Python

Building an FTP Client in Python

From , former About.com Guide

2 of 6

Importing ftplib

The first step is to import ftplib. As mentioned in the guides on building a simple web server and building a web client, the socket module is used by most every Python module that needs to interface with a port. The FTP library is no different. It relies primarily on the SOCKS module but defers to the socket module if the former is not found. The socket module ships with standard Python. The ftplib module takes care of creating the socket connection and maintaining it. So fire up your favourite text editor and enter the following:
import ftplib
Next, we will look at how to initiate the connection.
Explore Python
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Python
  4. Networking
  5. Python Networking - FTP in Python - Building an FTP Client in Python

©2009 About.com, a part of The New York Times Company.

All rights reserved.