views:

122

answers:

2

Hi there!

I have a TG 1.0 application (not 1.1 -- I'm not sure I can convince the admin to upgrade) running. I have my own checkout of the project from cvs that I'm developing with, and it's come time to integrate xlwt (http://www.python-excel.org/) into the web app.

However, I don't have administrator access and it's not easy to get python packages installed by the administrator. What's more is that the app might be run on different servers, so I'd love to get a self-contained solution. I looked at:

http://peak.telecommunity.com/DevCenter/EasyInstall#custom-installation-locations

To see if I could figure out how to easy_install my troubles away, but I'm stuck with not really knowing how python is installed on the system. I do know that my user has a blank PYTHONPATH, that python is being run from /usr/local/python, and that the application is running just fine at the moment. I'd love to just have a PYTHONPATH="." so I can drop the egg files into the project directory, but I don't know how to make the actual configuration of the app honour this PYTHONPATH.

Any clues? Thanks!

A: 

So, if anyone wants an easy answer for this: I inspected sys.path at run-time of my program and it turns out the root of the project (not the directory with templates/ and controllers in it, but its parent) is on it. So I added the directories to there and... voila! So I would suggest this as opposed to mucking about with python paths and such.

sastraxi
+1  A: 

Why don't you use just Virtualenv, create a Python installation which you (as a user own) and install the TG egg inside that? This would make it convenient for you to install non-standard packages as well. I did this since I couldn't get my admin to install the stuff I needed.

Noufal Ibrahim