Archive for the 'Python' Category

Python interview questions

Tuesday, October 30th, 2007

Tim Chase posted an interesting list of potential interview questions to comp.lang.python:

While I haven’t interviewed precisely for Python, I’ve been on the other (interviewing) end and can offer a few of the sorts of things I ask. I don’t expect perfect answers to all of them, but they show me a range of what the interviewee knows.

They are grouped by difficulty (basic, broader, advanced, etc.) and seem to be pretty reasonable. Worth taking a look if you want to assess where you fall in the spectrum of Python coders.

Buzhug

Tuesday, August 28th, 2007

Buzhug is a “fast, pure-Python database engine” that is supposed to appear to Python programmers. It doesn’t use SQL, using list comprehensions or generator expressions instead. You end up with syntax something like this:

for record in [ r for r in db if r.name == 'pierre' ]: print record.name,record.age

Interesting, but I’m not sure I’d ever actually use it.

YouTube (still) runs on Python

Thursday, August 23rd, 2007

Although GVR mentioned it back in 2006, I think a lot of people are still completely unaware that YouTube is almost all Python:

I was completely unaware of the fact that the guys at YouTube, the mega site that serves millions of users daily, use Python. And they don’t just use it, their whole damn server side runs on it.

See! Interpreted languages can be fast! :)

Geniusql

Wednesday, August 22nd, 2007

Hrm… Geniusql seems to be getting quite a bit of buzz lately:

Geniusql is a public domain, low-level Object-Relational Mapper for Python applications. If you’re familiar with Martin Fowler’s work, you can think of Geniusql as providing a Data Source layer. It primarily uses a generic Table Data Gateway architecture (as opposed to the more tightly-coupled Active Record architecture recently popularized by Ruby On Rails and Django).

I haven’t personally used it (yet).

Django in command-line scripts

Wednesday, August 22nd, 2007

Now here’s something that seems unusual… using Django in command-line scripts:

Sometimes, I need to write command-line scripts to populate a database with information from some other source, like a webpage or third-party database. Since Django uses MySQL (among others) for its backend storage, it’s fairly easy to use Perl or any other language for this task. Problem is, it’s very boring and fiddly, so now I tend to use Django instead, which is really easy.

Interesting.

Who uses Python?

Friday, June 8th, 2007

Apparently quite a few people do.

ZOMG it’s LOLPython!

Thursday, June 7th, 2007

Claiming to combine “the cuteness of LOLCODE and
the cuddliness of Python,” a new horror has been spawned… LOLPython!

Penetration testing with Python

Monday, June 4th, 2007

Related, no doubt, to the upcoming CPLUG CTF event at Messiah College, Patrick has a post about penetration testing with Python. The two main tools he mentions are Scapy and Inline Egg, both of which are quite cool.

Projects in the Django ecosystem

Wednesday, May 23rd, 2007

Quoth Jacob Kaplan-Moss:

I’ve always thought that the sign of a healthy Open Source project is a vibrant ecosystem around that project. That’s why I’ve been thrilled to see that there are a bunch of cool third-party Django add-ons popping up. I thought I’d take a few minutes and give a shout out to some of my favorites…

He lists four projects that sound interesting.

Mutt, urlview, and Python

Wednesday, May 2nd, 2007

Patrick solves his urlview problem with a bit of Python. Not a bad solution, and his script is a decent example of using the Python Curses bindings. Pretty cool.