nanodano's blog

Advertisement

Advertisement

Curses Programming in Python

The curses and ncurses (new curses) libraries go back to 1980's and 90's and provide an API to create textual user interfaces (TUI). If you write a command-line application, you should consider using curses to implement functionality you could not otherwise do with standard console output. The text editor nano is a good example of a ncurses application. We will look at how to use this library in Python.

Python3 Qt5 (PyQt5) Tutorial

Qt is a robust cross-platform framework that works on Windows, Linux, Mac, Android, and more. It allows you to create GUI applications as well as provides libraries for networking,

In this tutorial, we will focus on some of the very core aspects of using PyQt5 and how to package it for distribution.

Here is an example project I created using Pyqt5: https://github.com/DevDungeon/PyQt5-Bitcoin-Price-Checker and the live coding of that project https://www.devdungeon.com/content/live-coding-pyqt5-guis-w-python.

PyInstaller Tutorial

PyInstaller can be used to create .exe files for Windows, .app files for Mac, and distributable packages for Linux. Optionally, it can create a single file which is more convenient for distributing, but takes slightly longer to start because it unzip itself.

This tutorial walks through the process of installing and using PyInstaller to create distributable packages.

VirtualBox Disk Encryption Tutorial

VirtualBox allows you to encrypt the virtual disk files at the VM level. This means you can use VirtualBox to encrypt the disks even if the operating system you are installing does not support disk encryption or you simply prefer not to use something like LVM disk encryption. One benefit of doing this is that you can still use dynamically expanding disks. If you choose an encrypted LVM disk, you can end up with the maximum size of the virtual disk being used which is highly inefficient for disk space.

Enhanced Shell Scripting with Ruby

Ruby is a better Perl and in my opinion is an essential language for system administrators. If you are still writing scripts in Bash, I hope this inspires you to start integrating Ruby in to your shell scripts. I will show you how you can ease in to it and make the transition very smoothly.

The idea with 'enhanced shell scripting' is to create hybrid Ruby/Bash scripts. The reason for this is to take advantage of both worlds. Ruby makes it seamless to pass data back and forth with shell commands.

There are many times when running shell commands is easier or required when there is an external command-line utilities you need to run.

On the other hand, Bash syntax is quite ugly and difficult to remember, and it has very limited features. Ruby offers two tons of object-oriented power, along with tons of libraries and better syntax.

We will look at how to write 'enhanced shell scripts' using Ruby and other tips on taking advantage of both worlds.

Advertisement

Advertisement