Victor Kryukov wrote:
> I've just tried to do the following to make tg-admin shell works:
>
> 1. "easy_install ." in my project directory - just to make sure
> pkg_resource do know my project name.
> 2. in bottom window shell:
>
> os.getcwd(<the top-directory of your project>)
> import turbogears
> turbogears.command.base.Shell(turbogears.__version__).run()
>
> and this resulted for SPE hangup, and pythonw.exe (yes, I live under
> Windows) eating up most of the processor time - until I killed it. I'm
> not sure what went wrong here; probably some TurboGears / SPE gurus
> would be able to explain / fix this.

OK, I found the clue for SPE hangup: adding

if sys.executable.endswith('pythonw.exe'):
    from cStringIO import StringIO
    sys.stdout = StringIO()

after sys import in SPE.py should solve the problem.

But now, I'm getting the following error message:

turbogears.command.base.Shell(turbogears.__version__).run()
Traceback (most recent call last):
  File "<input>", line 1, in ?
  File
"c:\python24\lib\site-packages\turbogears-0.9a0dev_r707-py2.4.egg\turbogears\command\base.py",
line 173, in run
    self.find_config()
  File
"c:\python24\lib\site-packages\turbogears-0.9a0dev_r707-py2.4.egg\turbogears\command\base.py",
line 63, in find_config
    load_project_config(self.config)
  File
"c:\python24\lib\site-packages\turbogears-0.9a0dev_r707-py2.4.egg\turbogears\command\base.py",
line 46, in load_project_config
    modulename = package + ".config")
  File
"c:\python24\lib\site-packages\turbogears-0.9a0dev_r707-py2.4.egg\turbogears\config.py",
line 121, in update_config
    pathconfig.load_config(modfile)
  File
"c:\python24\lib\site-packages\turbogears-0.9a0dev_r707-py2.4.egg\turbogears\config.py",
line 90, in load_config
    execfile(modfile, d)
IOError: [Errno 2] No such file or directory: 'c:\\documents and
settings\\victor kryukov\\my
documents\\_private\\python.svn\\letsmeet\\config.py'

While TurboGears should look for my config.py in
...\\letsmeet\\letsmeet. What is the right way to call
turbogears.command.base.Shell(version).run(), anyway?

Reply via email to