Tag Archives: Python 101

Python 101: An Intro to ftplib

The File Transfer Protocol (FTP) is used by many companies and organizations for sharing data. Python provides an File Transfer Protocol module in its standard library called ftplib that implements the client side of the FTP protocol. You can learn all about the File Transfer Protocol by reading the RFC 959 document on the Internet. However the full specification is outside the scope of this article. Instead we will focus on the following topics:

  • Connecting to an FTP server
  • Navigating it’s structure
  • Downloading files from the FTP server
  • Uploading files to an FTP server

Let’s get started!

Continue reading Python 101: An Intro to ftplib

Python 101 Screencast Released

The Python 101 Screencast has been finished for a little over a month now and I am now releasing it for general consumption.

mousecovertitlejpg_sm_title

The Python 101 Screencast is based on my book, Python 101. I went through all 44 chapters of the book and turned each of them into a standalone screencast. In other words, the screencast covers 44 videos. You can view the first eleven videos on my blog’s youTube page.

What you get:

A minimum of 44 episodes + you will receive a PDF, MOBI and EPUB version of the Python 101 book with your purchase. You will also receive a PDF copy formatted to A4 size.

Part One

The first part is the beginner section. In it you will learn all the basics of Python. From Python types (strings, lists, dictionaries) to conditional statements to loops. You will also learn about comprehensions, functions and classes and everything in between!

Part Two

This section is a curated tour of the Python Standard Library. The intent isn’t to cover everything in it, but instead it is to show the reader that you can do a lot with Python right out of the box. We’ll be covering the modules I find the most useful in day-to-day programming tasks, such as os, sys, logging, threads, and more.

Part Three

An all intermediate section covering lambda, decorators, properties, debugging, testing and profiling.

Part Four

Now things get really interesting! In part four, we will be learning how to install 3rd party libraries (i.e. packages) from the Python Package Index and other locations. We will cover easy_install and pip. This section will also be a series of tutorials where you will learn how to use the packages you download. For example, you will learn how to download a file, parse XML, use an Object Relational Mapper to work with a database, etc.

Part Five

The last section of the series will cover how to share your code with your friends and the world! You will learn how to package it up and share it on the Python Package Index (i.e. how to create an egg or wheel). You will also learn how to create executables using py2exe, bb_freeze, cx_freeze and PyInstaller. Finally you will learn how to create an installer using Inno Setup

Buy Now

Python 101 Christmas Sale

I’m putting my book, Python 101, on sale for the rest of the month of December. You can now get it for 50% off of the eBook by using the following offer code: xmas2015

This code also works for pre-ordering the Python 101 Screencast, which is a series of videos based on the Python 101 book. There are currently 29 of the 44 videos that are finished, but there will be more by the end of the week. Enjoy!

Python 101: Lambda Basics

Many programming languages have the concept of the lambda function. In Python, the lambda is an anonymous function or unbound function. The syntax for them looks a bit odd, but it’s actually just taking a simple function and turning it into a one-liner. Let’s look at a regular simple function to start off:

#----------------------------------------------------------------------
def doubler(x):
    return x*2

All this function does is take an integer and double it. Technically, it will also double other things too since there’s no type checking but that is its intent Now let’s turn it into a lambda function!

Continue reading Python 101: Lambda Basics

Python 101 Back-to-School Sale

I am launching a back-to-school sale of my Python 101 course. You can get the Python 101 book now for 50% by using the following offer code: fall2015. This offer is good until September 15, 2015.

You can also get my Python 101 Screencast for 50% off (i.e. $25 no offer code required). It includes the book, but it should be noted that it won’t be completed until December 2015. There are 15 videos completed at this time. The first 11 are available free of charge on Youtube, so you can try before you buy.

Python 101 Screencast Available for Pre-Order

The Python 101 Screencast is now available for Pre-Order. If you pre-order the screencast series, then you will receive what I currently have finished (12 videos + the eBook) and then receive updates as I add new ones. There will be a minimum of 44 videos. Upon purchase, you will be able to stream or download the videos at any time.

The screencasts are based off my book, Python 101. Each screencast is based on a chapter from the book. The first 11 videos are available free of charge so you can try-before-you-buy! You can check them out on Youtube here.

Python 101: Episode #11 – Classes

I meant to post this earlier, but I’ve been experiencing some issues with my laptop. Anyway, here’s the last free video from my Python 101 Screencast series. In this episode, you will learn the basics of using classes in Python 3. I hope you enjoy it!

Python 101: Episode #10 – Functions

I recently completed Episode #10 of the Python 101 Screencast. It’s about the basics of functions. I hope you like it!

Python 101: Episode #9 – Imports

Check out my latest episode of Python 101. This one is talks about how imports work in Python. You will learn about the following aspects of importing:

  • import
  • from module import submodule
  • from module import *

Enjoy!

Python 101 Screencast: Episode #8 – File I/O

Check out my latest video from the Python 101 Screencast. In this episode we learn how to use Python’s file handling capabilities. You will learn how to read, write and append to a file.