Re: Deployment Question
On Fri, May 23, 2008 at 2:26 PM, Jonathan Vanasco [EMAIL PROTECTED] wrote: On May 23, 3:48 pm, Mike Orr [EMAIL PROTECTED] wrote: This is quite interesting. I've been looking for a way to build a site scraper (something analogous to an aggregator but more site-specific) that could eventually become asynchronous, and this looks a lot easier than Twisted. FindMeOn's spiders are Twisted; importing contacts/relationships/ profiles from 40+ social networks. We're looking at redoing it in Erlang - Twisted was too slow. I'd be happy to share some code with you privately if it'll help you get your own project on track. Bob Ippolito was telling me once that he took a server in Twisted and rewrote it in stackless. He got some performance gains, but then he rewrote it in Erlang. It dropped from 40% CPU utilization to almost nothing, and it was a heck of a lot faster. In some situations, Erlang is a really nice tool. Now, if only the syntax wasn't so ridiculously ugly ;) -jj -- I, for one, welcome our new Facebook overlords! http://jjinux.blogspot.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Cross-Project code sharing...modules/plugins what does Pylons use?
Hello all, I am new to the Python web-programming world and trying to decide on frameworks. I was really impressed with Django, but ran into some problems with IIS hosting. Since Pylons had really nice install instructions for IIS, I started to take a look and I like the philosophy. The WSGI from the ground up mentality seems to be a real plus. However, I have run across a show stopper for me with Pylons unless I have missed something in the documentation. Does Pylons support some kind of module/plugin architecture that will allow me to develop plug- in functionality across Pylons projects? What would be called in Django an app. For example, I would like to have a news, blog, and calendar module that I can plug into different applications. The goal is to have everything for the module contained in one subdirectory including any configuration, routing, templates, controllers, model, etc. So, something like this: /modules/news/... /modules/calendar/... /modules/blog/... Thanks. --~--~-~--~~~---~--~~ 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: Cross-Project code sharing...modules/plugins what does Pylons use?
On Sat, May 24, 2008 at 6:37 AM, rcs_comp [EMAIL PROTECTED] wrote: Hello all, I am new to the Python web-programming world and trying to decide on frameworks. I was really impressed with Django, but ran into some problems with IIS hosting. Since Pylons had really nice install instructions for IIS, I started to take a look and I like the philosophy. The WSGI from the ground up mentality seems to be a real plus. However, I have run across a show stopper for me with Pylons unless I have missed something in the documentation. Does Pylons support some kind of module/plugin architecture that will allow me to develop plug- in functionality across Pylons projects? What would be called in Django an app. For example, I would like to have a news, blog, and calendar module that I can plug into different applications. The goal is to have everything for the module contained in one subdirectory including any configuration, routing, templates, controllers, model, etc. So, something like this: /modules/news/... /modules/calendar/... /modules/blog/... I'm sure others will say something different, but my approach has always been to simply run multiple apps on separate subdomains. Subdomains are free ;) In the past, I had login.foxmarks.com, my.foxmarks.com, and www.foxmarks.com. Each of the apps were completely separate, but I used Genshi to create a common look and feel. -jj -- I, for one, welcome our new Facebook overlords! http://jjinux.blogspot.com/ --~--~-~--~~~---~--~~ 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: Cross-Project code sharing...modules/plugins what does Pylons use?
Previously rcs_comp wrote: However, I have run across a show stopper for me with Pylons unless I have missed something in the documentation. Does Pylons support some kind of module/plugin architecture that will allow me to develop plug- in functionality across Pylons projects? What would be called in Django an app. No: the way pylons is setup it will only look for controllers and templates in a single package. That is not terribly hard to fix but I'm not sure if that is a design goal for pylons. Wichert. -- Wichert Akkerman [EMAIL PROTECTED]It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. --~--~-~--~~~---~--~~ 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: Cross-Project code sharing...modules/plugins what does Pylons use?
how is this essentially different from tosco widgets? or just making a python module that you put someplace in your python path for your pylons app to find? Jose Wichert Akkerman wrote: Previously rcs_comp wrote: However, I have run across a show stopper for me with Pylons unless I have missed something in the documentation. Does Pylons support some kind of module/plugin architecture that will allow me to develop plug- in functionality across Pylons projects? What would be called in Django an app. No: the way pylons is setup it will only look for controllers and templates in a single package. That is not terribly hard to fix but I'm not sure if that is a design goal for pylons. Wichert. --~--~-~--~~~---~--~~ 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: Cross-Project code sharing...modules/plugins what does Pylons use?
Previously Jose Galvez wrote: how is this essentially different from tosco widgets? or just making a python module that you put someplace in your python path for your pylons app to find? Because your add-ons may want to do things like add a new controller, replace a template, etc. Wichert. -- Wichert Akkerman [EMAIL PROTECTED]It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. --~--~-~--~~~---~--~~ 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: Cross-Project code sharing...modules/plugins what does Pylons use?
On Sat, May 24, 2008 at 6:37 AM, rcs_comp [EMAIL PROTECTED] wrote: Hello all, I am new to the Python web-programming world and trying to decide on frameworks. I was really impressed with Django, but ran into some problems with IIS hosting. Since Pylons had really nice install instructions for IIS, I started to take a look and I like the philosophy. The WSGI from the ground up mentality seems to be a real plus. However, I have run across a show stopper for me with Pylons unless I have missed something in the documentation. Does Pylons support some kind of module/plugin architecture that will allow me to develop plug- in functionality across Pylons projects? What would be called in Django an app. For example, I would like to have a news, blog, and calendar module that I can plug into different applications. The goal is to have everything for the module contained in one subdirectory including any configuration, routing, templates, controllers, model, etc. So, something like this: /modules/news/... /modules/calendar/... /modules/blog/... You can make a Pylons application for each component, and then tie them into the parent app via a pseudo-controller. (I.e., replace the controller class with your WSGI app instance, but keep the controller name.) Set full_stack=False in the subapplication; you may also want to comment out the error middleware. I haven't seen anyone do it but it theoretically should work. You may have to a little bit to pass the config dict. -- 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: Cross-Project code sharing...modules/plugins what does Pylons use?
I *really* like how the modular approach can compartmentalize the necessary templates and controllers. I intensely dislike how the modular approach compartmentalizes the routing and model. If something is affecting the routing model, IMHO, it's not a plugin - its a standalone app. At FindMeOn, we're currently finishing up Open Social Network - In A Box , basically a toolkit for building social media webapps under pylons. The design we're running with right now... is a core model/ controller/lib which the main Pylons app inherits. Instead of creating a new 'module/blog', you just create blog_controller.py, which can be as simple as from inabox.controllers.blog_contoller import BlogController as OpenSocialNetworkBlogController clas BlogController( OpenSocialNetworkBlogController ): pass --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Mako unicode configuration
Hi there, I don't use Unicode but would like to make my apps `Unicode proof'. Now that Mako is the default templating language do we still need to do the following: Include these options in environment.py tmpl_options['mako.input_encoding'] = 'UTF-8' tmpl_options['mako.output_encoding'] = 'UTF-8' tmpl_options['mako.default_filters'] = ['decode.utf8'] as well as this return statement in environment.py return pylons.config.Config(tmpl_options, map, paths, request_settings = dict(charset = 'utf-8', error = 'replace')) I presume we still also need to include ## -*- coding: utf-8 -*- at the start of every Mako template that uses Unicode characters... regards, Brendan --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Getting rid of virtualenv
I know this is OT, but there's plenty of people in the know here, so maybe I can get some help. I decide to give virtualenv a spin on my laptop yesterday to test out some Python package. It didn't work out so I deleted the virtualenv directory I'd created for it, thinking it was an isolated environment. Unfortunately, today I decided to do some work on Breve only to discover that something isn't quite right. Any time I try to run python setup.py install from my Breve source dir, setuptools tries to install python-openid (a requirement of the package I was testing). Clearly some Python system file has been altered. How do I undo this? Regards, Cliff --~--~-~--~~~---~--~~ 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: Deployment Question
On May 24, 5:10 am, Shannon -jj Behrens [EMAIL PROTECTED] wrote: Bob Ippolito was telling me once that he took a server in Twisted and rewrote it in stackless. He got some performance gains, but then he rewrote it in Erlang. It dropped from 40% CPU utilization to almost nothing, and it was a heck of a lot faster. In some situations, Erlang is a really nice tool. Now, if only the syntax wasn't so ridiculously ugly ;) I think his performance gain was quite a bit more... Bob is a good old friend (turned boss for a few years, turned good friend again), I was privvy to daily updates on his transitions and performance gains - and he completely sold me. Twisted is really great ( though the syntax can be a bit of a bitch )... we just outgrew it (it became the bottleneck, not our DB or network architecture). I think it maxxed out at indexing 1MM online identities a day ( which translated to about 15MM web queries ) (per machine, of course). At one point we had 100MM profiles tracked, and a backlog of 500MM to get to -- under twisted there was no way we could start re-queing and updating our index as fast as we'd like. The next level would be C.. or erlang. --~--~-~--~~~---~--~~ 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: Getting rid of virtualenv
Nevermind. In the tradition of figuring it out 2 minutes after posting a question I've resolved it. And in the interest of fairness, I don't think it was virtualenv's fault. Regards, Cliff On Sat, 2008-05-24 at 14:01 -0700, Cliff Wells wrote: I know this is OT, but there's plenty of people in the know here, so maybe I can get some help. I decide to give virtualenv a spin on my laptop yesterday to test out some Python package. It didn't work out so I deleted the virtualenv directory I'd created for it, thinking it was an isolated environment. Unfortunately, today I decided to do some work on Breve only to discover that something isn't quite right. Any time I try to run python setup.py install from my Breve source dir, setuptools tries to install python-openid (a requirement of the package I was testing). Clearly some Python system file has been altered. How do I undo this? Regards, Cliff --~--~-~--~~~---~--~~ 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: Cross-Project code sharing...modules/plugins what does Pylons use?
I thought a bit more about nesting apps. The controller would be set up as: from myinnerapp.config.middleware import make_app OuterController = make_app(config[global_conf], full_stack=False, **config[app_conf]) This would push another config onto of pylons.config, but since it's the same as the parent's config that shouldn't make a difference. As for the other middleware changes, I was misremembering. The error middlewares are already under if asbool(full_stack). What I had suggested earlier was that SessionMiddleware and CacheMiddleware also belong under that 'if' so that the outermost one is used. RoutesMiddleware, I'm not sure (see below). On Sat, May 24, 2008 at 12:44 PM, Jonathan Vanasco [EMAIL PROTECTED] wrote: I *really* like how the modular approach can compartmentalize the necessary templates and controllers. I intensely dislike how the modular approach compartmentalizes the routing and model. If something is affecting the routing model, IMHO, it's not a plugin - its a standalone app. Well, it affects the routing only in the sense that the subapp parses the rest of the URL -- as it should. If the route is defined as /subapp/*path_info (a magic name), this should set up PATH_INFO for the subapp. On the other hand, I'm not sure whether you can nest RouteMiddlewares and RouteMaps or not. How would url_for know which set of routes to choose? It just takes somebody to do this and figure out what works. (The Routes 2 structure I have in mind should help with this. The middleware puts a request-specific URL generator in the WSGI environ, which Pylons mounts onto 'pylons.url' -- a StackedObjectProxy like pylons.request. This should allow the inner app to see its own URL generator, and the outer app its own.) As for the model, I forgot about that. That is a bit of a hassle, to get multiple models to share the same database and connection pool. Which just means we have to figure out the right standard configuration for it. One way would be for the top-level environment.py to set up the engine as normal and then call the subapp's init_model(). Another way would be for the top environment.py to initialize its own model, then put the engine in the config for the subapp to use. That means the subapp would have to anticpate this happening, though it could check for an engine object first, and if none was there create its own engine. The design we're running with right now... is a core model/ controller/lib which the main Pylons app inherits. It will be interesting to see this structure. Certainly, the controller does not have to use the global templates directory or render method; if it uses its own templates stored its own way, that works too. But then that gets into the issue of the site template. If the inner app should be shown within the global header and sidebar, then you'd have to inherit the site template -- which doesn't work well across apps, plus you'd have to know what variables to set for the site template. Or the outer app could have a controller ACTION (not a whole controller) that calls the inner app to get the page content, and then plugs that into its template. The action could emulate a WSGI server, possibly using WebOb's application-wrapper for convenience. I definitely think there's a huge potential for autonomous Pylons app components, if we can just figure out the details. Then you could plug a Pylons wiki or calendar or shopping cart or ticket manager into a Pylons app in five minutes. -- 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: Cross-Project code sharing...modules/plugins what does Pylons use?
Thank you all for your comments. Its clear though, for me, that Pylons will not work for my projects. The need to develop components that fit easily and natively into the larger application is a must. Its disappointing though, b/c I was really liking the philosophy behind Pylons. Keep up the good work. IMO, this is a must for any robust framework and I hope Pylons incorporates this functionality into its framework philosophy some day. --~--~-~--~~~---~--~~ 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: Cross-Project code sharing...modules/plugins what does Pylons use?
On May 24, 2008, at 6:37 AM, rcs_comp wrote: For example, I would like to have a news, blog, and calendar module that I can plug into different applications. The goal is to have everything for the module contained in one subdirectory including any configuration, routing, templates, controllers, model, etc. So, something like this: /modules/news/... /modules/calendar/... /modules/blog/... If these are in fact separate applications, you can make each one its own Pylons app. Then you might also have a common package of code shared between all three (this would be a separate egg). Then at deployment time you can combine them into one composite application with Paste URL map, via the ini file: http://pythonpaste.org/deploy/#composite-applications -- 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: Cross-Project code sharing...modules/plugins what does Pylons use?
On May 24, 9:13 pm, Philip Jenvey [EMAIL PROTECTED] wrote: If these are in fact separate applications, you can make each one its own Pylons app. Then you might also have a common package of code shared between all three (this would be a separate egg). Then at deployment time you can combine them into one composite application with Paste URL map, via the ini file: http://pythonpaste.org/deploy/#composite-applications Philip, Thanks for the reply. I guess I am not familiar enough with Pylons to know exactly what you mean by application. However, I don't think I intend for my modules to be applications in and of themselves. For example, I don't want to have to worry about defining DB connections, having decorator templates (i.e. the look that is shared across all pages), etc. per module. Rather, I would envision a module using the DB connection the application defined (even though it would have its own tables / database objects, etc.) and having generic template blocks that fit into the overall look of the site that is defined at the application level. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---