Python Script Template

Sept. 16, 2023 | Tags: Python shell aliases

I often found myself writing the same basic script whenever I needed to start writing a small script for testing something or for writing a fully fledged program. And, of course, writing the same thing over and over again it gets tedious and boring. At some point, I figured it would be great to have a command that I can invoke and copy, from a template, this base.

[Read more]

Debugging in python: ipdb, getting started.

June 21, 2023 | Tags: Python debugging

Python has a debugger shipped with the standard library: pdb. It allows you to stop the execution of your program and inspect the variables, methods and current state of your python program. However, while it works and does its job, I find myself often needing a bit more help than the debugger itself.

[Read more]

How do I manage python virtual environmental with multiple python versions.

Feb. 19, 2023 | Tags: Python virtualenv dev tools

Recently, no I've been working with different python versions for different projects at work. So far I used pyenv and pyenv-virtualenv with variously degrees of success. However, it become cumbersome quickly managing different python versions, tools that only work with a single python installation at a time and at some point something stopped working and got tired of it.

[Read more]