Post tagged: python

Inetd like service with systemd

This is an example of a socket-activated per-connection service (which is usually referred to as inetd-like service). A thorough explanation can be found at 0pointer.de. Define a socket unit The key point here is to specify Accept=yes, which will make the socket accept connections (behaving like inetd) and pass ...

Python GUI

After looking a multiple options of GUI programming under python I eventually settled for tkinter. The main reason was that tkinter is very ubiquitous and initially though the learning curve wuld have shorter as I was very used to GUI programming using TCL/TK. Turned out that what I known TCL/TK did not translate ...

Python Virtual Environments

This is the least you need to know to get to use a Python virtual environment. What is a Virtual Environment At its core, the main purpose of Python virtual environments is to create an isolated environment for Python projects. This means that each project can have its own dependencies, regardless of what ...

Writing Safe Shell scripts

Writing shell scripts leaves a lot of room to make mistakes, in ways that will cause your scripts to break on certain input, or (if some input is untrusted) open up security vulnerabilities. Here are some tips on how to make your shell scripts safer. Don't The simplest step is to avoid using shell at all. Many higher-level languages are both easier to write the code in in the first place, and avoid some of the issues that shell ...

Backing up GMail

The other day I found Gmvault. Gmvault is an open source Gmail backup software written in Python. This article provides a good overview on how it works (found it better than the Gmvault documentation): How to back up and restore Gmail account on Linux ...