The card I gave myself today says “Read Python language docs until I have written down 10 new things.” Why? Somebody pointed out that var = val or '-' was cleaner than the mess I used instead, and I realized that much more effort is required. (Were it Perl, I’d probably …
Articles by Jeff Trawick
Is a script to run a command within a virtualenv missing from virtualenv?
Sometimes the python command in the virtualenv isn’t quite enough.
Contents of script run_with_env.sh:
#!/bin/sh envdir=$1 shift curdir=$1 shift . $envdir/bin/activate && cd $curdir && exec "$@"
This runs a specified command (plus arguments) in a particular directory within a particular virtualenv.
Example use:
$ crontab -l ... 30 …
Google App Engine: skipping complete directory via skip_files
I forgot all about the skip_files in app.yaml and asked my favorite search engine what to do. A number of the top pages returned made it unnecessarily complicated. Just do this to skip directories (.idea and tools in this example):
... skip_files: - ^(.*/)?#.*#$ - ^(.*/)?.*~$ - ^(.*/)?.*\.py[co]$ - ^(.*/)?.*/RCS/.*$ - ^(.*/)?\..*$ - ^\.idea$ - ^tools$ ...
(These are top-level …
Another year (or two), another release of mod_whatkilledus and mod_backtrace
mod_whatkilledus and mod_backtrace V2.01
I have a sinking feeling that this isn’t pertinent to a fairly large percentage of the world’s inhabitants, but it was a fair amount of hours spread over time and it’s finally done, so I’ll pretend otherwise.
mod_whatkilledus improvements
- The name …