Chris,
It's working now :-)
Thanks for your time and patience!!
Have a good one,
Gerry.
On Nov 11, 8:29 pm, Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
> Gerry wrote:
> > My mistake, I should have said:
>
> > In the file /home/jerry/tg/Reps/reps/ctrls/studforms.py, I have:
> > import sys
> > sys.path.append('/home/jerry/tg/Reps/reps')
> > from model import *
>
> > (and model.py is in /home/jerry/tg/Reps/reps)
>
> > So, I think it is the same model.py I am importing.
>
> Yes, it's the same model, but if you do it that way, it is imported as
> two different Python modules (in different packages).
>
> > This is the first time with Python I have imported a package this way
> > and I copied the commands from another posting on this list.
> > Is there a better way to do this?
>
> Fortunately, yes. In both of your controller modules, you can write:
>
> from reps.model import *
>
> This should also solve your original problem.
>
> Generally, avoid fiddling around with sys.path, and by no means use
> hardcoded absolute paths.
>
> -- Christoph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---