Author: Wolfram Donat

How to: FTP Uploads with Python

Introduction

In another article on using ftplib in Python, we talked about using Python’s ftplib library to connect to an FTP server and download both binary and text files to our local machine. In this segment, I’ll introduce several new concepts, including uploading text and binary files, error handling, and common directory commands using the same imported library.
.

Prerequisites

It is difficult to experiment with many of these calls with a server that you don’t own–most FTP servers will not allow anonymous logins. Assuming you do not have access to a web-based FTP server, your best bet is to install a server on your local machine (see “Installing an FTP server“) and test your code using localhost as the target server.
.

FTP Uploads

As with downloads, you’ll need to specify whether a file you wish to upload to a server is a text file or a binary file since each uses a different method. You can upload text files using the storlines() method and binary files with the storbinary() method. A nice feature of these functions is that neither one requires you to write a separate function to handle reading the source file: storlines() calls the readline() method on each line in the file until it reads the last line, while storbinary() uses the read() method until there is no more data to read and upload.

Read More


How to Install Your Own FTP Server

Introduction

If you’re interested in learning about networking, or if you have files that you would like to share with the world at large, then at some point you’re probably going to want to get an FTP server running on a machine. There is a vast array of options for a server, depending on what operating system your server is running and how much work you want to put in to setting it up. Read on for instructions on how to get free FTP servers up and running quickly using Linux, Mac, or Windows. All of the software mentioned here is free; paid FTP server programs do exist, but almost anything you need to do with an FTP server can be done with an open-source program.

Read More


How to FTP with Python: The Basics

Introduction

If you’re running a server of any kind or dealing with¬†cloud server¬†storage, at some point you’ll probably find it necessary to use FTP. FTP stands for File Transfer Protocol and is the de facto standard for transferring files from one place to another. Python has a fully mature FTP library that any script can utilize with a simple import statement. That library, called ftplib, is both easy to use and very useful.
.

Prerequisites

  • Basic familiarity with Python interactive session and scripts.

What is FTP?

FTP is a standard network protocol that allows for the transfer files from one computer to another over a network. It uses a client/server model, where the client computer makes requests of the server–requests to download or upload files, create and delete directories and files, and other common file operations. It commonly uses clear text authentication, with a simple user/password scheme, but often FTP servers are configured to allow anonymous access (to allow unlimited clients to download particular files without needing individual logins, for instance.)

Many of the most common uses of FTP are via a graphical interface, using software such as Filezilla, Cyberduck, or WinSCP. These programs make using FTP a simple matter of dragging and dropping files between servers and clients, and right-clicking for context menus. You can also use a web browser to connect to many FTP servers; the browser takes care of the actual mechanics of the FTP connection, but you lose many of the features that dedicated FTP clients have.

Read More


How to: Socket Programming in Python

Wolfram Donat November 24, 2015 by under VPS Hosting 0 Comments

Introduction

Network and communication programming are particularly powerful uses of any programming language. It is much more common these days for computers to interface with one another (or with an entire network, such as the Internet) than it is for a machine to act alone, and knowing exactly how that communication takes place is an important skill for any programmer. If you happen to be a Python aficionado, you may be aware that Python has several complete libraries designed to make network programming simple.
.

Prerequisites

  • Any version of Python (See our Guide for installing Python 2.7 in Centos)
  • Basic understanding of Python

Read More


What is Python: An Intro to a Cross-Platform Programming Language

Wolfram Donat November 11, 2015 by under VPS Hosting 0 Comments
Python Illustration by Walker Cahall

Python Illustration by Walker Cahall

Target audience

This article assumes the reader has at least a basic familiarity with programming languages.

Introduction

Any Introduction to Computer Science course would be incomplete without a mention of Python. It may seem relatively new to the programming languages scene, but it has been in use since the early 1990s. Scores of large corporations, including Google, Facebook, and even NASA and the Jet Propulsion Laboratory in Pasadena, are among the organizations who make use of Python.
.

Python’s Origin Story

Python was developed by Guido van Rossum in the late 1980s, incorporating what he saw as improvements to the ABC programming language. Because he is a huge fan of Monty Python, the British comedy troupe, he named the language “Python”, even going so far as to call the integrated development environment, or IDE, IDLE in honor of Eric Idle, one of the group’s members.

Van Rossum is still one of the language’s principal authors and contributors, and has received the title of BDFL (Benevolent Dictator For Life) from the Python community.

Read More


HTTP vs. HTTPS : What is the difference?

Wolfram Donat October 14, 2015 by under VPS Hosting 0 Comments
Target audience

This article is geared toward a general reader with a basic understanding of how the Internet works.

Introduction

When you surf the Internet, most web pages are delivered to your computer using a communications protocol called HTTP, which serves the vast majority of web pages on the World Wide Web. However, it can be a vulnerable communications scheme, which is where HTTPS comes into play.

Read More


What Is UART (Universal Asynchronous Receiver/Transmitter)

Wolfram Donat September 28, 2015 by under VPS Hosting 0 Comments
Target Audience

This article assumes that the reader has a basic understanding of electronic devices, circuits, and terminology.

Introduction

In the world of embedded device communications, there is a small handful of protocols that are used for many different applications. It is often the case that more common protocols that are commonly used for everyday operations, such as FTP and TCP, either do not work with small embedded devices or are unsuitable (often due to power or space requirements). It is in cases like these that more basic, ‘down to the metal’ communications standards such as UART are very useful.

Read More


What Is I2C (Inter-Integrated-Circuit)?

Wolfram Donat September 16, 2015 by under VPS Hosting 0 Comments
Target Audience

This article assumes that the reader is familiar with basic electronics circuits and terminology.

Introduction

The purpose of this article is to familiarize the reader with the basics of the I2C communications bus, including how it is set up, its physical properties, and where and why it is often used.

Read More


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources