[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-list
Subject:    Re: Generate config file from template using Python search and replace.
From:       Peter Otten <__peter__ () web ! de>
Date:       2015-11-30 9:14:16
Message-ID: n3h417$srs$1 () ger ! gmane ! org
[Download RAW message or body]

Mr Zaug wrote:

> On Sunday, November 29, 2015 at 5:50:51 PM UTC-5, Peter Otten wrote:
>> Mr Zaug wrote:
>> 
>> > When I run this script on OS X El Capitan, I see,
>> >   
>> >   # permission sensitive cache
>> >   $include "_dispatcher_shared_auth-checker:
>> > 
>> > Was I supposed to incorporate it into the script I posted?
>> 
>> Are you referring to my post? I'm sorry, I can't make sense of your
>> question.
> 
> Yes. The snippet you posted went way over my head. When I ran it, it
> printed
> 
> # permission sensitive cache
>   $include "_dispatcher_shared_auth-checker:

It's hard to tell from that problem description what might have gone wrong. 
However:

In your template file you have to enclose all words you want to replace in 
braces ("you have foo options" becomes "you have {foo} options"), to replace 
all literal { with {{ and all literal } with }}.

Did you do that?

-- 
https://mail.python.org/mailman/listinfo/python-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic