How to transfer files over a network using Python

I recently had to transfer a couple of files from a desktop computer to my phone. Doing this is easy when you have a USB cable in hand, unfortunately I didn’t have a USB cable with me when I needed to transfer the files. The desktop that had the files I needed did not have … 

 

An alternative Python interpreter.

Running code in the default Python interpreter is great as long as the code you write is short and you don’t make mistakes while typing the code in. After a couple of lines and multiple levels of indentation, using the interpreter becomes difficult. bpython is a good alternative to consider. bpython is a fancy interface … 

 

String Manipulation part 2: Regular Expressions

Regular Expressions in Python Regular Expressions (also known as REs, regexes or regex patterns) are a small and highly specialised programming language used to search for patterns in text strings. Regular Expressions allow you to specify patterns or rules that you want to match in a string. The patterns you define can be for matching: … 

 

String manipulation in Python.

Strings are one of the most fundamental data types. Strings in Python can be expressed in a number of ways. The most common way to create a new string is to enclose text in single or double quotes. Strings in Python are immutable, which means that they cannot be modified once they are created. That … 

 

Recommended resources for intermediate developers

In a previous article, I discussed resources that I recommend for beginners. In this post, I’ll cover a few intermediate Python books and websites. Python 201 by Michael Driscoll The first book in the list is Python 201 by Michael Driscoll. This is the book to read if you already know the basics of Python … 

 

Python command line interfaces: An overview of argparse.

Command-line or console applications are programs that are designed to be used via a text only interface such as the terminal. Command-line programs accept instructions or commands from their users in the form of flags or switches. Popular command-line applications include: git – A version control system Vim – A text editor and Grep – … 

 

Top 8 resources for Python beginners

Python is a popular, easy to learn programming language that is great option for beginners. There are a ton of good resources available online to get you started in learning Python programming. Because of this, It can be difficult for someone new to Python to know where to start or what books or courses to … 

 

An overview of the enumerate() function

According to the Python documentation, the enumerate function is a built in function that returns an enumerate object. Another popular article on the subject describes it as a function that allows you to “generate iterator element along with index”. I find these two definitions unclear. Here’s an explanation that makes more sense: the enumerate function … 

 

Exception handling in Python

Exception Handling There are at least two types of errors in the Python programming language: Syntax errors and Exceptions. Syntax Errors Syntax errors are sometimes referred to as parsing errors. These are fatal errors that occur when the code cannot be executed because of incorrect arguments passed to a function, typing or spelling error or … 

 

Getting started with SQLite in Python

Getting started with sqlite in Python SQLite is a lightweight disk-based relational database engine that does not require a separate server process. It allows you to access databases using the SQL language. A relational database is a collection of data organised and formally described in tables that consist of rows and columns. A simple analogy …