Is there a way to share headers in python? I am importing the same things in different controllers in pylons.
Try putting the generic code into a file __init__.py . As in here : "The file is __init__.py usually empty, but can be used to export selected portions of the package under more convenient names, hold convenience functions, etc."
__init__.py
You can put the "header" in your own module and then, wherever you need it, do
from myheadermodule import *