Tips and Traps¶
The command-line tool of some (e.g., network) applications might be slow to authenticate. If you use pexect to automate such a command-line tool, it is best to wait for sometime after sending password using
child.sendline(passwd)
. If the authentication has ouput on both success and failure, a smart way is to wait for the success or failure message to come out.
IPython Is the Best Shell
IPython is the Best Shell!
-
Use IPython as much as possible.
- IPython has virtues of both shell and Python.
- You should avoid using shell scripts for complicate tasks any way.
-
If you do want to use a Unix/Linux shell, I'd suggest you stick to Bash unless Linux distributions start …
Python Alternatives to Shell
Extracting PDF Pages Using the Python Package PyPDF
- The Python package PyPDF can be used to extract pages from a PDF file. The function aiutil.pdf.extract_pages is a wrapper over PyPDF which makes it even easier to extract pages from a PDF file.
- Stirling-PDF is is a robust, locally hosted web-based PDF manipulation tool using Docker.
Install Rust Globally in Linux
There are 3 ways to install a global standalone version of Rust in Linux.
The recommended way is to use rustup
with customized environment variables.
Using a Package Management Tool
Some Linux distributions provide packages for Rust. Taking Debian/Ubuntu based Linux distributions as an example, you can install a …
Take Screenshot on Linux
ksnip
Ksnip is a Qt-based cross-platform screenshot tool that provides many annotation features for your screenshots. It is one of the best screenshot applications.
Installation Using snap
sudo snap install ksnip
flameshot
Flameshot is a simple cross-platform screenshot software.
Shutter
Shutter is a good screenshot application for Linux (only).