Skip to content

Tag Archives: python

Python’s trailing-comma syntax (a complaint)

I’ve been using Python for something over a year now, and I love it. I learned it on-the-fly, and it says a lot for the design of the language that I could pick it up so easily but that I still find it powerful and flexible a year later. But there is one feature of [...]

Frustration

tikitu@tikitu-laptop:~/work/buzzcapture/dev$ sudo pip install django-model-utils Unknown or unsupported command ‘install’ tikitu@tikitu-laptop:~/work/buzzcapture/dev$ pip Did not provide a command tikitu@tikitu-laptop:~/work/buzzcapture/dev$ pip help Unknown or unsupported command ‘help’ tikitu@tikitu-laptop:~/work/buzzcapture/dev$ pip –help Unknown option: help Did not provide a command tikitu@tikitu-laptop:~/work/buzzcapture/dev$ sudo apt-get remove pip

Python datetime conversions

Recently for my work I had to do some date/time-wrangling in Python. We have a database containing unix timestamp values, and the front-end application needs to talk local time. The necessary conversions aren’t so complicated, but Python makes life a bit harder by having three relevant modules, three relevant data types (not matching the modules), [...]