Using the CSV module in Python
If you want to import or export spreadsheets and databases for use in the Python interpreter, you must rely on the CSV module, or Comma Separated Values format. What is a CSV File? CSV files are used...
View ArticleHow to use the Pexpect Module
This article is based on documentation from http://www.noah.org/wiki/pexpect and http://pypi.python.org/pypi/pexpect/ The reason I started to use Pexepect was because I was looking for a module that...
View ArticlePython’s OS Module
Overview The OS module in Python provides a way of using operating system dependent functionality. The functions that the OS module provides allows you to interface with the underlying operating system...
View ArticleRegular Expressions in Python
What is a Regular Expression? It’s a string pattern written in a compact syntax, that allows us to quickly check whether a given string matches or contains a given pattern. The power of regular...
View ArticleHow to use Fabric in Python
What is Fabric? Fabric is a Python library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. Typical usage involves creating a Python...
View ArticleHow to use Fabric in a development environment
Overview I earlier wrote a post on "How to use Fabric in Python", which can be found here. I received a lot of responses from that article, so I decided to write another post about Fabric. This time I...
View ArticlePython System Administration
Overview The OS module in Python provides a way of using operating system dependent functionality. The functions that the OS module provides allows you to interface with the underlying operating system...
View ArticleSubprocess and Shell Commands in Python
Subprocess Overview For a long time I have been using os.system() when dealing with system administration tasks in Python. The main reason for that, was that I thought that was the simplest way of...
View ArticleReading and Writing Files in Python
Overview When you’re working with Python, you don’t need to import a library in order to read and write to a file. It’s handled natively in the language, albeit in a unique manner. Below, we outline...
View ArticleWith Open Statement in Python
In Python, you can access a file by using the open() method. However, using the open() method requires you to use the close() method to close the file explicitly. Instead, you can create a context...
View Article