Home

My experience with Python

Python has become my preferred programming language, and it is easy to understand why: its versatility, ease of use, and the robust set of features that make development efficient. The multiprocessing module stands out for its simplicity while providing immense utility in parallel processing tasks. The argparse library is particularly valuable for crafting intuitive command-line interfaces (CLI), enhancing productivity without compromising on functionality.

One of Python’s standout features for me is its built-in support for SQLite, which has significantly influenced my approach to database management. For personal and small-scale applications, SQLite meets all the needs without the overhead associated with traditional hosted databases outside of enterprise-level deployments.

My current projects are predominantly written in Python due to its comprehensive ecosystem and ease of development. The language’s core functionality, along with the extensive collection of PyPI modules for more specialized tasks, ensures that I can cover almost any requirement efficiently.

I especially enjoy building utility tools for various system administration tasks. Some of these tools have are quite widely useful:

  1. Imgfind: An image management tool that searches metadata and allows modification of images, including recompressing/optimizing them in bulk. It functions similarly to GNU findutils for searching, while also offering a versatile solution for image manipulation tasks.

  2. Ren: A batch file renaming tool built using Python’s powerful standard library features. Ren simplifies bulk naming operations with Python formatting syntax, making it a handy utility for managing files in large directories.

One of my Git repositories, home, contains numerous Python-based utilities designed for specific system administration needs:

  • dedup.py: A tool for deduplicating files by linking or deleting duplicates with customizable filters.

  • relink.py: Simplifies the process of bulk modifying symbolic links using path string substitutions and recursive operations.

  • relink-relative.py: Converts absolute to relative symlinks, enhancing portability in distributed environments.

  • ytdl-db.py: A script that functions as a standalone utility or integrates with yt-dlp post-process hooks. It records metadata about downloaded videos and playlists into an SQLite database. In the long term, I aim to incorporate this functionality into mytube for seamless import/discovery of archived video metadata.

These scripts exemplify Python’s power in simplicity, making it an excellent alternative to bash scripts when additional flexibility is required. Previously, I relied on PHP or Node.js for similar tasks due to familiarity and specific language features; however, the integration capabilities and cross-platform availability of Python have made it my go-to choice for utilities.

For graphical applications, the integration with GTK and Qt frameworks allows me to build powerful GUI applications efficiently. SQLite proves invaluable here by persisting settings and UI state in a manner that is both cross-platform and easily extensible.

While I still favor PHP for web application development due to the wide range of robust frameworks available, Python’s versatility ensures it remains my preferred choice for command-line tools and small-scale utilities. The language’s balance of power and simplicity makes it a standout option for developers like myself, capable of handling complex tasks while maintaining portability and lightweight performance.

Looking ahead, I am excited about the potential to explore more sophisticated projects using Python, especially with its growing ecosystem and community support.