Re: simplejson install error, need help
On Nov 23, 2008, at 10:07 AM, Rod Morison wrote: I'm starting a new project and am trying to install Pylons 0.9.7 on a fresh install of Windows Vista/64 with Python 2.6. Easy install quits on an error installing simplejson. snip building 'simplejson._speedups' extension error: Setup script exited with error: None What version of setuptools/ez_setup was in use here? -- Philip Jenvey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: simplejson install error, need help
setuptools-0.6c9-py2.6.egg Philip Jenvey wrote: On Nov 23, 2008, at 10:07 AM, Rod Morison wrote: I'm starting a new project and am trying to install Pylons 0.9.7 on a fresh install of Windows Vista/64 with Python 2.6. Easy install quits on an error installing simplejson. snip building 'simplejson._speedups' extension error: Setup script exited with error: None What version of setuptools/ez_setup was in use here? -- Philip Jenvey --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: Pylons Eclipse Pydev
Thanks Dalius. I'm not sure what it did, but that half worked. I can now run pylons from eclipse but the debug breakpoints are not working. There are no errors. Any more help? On Nov 23, 8:01 pm, Dalius Dobravolskas [EMAIL PROTECTED] wrote: On Sun, Nov 23, 2008 at 6:48 PM, SystemicPlural [EMAIL PROTECTED] wrote: I am trying to get Pylons working in Eclipse with Pydev (Ubuntu) I can't get it to run or debug. I've re-imported the python interpreter. In the run dialog I have the main module as: /usr/bin/paster and program arguments as serve --reload /home/sky/www/PylonTest/ development.ini but when I run I just get a bunch of errors (below) If I run /usr/bin/paster serve --reload /home/sky/www/PylonTest/development.ini in terminal the /home/sky/www/PylonTest/ directory then it works, but from any other directory it does not. why? I get the same errors in the terminal as I do in eclipse. (Pretty much a newbie to Ubuntu/Eclipse/Pydev and Pylons) Starting subprocess with file monitor Traceback (most recent call last): File /usr/bin/paster, line 8, in module load_entry_point('PasteScript==1.3.6', 'console_scripts', 'paster') () File /usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/ paste/script/command.py, line 78, in run invoke(command, command_name, options, args[1:]) File /usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/ paste/script/command.py, line 117, in invoke exit_code = runner.run(args) File /usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/ paste/script/command.py, line 212, in run result = self.command() File /usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/ paste/script/serve.py, line 227, in command relative_to=base, global_conf=vars) File /usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/ paste/script/serve.py, line 250, in loadapp **kw) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 193, in loadapp return loadobj(APP, uri, name=name, **kw) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 213, in loadobj global_conf=global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 237, in loadcontext global_conf=global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 267, in _loadconfig return loader.get_context(object_type, name, global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 393, in get_context section) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 415, in _context_from_use object_type, name=use, global_conf=global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 345, in get_context global_conf=global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 237, in loadcontext global_conf=global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 274, in _loadegg return loader.get_context(object_type, name, global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 542, in get_context object_type, name=name) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 562, in find_egg_entry_point pkg_resources.require(self.spec) File /usr/lib/python2.5/site-packages/pkg_resources.py, line 626, in require needed = self.resolve(parse_requirements(requirements)) File /usr/lib/python2.5/site-packages/pkg_resources.py, line 524, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: helloworld cd .../helloworld sudo python setup.py develop -- Daliushttp://blog.sandbox.lt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Routes, regexp and matching
I have a route made like this: map.resource('customer', 'customers', controller='customers', name_prefix='', path_prefix='') map.resource('instrument', 'basket', controller='basket', parent_resource=dict( member_name='customer', collection_name='customers')) This allows me to match URL like: /customers/foobar/basket/FOOBAR But if a point happens in the id it does not match anymore: 2008-11-24 14:10:48,649 DEBUG [routes.middleware] Matched GET /customers/acme/basket/FO.O.BAR 2008-11-24 14:10:48,649 DEBUG [routes.middleware] Route path: 'customers/:customer_id/basket/:(id).:(format)', defaults: {'action': u'show', 'controller': u'basket', 'id': None} 2008-11-24 14:10:48,649 DEBUG [routes.middleware] Match dict: {'action': u'show', 'controller': u'basket', 'customer_id': u'acme', 'id': u'CDX', 'format': u'O.BAR'} I thought it was a problem of id matching in routes (I'm using 1.7.3) so I tried to upload to 1.10.1 but the problem still presents itself. Is there a way to avoid this? I think I can do it with some kind of trick with a greedy regular expression but I cannot pass requirements to map.resource -- Lawrence, neropercaso.it - oluyede.org It is difficult to get a man to understand something when his salary depends on not understanding it - Upton Sinclair --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: Pylons Eclipse Pydev
I've managed to fix this now. In 'WindowPreferencesPydevInterpreter - Python' remove the python interpreters and reload it (select 'New') after installing pylons. In 'RunOpen Debug Dialog' enter the location of paster in 'Main Module'. For me this is '/usr/bin/paster' . Then in the 'Arguments' tab in Program arguments enter 'serve /locationOfYourProject/ development.ini' All set to go. It took a lot of search for me to find out that break points will not work if the arguments includes '--reload' On Nov 24, 8:54 am, SystemicPlural [EMAIL PROTECTED] wrote: Thanks Dalius. I'm not sure what it did, but that half worked. I can now run pylons from eclipse but the debug breakpoints are not working. There are no errors. Any more help? On Nov 23, 8:01 pm, Dalius Dobravolskas [EMAIL PROTECTED] wrote: On Sun, Nov 23, 2008 at 6:48 PM, SystemicPlural [EMAIL PROTECTED] wrote: I am trying to get Pylons working in Eclipse with Pydev (Ubuntu) I can't get it to run or debug. I've re-imported the python interpreter. In the run dialog I have the main module as: /usr/bin/paster and program arguments as serve --reload /home/sky/www/PylonTest/ development.ini but when I run I just get a bunch of errors (below) If I run /usr/bin/paster serve --reload /home/sky/www/PylonTest/development.ini in terminal the /home/sky/www/PylonTest/ directory then it works, but from any other directory it does not. why? I get the same errors in the terminal as I do in eclipse. (Pretty much a newbie to Ubuntu/Eclipse/Pydev and Pylons) Starting subprocess with file monitor Traceback (most recent call last): File /usr/bin/paster, line 8, in module load_entry_point('PasteScript==1.3.6', 'console_scripts', 'paster') () File /usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/ paste/script/command.py, line 78, in run invoke(command, command_name, options, args[1:]) File /usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/ paste/script/command.py, line 117, in invoke exit_code = runner.run(args) File /usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/ paste/script/command.py, line 212, in run result = self.command() File /usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/ paste/script/serve.py, line 227, in command relative_to=base, global_conf=vars) File /usr/lib/python2.5/site-packages/PasteScript-1.3.6-py2.5.egg/ paste/script/serve.py, line 250, in loadapp **kw) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 193, in loadapp return loadobj(APP, uri, name=name, **kw) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 213, in loadobj global_conf=global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 237, in loadcontext global_conf=global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 267, in _loadconfig return loader.get_context(object_type, name, global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 393, in get_context section) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 415, in _context_from_use object_type, name=use, global_conf=global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 345, in get_context global_conf=global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 237, in loadcontext global_conf=global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 274, in _loadegg return loader.get_context(object_type, name, global_conf) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 542, in get_context object_type, name=name) File /usr/lib/python2.5/site-packages/PasteDeploy-1.3.1-py2.5.egg/ paste/deploy/loadwsgi.py, line 562, in find_egg_entry_point pkg_resources.require(self.spec) File /usr/lib/python2.5/site-packages/pkg_resources.py, line 626, in require needed = self.resolve(parse_requirements(requirements)) File /usr/lib/python2.5/site-packages/pkg_resources.py, line 524, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: helloworld cd .../helloworld sudo python setup.py develop -- Daliushttp://blog.sandbox.lt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to
Re: Routes, regexp and matching
On Mon, Nov 24, 2008 at 5:17 AM, Lawrence Oluyede [EMAIL PROTECTED] wrote: I have a route made like this: map.resource('customer', 'customers', controller='customers', name_prefix='', path_prefix='') map.resource('instrument', 'basket', controller='basket', parent_resource=dict( member_name='customer', collection_name='customers')) This allows me to match URL like: /customers/foobar/basket/FOOBAR But if a point happens in the id it does not match anymore: 2008-11-24 14:10:48,649 DEBUG [routes.middleware] Matched GET /customers/acme/basket/FO.O.BAR 2008-11-24 14:10:48,649 DEBUG [routes.middleware] Route path: 'customers/:customer_id/basket/:(id).:(format)', defaults: {'action': u'show', 'controller': u'basket', 'id': None} 2008-11-24 14:10:48,649 DEBUG [routes.middleware] Match dict: {'action': u'show', 'controller': u'basket', 'customer_id': u'acme', 'id': u'CDX', 'format': u'O.BAR'} I thought it was a problem of id matching in routes (I'm using 1.7.3) so I tried to upload to 1.10.1 but the problem still presents itself. Is there a way to avoid this? I think I can do it with some kind of trick with a greedy regular expression but I cannot pass requirements to map.resource map.resource treats anything with a dot as a format suffix. That way if the controller supports multiple output formats, you can append something like .xml or .json to choose an alternate format. I guess this is an Atom compatibility feature. Looking at the code, it doesn't appear this can be suppressed. As a workaround, you can recombine the ID in your action: def show(self, id, format=): id = id + format -- Mike Orr [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: auth and auth
I've implemented repoze.who in one app so far. It was a bit difficult at first, but from my understanding is getting easier. I wrote a very simple tutorial at http://truefalsemaybe.com/2008/06/authorization-in-pylons-with-repozewho-part-1-htaccess/ I imagine I will write a followup soon, as I want to dive into some of the plugins mentioned above. Cheers, nym http://truefalsemaybe.com/ On Mon, Nov 24, 2008 at 1:06 PM, Domen Kožar [EMAIL PROTECTED] wrote: repoze.who has many plugins including recaptcha, openid, ldap. also there is repoze.what on the way;) On 23 nov., 21:55, Dalius Dobravolskas [EMAIL PROTECTED] wrote: Hi, What I need now is your opinion. Have I chosen the right path? What are you missing in my solution (both documentation and code)? Definetly there are some bugs/problems as well. Why don't you use repose.who ? There are several reasons: 1) It is historical reason. If you search archive of this group you will find that I have implemented those middlewares at the same time as repoze.who. I just never documented it properly until now. 2) My first impression was and still is that repoze.who is alien to Pylons and/or WSGI. It just adds unnecessary layer of complexity to basically simple WSGI. That might be my inexperience, but nobody have explained me where is value until now. Just for example I have compares Form authentication. Result 140 (mine) vs. 220 (repoze.who) lines. Code does the same basically. Maybe if we will drop template code from repoze.who code we will get the same. The difference from my point of view: if you will use mine you just need to know WSGI, if you will use repoze.who you will need to learn repoze.who middleware (and it is not that small). 3) I have written OpenID authentication for Trac and OpenID authentication as WSGI middleware. I'm lazy enough not to write yet another plugin for repoze.who ;-) Technically I don't have anything against repoze.who. It is authentication middleware that does basically the same but under one umbrella (the same as AuthKit). If you are using repoze.who for form authentication already there is no reason why you should use mine form middleware. The final result will be the same. The only thing from authentication side in addition I offer is OpenID authentication ;-) From authorization side I offer some helpers functions (currently one function and decorator) that will help in authorization development and you can use that with repoze.who equally successfully if you want to. At least I don't see any reasons why you can't combine that. -- Daliushttp://blog.sandbox.lt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: auth and auth
On Mon, Nov 24, 2008 at 10:51 PM, Tom Longson (nym) [EMAIL PROTECTED] wrote: I've implemented repoze.who in one app so far. It was a bit difficult at first, but from my understanding is getting easier. I wrote a very simple tutorial at http://truefalsemaybe.com/2008/06/authorization-in-pylons-with-repozewho-part-1-htaccess/ TurboGears 2 team has chosen repoze.who to implement authentication and has spawned repoze.what to implement authorization. I feel that repoze.{*} is quickly becoming a convergence point between our communities (zope, pylons, tg, and wsgi minded framework out there). This is a really important issue, for the first time in the history of python web frameworks we are really beginning to work together and to share components. Florent. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: Beaker 1.1 Release
On Nov 24, 2008, at 7:19 AM, Walter Cruz wrote: Beaker 1.1 still generates: TypeError: __init__() got an unexpected keyword argument 'digest_filenames' on google appengine. I will try to provide a patch. This issue is fixed in the latest release. Cheers, Ben smime.p7s Description: S/MIME cryptographic signature
Pylons 0.9.7 RC4 Release
The (hopefully last) Release Candidate of Pylons has been released. The docs at docs.pylonshq.com have been updated, and a PDF of the new docs can be had here: http://pylonshq.com/download/0.9.7/Pylons.pdf Fixes for RC4: - go-pylons.py script and all of Pylons is now Python 2.6 compatible (previously virtualenv had Python 2.6 bugs) - Beaker got several important bug fixes, one for leaving file handles open, and to ensure that the new pickled format is gracefully upgraded from - Switched to using WebTest for testing (an extraction of paste.fixture with helpful updates) I'm now focusing on the last tweaks needed to the new website before Pylons 0.9.7 is released, along with final documentation fixes (typos, grammar, etc.) Cheers, Ben smime.p7s Description: S/MIME cryptographic signature
Re: auth and auth
Hello, On Mon, Nov 24, 2008 at 11:56 PM, Florent Aide [EMAIL PROTECTED] wrote: TurboGears 2 team has chosen repoze.who to implement authentication and has spawned repoze.what to implement authorization. That's their choice but that's not argument. What was reasoning behind that? I feel that repoze.{*} is quickly becoming a convergence point between our communities (zope, pylons, tg, and wsgi minded framework out there). Really? repoze.who is inspired by zope but not used by zope!!! TG2 is basically the same pylons (as Cream for Vim). And finally I don't know other pure WSGI framework out there except Pylons. repoze.bfg says they rely on WSGI but I don't feel it this way. Django is not using repoze.who. You shouldn't trust your feelings sometimes because there is no real convergence point here. I personally see only Zope complexity added to Pylons. Maybe some people can't live without that :-) I will repeat my question: what additional value is created by repoze.who what WSGI can't do? -- Dalius http://blog.sandbox.lt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: auth and auth
On Mon, Nov 24, 2008 at 11:06 PM, Domen Kožar [EMAIL PROTECTED] wrote: repoze.who has many plugins including recaptcha, openid, ldap. also there is repoze.what on the way;) I should have investigated that. Thank you for pointing that. OpenID: If we are speaking about http://code.google.com/p/repozeopenid/source/browse/repoze.whoplugins.openid/trunk/repoze/who/plugins/openid/identification.py?r=5 it is in very early stage and barely usable. repoze.what: Looks like TurboGears 1. The main mistake makes everyone when they implement authorization plugin/middleware, they think that everyone builds social networks or simple sites where you have users in groups with roles. In real world that does not work sometimes. I think it much better to leave control for user: http://trac.sandbox.lt/auth/wiki/AuthorizeMiddleware -- Dalius http://blog.sandbox.lt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---
Re: auth and auth
Hello, Mike, On Tue, Nov 25, 2008 at 12:18 AM, Mike Orr [EMAIL PROTECTED] wrote: I have consolidated the various auth wiki pages into a section in the Pylons Cookbook called Authentication and Authorization. http://wiki.pylonshq.com/display/pylonscookbook/Authentication+and+Authorization Can you add http://trac.sandbox.lt/auth/ to that wiki page as yet another alternative? -- Dalius http://blog.sandbox.lt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to pylons-discuss@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-discuss?hl=en -~--~~~~--~~--~--~---