def render(template, filename, **kwargs): """ Render Content from *argv to filename with template. """ with open(directorymaker(filename), 'w') as f: t = jinja.get_template(template) f.write(t.render(**kwargs))
def pygments_css(formatter): with open(directorymaker('css/pygments.css'), "w") as f: f.write(formatter.get_style_defs('.pygments_default'))
def test_simpledir(self): self.assertEqual(directorymaker("test"), "dst/test") self.assertTrue(access("dst", F_OK)) self.assertFalse(access("dst/test", F_OK))