List of Python Escape sequence characters with examples

List of Python Escape sequence characters with examples

When programming in Python, escape characters can be used in order to tell the compiler that it should treat the next character or characters differently. For example, we can tell Python to print a quote " as an actual quote character, rather than interpreting it to be part of the Python code. Other special characters like \t can create TAB spaces, and \n can create new lines. In this tutorial, you will see a list of Python escape sequence characters and examples that you can use on a Linux system.

Read more

How to write nautilus extensions with nautilus-python

How to write Nautilus extensions with nautilus-python

Nautilus, also known as “Files”, is the default file manager of the GNOME desktop environment. In a previous tutorial we saw how to create and call custom scripts from the Nautilus context-menu: this feature can be really useful but is somehow limited. By installing the nautilus-python package in our favorite Linux distribution, and writing just few lines of Python code, we can overcome such limitations and create proper Nautilus extensions.

Read more

article-main

How to manage git repositories with Python

Neither Python nor Git need presentations: the former is one of the most used general-purpose programming language; the latter is probably the most used version control system in the world, created by Linus Torvalds himself. Normally, we interact with git repositories using the git binary; when we need to work with them using Python, instead, we can use the GitPython library.

Read more

How to build a Tkinter application using an object oriented approach

In a previous tutorial we saw the basic concepts behind the usage of Tkinter, a library used to create graphical user interfaces with Python. In this article we see how to create a complete although simple application. In the process, we learn how to use threads to handle long running tasks without blocking the interface, how to organize a Tkinter application using an object oriented approach, and how to use Tkinter protocols.

Read more

Getting started with Tkinter for Python tutorial

Tkinter stands for “Tk interface”: the package with the same name on many Linux distributions provides the Python bindings for the Tcl/Tk GUI toolkit. Although other graphical toolkit can be used from Python, like Qt or GTK, Tkinter is the standard (the Python IDLE editor and development environment is written using this toolkit, for example) and probably the easiest to work with.

Read more