print line numbers in a Python script:
import sys frame = sys._getframe() print frame.f_lineno
Python - date from Unix timestamp
import datetime print(datetime.datetime.fromtimestamp(int("1284101485")).strftime('%Y-%m-%d %H:%M:%S'))
get a list of all available subcommands:
python manage.py help
Back on January 29th, PyLadies Austin held a micro workshop to cover Git/GitHub.
It was a quick hands-on introduction to the core features of Git, as well as some of the things you can do with GitHub. The group was very small (just six people) and informal. It ...
At PyCon 2013, I'll be participating in my first-ever tutorial, helping Katie Cunningham as we introduce 12- to 18-year-olds to the world of Python coding.
From the official description:
- "This free tutorial will explore how to program using Python by making games. The workshop will start with learning Python's simple ...
At the end of every year I see people saying something like "Good riddance, Year X, you sucked, let's hope Year Y brings something better." I've got good reason to say something like that as well - this year brought something pretty big and awful with it. But it also ...