Article Archives

BigCommerce Templates

Creating a .pth file

An easy way to add packages to the Python path without actually adding them to the dist / site packages is by using a pth file. All you have to do is create a new file inside of the dist / site packages folder (the name of the file does not matter) and give it a .pth extension like this: django.pth

In that file you can add the path to your Django package like this:

/var/src/Django-1.2.3

You can also add multiple paths on separate lines.

The advantage of doing this is that you can keep your packages in a folder such as /var/src/ which allows you to keep the code under some sort of version control system (mercurial, git etc.).

Meta

Published: April 6, 2011

Author: Emilian Felecan

Comments:  

Word Count: 121

Next: CouchDB + Django + Couchdbkit

Previous: Creating a PostgreSQL User and Database

Bookmark and Share

Tags

None

Comments powered by Disqus