I'm working on a Python project that needs to run as root in order to work properly. Previously I've just run the whole PyCharm IDE as root, but this has some down-sides, and I think I have a better approach now.
The biggest hassle with running the IDE as root …
The recommendation to keep lines widths less than 80 characters is a surprising part of the Python style guide (PEP 8). Really, 79 characters? Is it still the 1980's in Python-land? Maybe it's time to upgrade that monochrome CRT and get some screen real-estate.
Acting a bit on faith, and …
While hooking up SQLAlchemy for a web project, I kept running into attribute errors for 'session_registry'. I figured I was doing something wrong, so I thought I'd just walk through the tutorial as a sanity check.
I was, apparently, insane.
>>> u = session.query(User).filter_by(name='ed').first() Traceback (most …
About a year ago, I set out to get a solid working understanding of Python packaging, resulting in a lengthy blog post of what I learned. There have been some significant course changes over that year such that my original post is wrong in several regards.
Here's a summary of …
Python 3.3 includes a built-in equivalent to the popular virtualenv tool for creating isolated Python environments. One difference with the built-in venv is that it doesn't automatically install pip as virtualenv does. While I can understand the decision (given Python's volatile packaging situation), it isn't very convenient.
Here's a …
IMPORTANT: Some of the information in this post is now obsolete. Please see here.
Randomly take a couple of words from the following list, put them together, and there's a decent chance you'll come up with something real involving Python packaging.
Wouldn't it be nice to be able to save nice clean HTML from Microsoft Word? Here's a way that is only slightly convoluted.
If you use the "Web Page, Filtered" option from Word, you get buried in piles of CSS cruft, but as noted here, you can use the Publish …
I've been doing some work with Linux lately, a new thing for me, and feel a bit like I've been thrown into the deep end and told to swim. Today I updated Python to version 2.7 on an EC2 instance.
Amazon Linux (Basic 64-bit Amazon Linux AMI 2011.09 …