Re: comparison between play and pyramid in term of performance

2011-07-07 Thread Michael Merickel
On Wed, Jul 6, 2011 at 9:33 PM, Robert Ramsay  wrote:

> Looking to the future when pyramid can stably run on PyPy, you will
> likely find it hard to see any difference.


FTR, Pyramid does run on PyPy. If you look at jenkins.pylonsproject.org the
tests are run on PyPy and Jython just the same as CPython.

-- 

Michael

-- 
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 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



Re: comparison between play and pyramid in term of performance

2011-07-07 Thread Mengu
i've used play. it's not new actually, i guess it's been 3 years or
so. it's really a great framework breaking the rules of "java web".
this is what makes it great. it does not introduce any new concepts or
provide more than what pyramid provides. if you want to use play
framework, use it with scala, not java.

On Jul 7, 3:29 am, Minh Doan  wrote:
> Hi everyone,
>
> I have played with pyramid for a while and like it pretty much. Recently I
> heard about new web framework Play which is based on Java. I love Java as a
> programming language with which It's hardly to make mistake. And in term of
> performance Java is better than Python. Play is also very good at supporting
> comet (ajax push) web model.
>
> I wonder if anyone here already had experiences with those both and could
> give me a brief comparison.
>
> Best,
> ---
> Minh

-- 
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 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.



pylons.url not working in unit tests for non-absolute paths

2011-07-07 Thread Thomi Richards
Hi,

I'm trying to write a unit test for an old pylons 0.9.7 application.
The issue we have is that it's very easy to accidentally hard-code URL
paths in our jinja2 templates, which works fine until someone hosts
our application at a different prefix (i.e.- hosts it at
'http://localhost/foo/' instead of just 'http://localhost/'). I'm
doing this using the default "functional test" setup that paste
created for me. I query every controller action, and pass in a custom
SCRIPT_NAME like so:

response = self.app.get('/some/url/path', extra_environ={'SCRIPT_NAME'
: '/custom_prefix'})

I then use beautifulsoup to parse the document, iterating over all the
tags that have an 'href' attribute or a 'src' attribute, and ensure
that it starts with '/custom_prefix'.

Here's where things get odd: When we pass an absolute path in to
"pylons.url" in our templates like this:

{{ h.stylesheet_link(h.url('/css/style.css')) }}

...it works perfectly. However, when we call "pylons.url" with keyword
arguments like this:

{{ h.link_to('Home', h.url(controller='person', action='home')) }}

...the prefix is not inserted. However, the url() function works
correctly when running this correctly (i.e.- using mod_wsgi or
pastedeploy) with a non-empty SCRIPT_NAME. I guess that I'm missing a
critical step, but I can't think what it is. Can anyone on this list
shed some light on my predicament?



Thanks.

-- 
Thomi Richards

-- 
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 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.