Posts Tagged python

Get a random subsequence of elements

Here’s a bit of code to create a sequence of random elements of a desired length, initialized from another sequence.

,

Leave a comment

Faster django unit tests

I was reading through some of the django test documentation and discovered that when your db backend is sqlite3, your test database is created in-memory. I don’t run my test suite as often as I should because it takes a long time (several minutes — I have a real short attention span). An in-memory database […]

, ,

6 Comments

Make Python Scripts Droppable in Windows

I’m writing an FTP uploader in python, and I want to be able to drop a folder on my script to make it go, using the dropped folder as the argument. Unfortunately, Windows doesn’t recognize .py files as drop targets†.

, , ,

3 Comments