Re: [pylons-devel] PasteDeploy in the Pylons GitHub org?

2016-03-10 Thread Karl O. Pinc
On Wed, 9 Mar 2016 22:55:20 -0500
Jon Rosebaugh  wrote:

> On 3/9/16 12:29 PM, Karl O. Pinc wrote:
> > On Wed, 9 Mar 2016 03:18:49 -0600
> > "Karl O. Pinc"  wrote:

> >> Raw python literal expressions parsed with ast.literal_eval(),
> >> read from a file.

> Montague can definitely allow this

>  Talk to me on IRC
> or by email and I'll walk you through this.

Thanks.

Is there a mailing list or should I send to you directly?

I don't see an irc channel/server listed in the montague docs.


Karl 
Free Software:  "You don't pay back, you pay forward."
 -- Robert A. Heinlein

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/pylons-devel.
For more options, visit https://groups.google.com/d/optout.


[pylons-devel] Setting translogger format via ini

2016-03-10 Thread Zsolt Ero
Hi,

My first mailing list post, as this really puzzles me. I'd like to use a 
short format for displaying HTTP requests in development mode.

Before, I used to have this snippet in my Pyramid app's __init__.py:

from paste.translogger import TransLogger
format = '%(status)s %(REQUEST_METHOD)s %(REQUEST_URI)s' 
app = TransLogger(app, format=format) 
return app


I'd like to turn this into using an .ini file, however, I cannot specify 
the format, as the .ini file syntax needs some kind of escaping, which I 
cannot figure out.

Here is a try on setting translogger format via .ini file:

[filter:translogger]
use = egg:Paste#translogger
setup_console_handler = False
format = %%(status)s %%(REQUEST_METHOD)s %%(REQUEST_URI)s 



It results in an error:

ConfigParser.InterpolationMissingOptionError: Error in file .../development.
ini: Bad value substitution:  
 section: [filter:translogger] 
 option : format 
 key : status 
 rawval : %%(status)s


What is the right escaping method to set translogger's format via .ini file?

Or if it's not possible to escape it, then I don't get it. Why does 
translogger has a format option, if you cannot actually enter anything 
there via ini?

Alembic, for example supports escaping perfectly fine, for example:

file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d_%%(minute).2d_
%%(second).2d_%%(rev)s


Here is this 4 year old issue in PasteDeploy, I think it's related:

https://bitbucket.org/ianb/pastedeploy/issues/11/there-is-no-way-to-escape-character-in-the

Any ideas how to solve this?

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-devel+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/pylons-devel.
For more options, visit https://groups.google.com/d/optout.