Popular recipes tagged "patterns" but not "oop"http://code.activestate.com/recipes/tags/patterns-oop/2016-12-06T20:37:30-08:00ActiveState Code RecipesConvert wildcard text files to PDF with xtopdf (e.g. report*.txt) (Python)
2016-12-06T20:37:30-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/580727-convert-wildcard-text-files-to-pdf-with-xtopdf-eg-/
<p style="color: grey">
Python
recipe 580727
by <a href="/recipes/users/4173351/">Vasudev Ram</a>
(<a href="/recipes/tags/conversion/">conversion</a>, <a href="/recipes/tags/files/">files</a>, <a href="/recipes/tags/globbing/">globbing</a>, <a href="/recipes/tags/patterns/">patterns</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/pdfwriter/">pdfwriter</a>, <a href="/recipes/tags/pdf_generation/">pdf_generation</a>, <a href="/recipes/tags/text_processing/">text_processing</a>, <a href="/recipes/tags/wildcard/">wildcard</a>, <a href="/recipes/tags/xtopdf/">xtopdf</a>).
</p>
<p>This recipe shows how to convert all text files matching a filename wildcard to PDF, using the xtopdf PDF creation toolkit. For example, if you specify report<em>.txt as the wildcard, all files in the current directory that match report</em>.txt, will be converted to PDF, each in a separate PDF file. The original text files are not changed.</p>
<p>Here is a guide to installing and using xtopdf:</p>
<p><a href="http://jugad2.blogspot.in/2012/07/guide-to-installing-and-using-xtopdf.html" rel="nofollow">http://jugad2.blogspot.in/2012/07/guide-to-installing-and-using-xtopdf.html</a></p>
<p>More details on running the program, and sample output, are available here:</p>
<p><a href="http://jugad2.blogspot.in/2016/12/xtopdf-wildcard-text-files-to-pdf-with.html" rel="nofollow">http://jugad2.blogspot.in/2016/12/xtopdf-wildcard-text-files-to-pdf-with.html</a></p>
Yet another singleton pattern in Python using class decorators (Python)
2015-08-11T19:14:45-07:00David Hollmanhttp://code.activestate.com/recipes/users/4182331/http://code.activestate.com/recipes/579090-yet-another-singleton-pattern-in-python-using-clas/
<p style="color: grey">
Python
recipe 579090
by <a href="/recipes/users/4182331/">David Hollman</a>
(<a href="/recipes/tags/patterns/">patterns</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/singleton/">singleton</a>).
Revision 8.
</p>
<p>Another pattern for creating singleton instances of classes in Python.</p>
Bless Classes into Singletons (Python)
2011-09-21T05:34:52-07:00Anand B Pillaihttp://code.activestate.com/recipes/users/4169530/http://code.activestate.com/recipes/577875-bless-classes-into-singletons/
<p style="color: grey">
Python
recipe 577875
by <a href="/recipes/users/4169530/">Anand B Pillai</a>
(<a href="/recipes/tags/metaclasses/">metaclasses</a>, <a href="/recipes/tags/patterns/">patterns</a>, <a href="/recipes/tags/singleton/">singleton</a>).
</p>
<p>A pattern using metaclasses for "blessing" classes into Singletons.</p>