2008/9/5 Bartosz R <[EMAIL PROTECTED]>: > > On Sep 5, 12:55 pm, Bartosz R <[EMAIL PROTECTED]> wrote: >> I found a little correction in the section about adding commands to >> paster:http://docs.pylonshq.com/advanced_pylons/paster_commands.html >> >> it says: >> >> >Modify the entry_points argument in setup.py to contain: >> >> >[paste.paster_command] >> >my-command = myapp.commands.my_command:MyCommand >> >> whereas I think it should be saying: >> >> >Modify the entry_points argument in setup.py to contain: >> >> >[paste.paster_command] >> >my-command = commands.my_command:MyCommand >> >> At least that is what is working here (using pastescript 1.6.3). > > > Also on that subject: creating commands dir in the application > directory causes paster serve to fail like this: > Traceback (most recent call last): > File "C:\Python25\Scripts\paster-script.py", line 8, in <module> > load_entry_point('pastescript==1.6.3', 'console_scripts', 'paster') > () > File "c:\python25\lib\site-packages\pastescript-1.6.3-py2.5.egg\paste > \script\command.py", line 79, in run > invoke(command, command_name, options, args[1:]) > File "c:\python25\lib\site-packages\pastescript-1.6.3-py2.5.egg\paste > \script\command.py", line 118, in invoke > exit_code = runner.run(args) > File "c:\python25\lib\site-packages\pastescript-1.6.3-py2.5.egg\paste > \script\command.py", line 213, in run > result = self.command() > File "c:\python25\lib\site-packages\pastescript-1.6.3-py2.5.egg\paste > \script\serve.py", line 251, in command > relative_to=base, global_conf=vars) > File "c:\python25\lib\site-packages\pastescript-1.6.3-py2.5.egg\paste > \script\serve.py", line 278, in loadapp > **kw) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 204, in loadapp > return loadobj(APP, uri, name=name, **kw) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 224, in loadobj > global_conf=global_conf) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 248, in loadcontext > global_conf=global_conf) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 278, in _loadconfig > return loader.get_context(object_type, name, global_conf) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 409, in get_context > section) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 431, in _context_from_use > object_type, name=use, global_conf=global_conf) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 361, in get_context > global_conf=global_conf) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 248, in loadcontext > global_conf=global_conf) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 285, in _loadegg > return loader.get_context(object_type, name, global_conf) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 561, in get_context > object_type, name=name) > File "c:\python25\lib\site-packages\pastedeploy-1.3.2-py2.5.egg\paste > \deploy\loadwsgi.py", line 587, in find_egg_entry_point > possible.append((entry.load(), protocol, entry.name)) > File "C:\Python25\Lib\site-packages\pkg_resources.py", line 1912, in > load > entry = __import__(self.module_name, globals(),globals(), > ['__name__']) > File "C:\Documents and Settings\ZBR\My Documents\prywatne\pylons > \mywiki\mywiki\config\middleware.py", line 8, in <module> > from pylons.middleware import ErrorHandler, StatusCodeRedirect > File "c:\python25\lib\site-packages\pylons-0.9.7rc1-py2.5.egg\pylons > \middleware.py", line 11, in <module> > from weberror.evalexception import EvalException > File "c:\python25\lib\site-packages\weberror-0.9-py2.5.egg\weberror > \evalexception.py", line 47, in <module> > from weberror import errormiddleware, formatter, collector > File "c:\python25\lib\site-packages\weberror-0.9-py2.5.egg\weberror > \errormiddleware.py", line 14, in <module> > from weberror import formatter, collector, reporter > File "c:\python25\lib\site-packages\weberror-0.9-py2.5.egg\weberror > \formatter.py", line 17, in <module> > from pygments.formatters import HtmlFormatter > File "c:\python25\lib\site-packages\Pygments-0.11.1-py2.5.egg > \pygments\formatters\__init__.py", line 14, in <module> > from pygments.formatters._mapping import FORMATTERS > File "c:\python25\lib\site-packages\Pygments-0.11.1-py2.5.egg > \pygments\formatters\_mapping.py", line 21, in <module> > from pygments.formatters.img import ImageFormatter > File "c:\python25\lib\site-packages\Pygments-0.11.1-py2.5.egg > \pygments\formatters\img.py", line 13, in <module> > from commands import getstatusoutput > ImportError: cannot import name getstatusoutput
The standard commands module is override by your own one. Rename your commands module to something else. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en -~----------~----~----~----~------~----~------~--~---