Popular Python recipes tagged "meta:requires=cgitb"http://code.activestate.com/recipes/langs/python/tags/meta:requires=cgitb/2012-07-03T05:23:57-07:00ActiveState Code RecipesCalendar 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> ExecSql.cgi returning JSON for SQL (Python) 2009-11-28T02:00:30-08:00Martchenkohttp://code.activestate.com/recipes/users/4172446/http://code.activestate.com/recipes/576971-execsqlcgi-returning-json-for-sql/ <p style="color: grey"> Python recipe 576971 by <a href="/recipes/users/4172446/">Martchenko</a> (<a href="/recipes/tags/cgi/">cgi</a>, <a href="/recipes/tags/json/">json</a>, <a href="/recipes/tags/sql/">sql</a>). </p> <p>CGI script getting JSON for SQL request</p> CGI doc string reader (Python) 2010-04-13T14:06:06-07:00Timothy Makobuhttp://code.activestate.com/recipes/users/4165901/http://code.activestate.com/recipes/576850-cgi-doc-string-reader/ <p style="color: grey"> Python recipe 576850 by <a href="/recipes/users/4165901/">Timothy Makobu</a> (<a href="/recipes/tags/dosctring/">dosctring</a>, <a href="/recipes/tags/python_developer_tools/">python_developer_tools</a>). Revision 10. </p> <p>Displays docstrings of attributes of the given Python module on a web browser. Drop it into the cgi-bin of your web-server, and access it like this, for example:</p> <p><a href="http://localhost/cgi-bin/cgidir.py?m=socket" rel="nofollow">http://localhost/cgi-bin/cgidir.py?m=socket</a></p> Email pretty tracebacks to yourself (or someone you love) (Python) 2005-10-19T08:13:27-07:00Cliff Wellshttp://code.activestate.com/recipes/users/2631558/http://code.activestate.com/recipes/442459-email-pretty-tracebacks-to-yourself-or-someone-you/ <p style="color: grey"> Python recipe 442459 by <a href="/recipes/users/2631558/">Cliff Wells</a> (<a href="/recipes/tags/debugging/">debugging</a>). </p> <p>Even production applications have bugs, and it would be nice to have Python tracebacks emailed to you rather than dumped to the hapless user's screen. This recipe shows you how.</p> Paypal IPN (Python) 2006-09-19T19:02:54-07:00Anthony Barkerhttp://code.activestate.com/recipes/users/122940/http://code.activestate.com/recipes/456361-paypal-ipn/ <p style="color: grey"> Python recipe 456361 by <a href="/recipes/users/122940/">Anthony Barker</a> (<a href="/recipes/tags/cgi/">cgi</a>). Revision 2. </p> <p>This is a cgi script that allows you to log an ipn request from paypal. Basically if you configure your paypal account with an ipn url it will send a post to a script url. You need to respond with a post and then will receive a VERIFIED response.</p> <p>I've included a subroutine to log the data to a database, but you could simply use a text file if that is all you need.</p> A very simple session handling example (Python) 2004-10-28T10:38:30-07:00Jonas Galvezhttp://code.activestate.com/recipes/users/2122857/http://code.activestate.com/recipes/325484-a-very-simple-session-handling-example/ <p style="color: grey"> Python recipe 325484 by <a href="/recipes/users/2122857/">Jonas Galvez</a> (<a href="/recipes/tags/cgi/">cgi</a>). Revision 4. </p> <p>This is a very simple session handling example that uses plain Python CGI (tested only under Python 2.2+). Its goal is to show how cookies are set via HTTP and how easily they can be used for session management.</p> webcounter (Python) 2004-10-15T05:33:47-07:00Michael Foordhttp://code.activestate.com/recipes/users/1565518/http://code.activestate.com/recipes/310320-webcounter/ <p style="color: grey"> Python recipe 310320 by <a href="/recipes/users/1565518/">Michael Foord</a> (<a href="/recipes/tags/cgi/">cgi</a>). </p> <p>This CGI will generate a simple text 'hit counter' for several sites. Useful to ocunt visitors to the 'front door' of your website.</p> Minimal http upload cgi (Python) 2004-03-20T01:47:04-08:00Noah Spurrierhttp://code.activestate.com/recipes/users/103276/http://code.activestate.com/recipes/273844-minimal-http-upload-cgi/ <p style="color: grey"> Python recipe 273844 by <a href="/recipes/users/103276/">Noah Spurrier</a> (<a href="/recipes/tags/web/">web</a>). Revision 3. </p> <p>This is a bare-bones cgi file upload. It will display an upload form and save the uploaded files to disk.</p> http - Exploring Headers and Cookies from Servers (Python) 2004-08-18T10:23:52-07:00Michael Foordhttp://code.activestate.com/recipes/users/1565518/http://code.activestate.com/recipes/298336-http-exploring-headers-and-cookies-from-servers/ <p style="color: grey"> Python recipe 298336 by <a href="/recipes/users/1565518/">Michael Foord</a> (<a href="/recipes/tags/cgi/">cgi</a>). Revision 5. </p> <p>This CGI script allows you to specify a URL. It fetches the URL and displays all the headers sent by the server. It is based on approx.py the CGI-proxy I'm building. It includes authentication circuitry and I'm using it to understand http authentication.</p> <p>This script demostrates using urllib2 to fetch a URL - using a request object with User-Agent header. It also demostrates basic authentication and shows the possible http errors - using a dictionary 'borrowed' from BaseHTTPServer.</p> <p>It will also save cookies using the ClientCookie module, if it's available.</p> cgi-shell (Python) 2004-07-09T07:31:52-07:00Michael Foordhttp://code.activestate.com/recipes/users/1565518/http://code.activestate.com/recipes/286217-cgi-shell/ <p style="color: grey"> Python recipe 286217 by <a href="/recipes/users/1565518/">Michael Foord</a> (<a href="/recipes/tags/cgi/">cgi</a>). </p> <p>Run an arbitrary string on the server as a shell command. Mimics a very basic shell environment on a server using CGI.</p> cgi-shell (Python) 2004-07-09T07:30:50-07:00Michael Foordhttp://code.activestate.com/recipes/users/1565518/http://code.activestate.com/recipes/286216-cgi-shell/ <p style="color: grey"> Python recipe 286216 by <a href="/recipes/users/1565518/">Michael Foord</a> (<a href="/recipes/tags/cgi/">cgi</a>). </p> <p>Run an arbitrary string on the server as a shell command. Mimics a very basic shell environment on a server using CGI.</p>