Get a Python Package Version
Part of maintaining a Django-based application like MDN's kuma is ensuring Python packages are up to date. I was recently testing an upgrade on a remote system and needed to ensure that a given Python package was at the version number it should be. Here's how I retrieved the package version:
import nose # Nose is a test utility. Replace with your desired package here.
# Output: 0.3.1
__version__ property returns the exact version number for a Python package. Some Python packages use a
VERSION property as well, but
__version__ should be the most reliable.
Your early CSS books were instrumental in pushing my love for front end technologies. What was it about CSS that you fell in love with and drove you to write about it?
At first blush, it was the simplicity of it as compared to the table-and-spacer...
I love almost every part of being a tech blogger: learning, preaching, bantering, researching. The one part about blogging that I absolutely loathe: dealing with SPAM comments. For the past two years, my blog has registered 8,000+ SPAM comments per day. PER DAY. Bloating my database...
One of my guilty pleasures is scoping out the latest celebrity gossip from PerezHilton.com, DListed.com, and JoBlo.com. Unfortunately, these sites occasionally post NSFW pictures which makes checking these sites on lunch a huge gamble -- a trip to HR's office could be just a click away.
Before you send your user to an unknown external website, why not provide them a screenshot of the site via a tooltip so they may preview the upcoming page? Here's how you can do just that using MooTools.
The first step is to grab...