Need help with data files and

I’m working on a package that includes some files that are meant to be copied and edited by people using the package.

My project is named “pitz” and it is a bugtracker. Instead of using a config file to set the options for a project, I want to use python files.

When somebody installs pitz, I want to save some .py files somewhere so that when they run my pitz-setup script, I can go find those .py files and copy them into their working directory.

I have two questions:

  1. Do I need to write my file to specify that the .py files in particular directory need to be treated like data, not code? For example, I don’t want the installer to hide those files inside an egg.
  2. How can I find those .py files later and copy them?

Here’s my so far:

from setuptools import setup, find_packages
version = '0.1'
description="Python to-do tracker inspired by ditz (",

ditz ( is the best distributed ticketing
system that I know of. There's a few things I want to change, so I
started pitz.""",

author='Matt Wilson',
author_email='[email protected]',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),



# 'PyYAML',
# 'sphinx',
# 'nose',
# 'jinja2',
# -*- Extra requirements: -*-

# I know about the much fancier entry points, but I prefer this
# solution. Why does everything have to be zany?
scripts = ['scripts/pitz-shell'],

test_suite = 'nose.collector',

When I run python install, I do get those .sample files copied, but they get copied into a folder way inside of my pitz install:

$ cd ~/virtualenvs/scratch/lib/
$ find -type f -name '*.sample'

I don’t know how I can write a script to copy those files out. Maybe I can ask pitz what its version is, and then build a tring and use os.path.join, but that doesn’t look like any fun at all.

So, what should I do instead?

Funny blog

The Houston Chronicle is doing something that I haven’t seen any other paper do — it hosts blogs and photos for its readers, and it draws links to those blogs from the front page.

Anyhow, I like this post a lot.

Posted in mlp

I really like The Knife

Random thoughts: Why does Sweden have so many bands that appeal to me? This song makes me think about Suspended in Gaffa by Kate Bush and separately a bunch of 1980s new wave bands. I’m sure all the cool kids have already moved on from The Knife to a band I won’t discover until after Sarah Palin gets sworn in (evil always wins — just accept it).

Olympic mishap

Three comments:

  1. Why did they have a team of people ready to run out with visual shields to block the stage? Are horrifying injuries so expected that they plan how to hide them quickly?
  2. Who decided to play the slow-mo replay, followed by the super slo-mo replay?
  3. I’m using some hebrew font for the numbers in this list. Isn’t that neat?
Posted in mlp