Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(7)  |  Derive(0)  |  Import(3)
I interpolate a format string with feedparser values.

src/r/s/rsstail.py-HEAD/rsstail/main.py   rsstail.py(Download)
 
from rsstail.formatter import placeholders
from rsstail.formatter import Formatter, hasformat
 
 
        fmt = '  '.join(fmt)
 
    formatter = Formatter(fmt, time_fmt, o.striphtml)
 
    log.debug('using format %s' % repr(formatter.fmt))

src/r/s/rsstail-0.3.1/rsstail/main.py   rsstail(Download)
 
from rsstail.formatter import placeholders
from rsstail.formatter import Formatter, hasformat
 
 
        fmt = '  '.join(fmt)
 
    formatter = Formatter(fmt, time_fmt, o.striphtml)
 
    log.debug('using format %s' % repr(formatter.fmt))

src/r/s/rsstail.py-HEAD/tests/test_formatter.py   rsstail.py(Download)
#!/usr/bin/env python
# encoding: utf-8
 
from rsstail.formatter import Formatter
 
 
def test_placeholder_style_detect():
    f = Formatter('{asdf} {zxcv} {qwerty}', None)
def test_placeholder_style_detect():
    f = Formatter('{asdf} {zxcv} {qwerty}', None)
    assert f.placeholder_style == f.PH_NEW
 
    f = Formatter('%(asdf)s %(zxcv)s %(qwerty)-20s', None)
    assert f.placeholder_style == f.PH_OLD
 
    f = Formatter('{asdf} %(zxcv)s %(qwerty)s', None)
    assert f.placeholder_style == f.PH_OLD
 
    f = Formatter('{asdf} {zxcv} %(qwerty)s', None)
    assert f.placeholder_style == f.PH_NEW