Re: Unicode problem with myt template...

2007-05-04 Thread durumdara
Hi! I found the solution: def _ResponseAsString(self, Resp): ps = Resp.content[0] ps = ps.decode('utf-8') return ps def _RenderContent(self, Content): c.PageContent = Content self._BuildMenus() rp = render_response('/pagetemplate.myt')

Re: myghty ComponentNotFound

2007-05-04 Thread Muhammad
actually I am using Pylons 0.8.2. I didn't check the latest Pylons version error handling techniques. I just want to show 404 on wrong URL request, and also I don't want the pylons web application to send any email on wrong URL request. i.e [DEFAULT] debug = true email_to = [EMAIL PROTECTED]

Re: Paster, SQLAlchemy $HOME/.python.eggs

2007-05-04 Thread askel
On May 3, 9:27 am, C. Handel [EMAIL PROTECTED] wrote: When i try to start a paster-service using the --user flag i run into some permission problems I tried to use this command to start the service: paster serve server.ini --user=www Paster will create a temporary objectstore in the

Re: Paster, SQLAlchemy $HOME/.python.eggs

2007-05-04 Thread askel
Another way is to set environment variable PYTHON_EGG_CACHE to something accessible by user that paster switches to after starting the daemon. On May 4, 7:59 am, askel [EMAIL PROTECTED] wrote: On May 3, 9:27 am, C. Handel [EMAIL PROTECTED] wrote: When i try to start a paster-service using

Using encoded forward slashes in a URL?

2007-05-04 Thread Evert Rol
Hi all, I'm having a problem with encoded forward slashes in a URL. That is, I need to pass an 'id' that has encoded forward slashes in its name, but this results in routes not being be able map the URL: apparently it sees another subset of paths in the URL, even with the slashes

Re: myghty ComponentNotFound

2007-05-04 Thread Shannon -jj Behrens
0.8.2 seems like such a long time ago, that I can't even remember what's been fixed. You can check the changelogs. Maybe someone else remembers. Best Regards, -jj On 5/4/07, Muhammad [EMAIL PROTECTED] wrote: actually I am using Pylons 0.8.2. I didn't check the latest Pylons version error

Re: Unicode problem with myt template...

2007-05-04 Thread Shannon -jj Behrens
I'm glad to hear you found the solution :) By the way: S_typ = type('') U_typ = type(u'') if not (type(s) in [S_typ, U_typ]): can more easily be written: if not isinstance(s, basestring): Best Regards, -jj On 5/4/07, durumdara [EMAIL PROTECTED] wrote: Hi! I found the

Re: lowercased response headers

2007-05-04 Thread kai
This was a bug in my head(which seems to be the source of most of them). I should have known better than to run off on a wild header case goose chase. My web development work has been infrequent the last few years. I'm guessing from JJ's response he's wondering what I'm up to with this

Re: Pylons and Rights to Objects...

2007-05-04 Thread kai
I use a metaclass to set a require attribute on all methods of a class that I define in a dictionary (PermissionIndex) PermissionIndex = { ,'setatime': ['time'] ,'setctime': ['time'] ,'setmtime': ['time'] ,'getsize': ['visible','read'] ,'getcwd': ['visible','read'] ,'listdir':

Webhelpers' h.link_to(_remote) escapes my URL :(

2007-05-04 Thread Christoph Haas
Dear list... I have created a URL using information from Routes using h.url_for(). Example: /start/page?page_nr=1called=back Now I want to create a link to this URL with h.link_to. What I get is: a href=/start/page?page_nr=1amp;called=backfoo/a Apparently '' is escaped to 'amp;'

Using Mako templates

2007-05-04 Thread voltron
Hi, I´ll like to use only Mako templates in my projects, apart from stating this in the middleware.py, do I have to change these lines in the einviroment.py: # The following template options are passed to your template engines tmpl_options = {} tmpl_options['myghty.log_errors'] = True

Re: Paster, SQLAlchemy $HOME/.python.eggs

2007-05-04 Thread C. Handel
On May 4, 2:09 pm, askel [EMAIL PROTECTED] wrote: Another way is to set environment variable PYTHON_EGG_CACHE to something accessible by user that paster switches to after starting the daemon. sounds good. Thanks. Greetings Christoph --~--~-~--~~~---~--~~

Re: Webhelpers' h.link_to(_remote) escapes my URL :(

2007-05-04 Thread Shannon -jj Behrens
On 5/4/07, Christoph Haas [EMAIL PROTECTED] wrote: Dear list... I have created a URL using information from Routes using h.url_for(). Example: /start/page?page_nr=1called=back Now I want to create a link to this URL with h.link_to. What I get is: a

Spawning a worker thread from the controller?

2007-05-04 Thread Matt
Hi, I have a pylons app which I want to spawn a long-running process from. While this process is running (might be an hour or so), I want the page that kicked off this process to just display status (maybe referesh ever 30 seconds or so)... Does anyone have some pointers on how this should be

Re: Spawning a worker thread from the controller?

2007-05-04 Thread Shannon -jj Behrens
On 5/4/07, Matt [EMAIL PROTECTED] wrote: Hi, I have a pylons app which I want to spawn a long-running process from. While this process is running (might be an hour or so), I want the page that kicked off this process to just display status (maybe referesh ever 30 seconds or so)... Does

Re: Spawning a worker thread from the controller?

2007-05-04 Thread Matt Billenstein
On Fri, May 04, 2007 at 05:27:42PM -0700, Shannon -jj Behrens wrote: On 5/4/07, Matt [EMAIL PROTECTED] wrote: Hi, I have a pylons app which I want to spawn a long-running process from. While this process is running (might be an hour or so), I want the page that kicked off this process to

Re: Spawning a worker thread from the controller?

2007-05-04 Thread Shannon -jj Behrens
On 5/4/07, Matt Billenstein [EMAIL PROTECTED] wrote: On Fri, May 04, 2007 at 05:27:42PM -0700, Shannon -jj Behrens wrote: On 5/4/07, Matt [EMAIL PROTECTED] wrote: Hi, I have a pylons app which I want to spawn a long-running process from. While this process is running (might be an hour

Re: Spawning a worker thread from the controller?

2007-05-04 Thread Alberto Valverde
On May 5, 2007, at 2:59 AM, Shannon -jj Behrens wrote: On 5/4/07, Matt Billenstein [EMAIL PROTECTED] wrote: On Fri, May 04, 2007 at 05:27:42PM -0700, Shannon -jj Behrens wrote: On 5/4/07, Matt [EMAIL PROTECTED] wrote: Hi, I have a pylons app which I want to spawn a long-running process

Re: Spawning a worker thread from the controller?

2007-05-04 Thread Matt Billenstein
Yeah, I was doing self.status = blah in the worker thread... The thread the controller is in doesn't seem to ever get this value... Using Class.status = blah doesn't seem to help much either... thx m On Fri, May 04, 2007 at 05:59:15PM -0700, Shannon -jj Behrens wrote: On 5/4/07, Matt

Re: Spawning a worker thread from the controller?

2007-05-04 Thread Matt Billenstein
BTW, I'll add that I can do this in a simple standalone python script, spawn a thread and have both that thread and the main thread stuff data into a list or something... thx m On Fri, May 04, 2007 at 06:17:29PM -0700, Matt Billenstein wrote: Yeah, I was doing self.status = blah in the