So, I'm doing the following:
import sys
sys.path.append("path_to_package_blah")

import turbogears
turbogears.update_config(configfile="dev.cfg",
modulename="blah.config")

I did some more debugging and found that when I run the exact same
commands above, it works in 'tg-admin shell', but does not work when I
run 'python job.py'.  I checked the sys.modules dictionary and could
not find the key/value for my package in there, but I was able to find
it in the tg-admin shell.  What's the difference here?  I basically
need to do what tg-admin shell is doing?

Thanks.

On May 28, 3:45 am, Chris Miles <[EMAIL PROTECTED]> wrote:
> Add the full path to package blah to sys.path ?
>
> Cheers
> CM
>
> On 28 May 2007, at 04:42, SamDonaldson wrote:
>
>
>
> > Hello,
>
> > In order to run a batch job independent of turbogears, I set the
> > sys.path.append(...path) and I'm doing the following:
>
> > import turbogears
> > turbogears.update_config(configfile="dev.cfg",
> > modulename="blah.config")
>
> > File "c:\python24\lib\site-packages\setuptools-0.6c5-py2.4.egg
> > \pkg_resources.p
> > , line 119, in get_provider
> >   __import__(moduleOrReq)
> > ImportError:  no module name blah
>
> > I'm getting a 'blah' package error.  My package is named 'blah' and I
> > set 'blah' as my package name when setting up turbogears.  I can even
> > see this in the PKG-INFO file.  What am I doing wrong here and what's
> > a quick way of troubleshooting this?
>
> > Thanks,
> > sam


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to