If a function needs to be used by multiple controllers in the same
app, the easy solution is to put it into a model file.
If a function needs to be used by multiple controllers in different
applications than it needs to be defined in a module, imported, passed
the required global variables and called by the controllers.
Although code reuse is good and important it breaks the principle that
each web2py applications should be stand alone (if two apps depend on
each other, they they should be the same app).
One repetition that you cannot avoid is listing in controllers the
functions that you want to expose. This is unavoidable because by
forcing you to code this we try prevent you from having two
controllers expose the same functionality and we prevent hidden
controller actions (expose functions by mistake).