Popular Python recipes tagged "meta:requires=calendar"http://code.activestate.com/recipes/langs/python/tags/meta:requires=calendar/2014-02-14T22:33:04-08:00ActiveState Code RecipesCreate simple PDF text calendars with xtopdf (Python) 2014-02-14T22:33:04-08:00Vasudev Ramhttp://code.activestate.com/recipes/users/4173351/http://code.activestate.com/recipes/578832-create-simple-pdf-text-calendars-with-xtopdf/ <p style="color: grey"> Python recipe 578832 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/calendar/">calendar</a>, <a href="/recipes/tags/pdf/">pdf</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/reportlab/">reportlab</a>, <a href="/recipes/tags/xtopdf/">xtopdf</a>). </p> <p>This recipe shows how to create simple text calendars as PDF using xtopdf, a Python toolkit for PDF creation.</p> Calendar Maker (Python) 2012-07-03T05:23:57-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/578187-calendar-maker/ <p style="color: grey"> Python recipe 578187 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/archive/">archive</a>, <a href="/recipes/tags/calendar/">calendar</a>, <a href="/recipes/tags/cgi/">cgi</a>, <a href="/recipes/tags/old/">old</a>). </p> <p>This is an old program experimenting with CGI techniques in Python using <code>CGIHTTPServer</code> and designed for creating calendars. This is committed for archival to be run under Python 2.5 or later versions.</p> Cron-like Triggers (Python) 2010-12-07T22:52:10-08:00Eric Pruitthttp://code.activestate.com/recipes/users/4170757/http://code.activestate.com/recipes/577466-cron-like-triggers/ <p style="color: grey"> Python recipe 577466 by <a href="/recipes/users/4170757/">Eric Pruitt</a> (<a href="/recipes/tags/anacron/">anacron</a>, <a href="/recipes/tags/cron/">cron</a>, <a href="/recipes/tags/job/">job</a>, <a href="/recipes/tags/scheduler/">scheduler</a>, <a href="/recipes/tags/task/">task</a>). Revision 4. </p> <p>This module provides an easy to use interface for cron-like task scheduling. The latest version and its unit tests can be found at <a href="https://github.com/jameseric/cronex">github</a>.</p> Python 3 WSGI Server (Python) 2009-09-22T11:36:30-07:00poops mcgeehttp://code.activestate.com/recipes/users/4171745/http://code.activestate.com/recipes/576906-python-3-wsgi-server/ <p style="color: grey"> Python recipe 576906 by <a href="/recipes/users/4171745/">poops mcgee</a> . Revision 2. </p> <p>This is a simplified version of tornado's WSGI server implemented in python 3.</p> <p>Example usage:</p> <pre class="prettyprint"><code>import web import wsgiref.simple_server class MainHandler(web.RequestHandler): def get(self): self.write("Hello, world") if __name__ == "__main__": application = web.WSGIApplication([ (r"/", MainHandler), ]) server = wsgiref.simple_server.make_server('', 8888, application) server.serve_forever() </code></pre> Delete all message older than a given date in a pop account (Python) 2009-10-05T12:56:13-07:00Benjamin Sergeanthttp://code.activestate.com/recipes/users/4039626/http://code.activestate.com/recipes/576922-delete-all-message-older-than-a-given-date-in-a-po/ <p style="color: grey"> Python recipe 576922 by <a href="/recipes/users/4039626/">Benjamin Sergeant</a> (<a href="/recipes/tags/delete/">delete</a>, <a href="/recipes/tags/email/">email</a>, <a href="/recipes/tags/pop/">pop</a>). </p> <p>I was using the keep option in fetchmail, so I had a huge number of emails that seems to slow down mails retrieval / pop connection. I wanted a way to </p> DateTimeSyncer with Daylight Savings Time adjustment (Python) 2008-10-31T15:52:18-07:00Jack Trainorhttp://code.activestate.com/recipes/users/4076953/http://code.activestate.com/recipes/576546-datetimesyncer-with-daylight-savings-time-adjustme/ <p style="color: grey"> Python recipe 576546 by <a href="/recipes/users/4076953/">Jack Trainor</a> (<a href="/recipes/tags/shortcuts/">shortcuts</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>). Revision 5. </p> <p>DateTimeSyncer synchronizes computer's current date and time with Daylight Savings adjustment directly without depending on operating system or Python's time.localtime().</p> <p>This allows programmers to update Daylight Savings Time rules without depending on external updates to OS or Python.</p> <p>Double-clicking this module will synchronize your computer's date and time on a Windows machine. It can be easily extended other time zones and other operating systems.</p> Cataloging and adding IPTC keywords to digital photos (Python) 2007-01-19T13:38:49-08:00Chad Cooperhttp://code.activestate.com/recipes/users/4023200/http://code.activestate.com/recipes/500266-cataloging-and-adding-iptc-keywords-to-digital-pho/ <p style="color: grey"> Python recipe 500266 by <a href="/recipes/users/4023200/">Chad Cooper</a> (<a href="/recipes/tags/exif/">exif</a>, <a href="/recipes/tags/graphics/">graphics</a>, <a href="/recipes/tags/iptc/">iptc</a>, <a href="/recipes/tags/photography/">photography</a>). </p> <p>This script helps me manage my digital photos by filing them in a directory based on the EXIF date and applying keywords and by-line information to the IPTC metadata.</p> z_html.py (Python) 2006-07-05T09:40:44-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/496862-z_htmlpy/ <p style="color: grey"> Python recipe 496862 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/cgi/">cgi</a>). </p> <p>This recipe requires the z_matrix module. Two classes are provided, HTML_Table and HTML_Month. HTML_Table can manage the generation of a table in HTML format. HTML_Month builds on top of HTML_Table and expands on its capabilities. It allows for dynamically created tables that have the look of the selected month.</p> Thread-safe caching object with file and HTTP implementations (Python) 2006-02-08T10:04:16-08:00Nicolas Lehuenhttp://code.activestate.com/recipes/users/1599156/http://code.activestate.com/recipes/302997-thread-safe-caching-object-with-file-and-http-impl/ <p style="color: grey"> Python recipe 302997 by <a href="/recipes/users/1599156/">Nicolas Lehuen</a> (<a href="/recipes/tags/algorithms/">algorithms</a>). Revision 9. </p> <p>Implementation of an abstract, thread-safe cache with minimal locking. Four concrete implementations : a validating file cache, a validating HTTP cache, an experimental Python module cache and a function cache. Plus, an abstract cache with weak references to its values.</p> To Find out the Hard Disk Size,Free Space and Used Space of a Networked Computer (Python) 2001-07-31T12:39:56-07:00Ratnakar Mallahttp://code.activestate.com/recipes/users/122994/http://code.activestate.com/recipes/66455-to-find-out-the-hard-disk-sizefree-space-and-used-/ <p style="color: grey"> Python recipe 66455 by <a href="/recipes/users/122994/">Ratnakar Malla</a> (<a href="/recipes/tags/sysadmin/">sysadmin</a>). </p> <p>This module , does not take any i/p file. It first does a net view command , and gets the list of computers in the domain. Connects to each computer , performs size check and returns the size of the harddisk. Please note that , the file and dir sizes are caluclated in DOS. Windows performs a sort of approximation. So there will be slight variation in the amount of space reported by DOS and Windows. If I am not wrong DOS gives u the best values.</p> Pure Python strptime (Python) 2003-09-15T18:01:45-07:00Brett Cannonhttp://code.activestate.com/recipes/users/98030/http://code.activestate.com/recipes/56036-pure-python-strptime/ <p style="color: grey"> Python recipe 56036 by <a href="/recipes/users/98030/">Brett Cannon</a> . Revision 10. </p> <p>This is a modification of the Python code that powers time.strptime() in CVS on 2003-08-11 (Python 2.4 development) to be compatible with Jython 2.1 and CPython 2.1 . It does require the datetime package if you want missing date info to be filled in; it can be found in CVS at /python/nondist/sandbox/datetime/ .</p> <p>If you are using CPython version 2.3.0 or higher, then you do not need this. A more modernized version of the code is included in the language.</p>