From: Bernie Innocenti Date: Wed, 8 Apr 2009 23:27:55 +0000 (+0200) Subject: Just send GuruMeditation.js as an external file X-Git-Tag: v4.0~9^2~5 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=88bf87afc8ca2d4c481f20165bc42fbd4124844e;p=geekigeeki.git Just send GuruMeditation.js as an external file --- diff --git a/geekigeeki.py b/geekigeeki.py index 5bae68b..321becc 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -87,13 +87,6 @@ def permalink(s): def emit_header(mime_type="text/html"): print "Content-type: " + mime_type + "; charset=utf-8\n" -def sendfile(dest_file, src_file): - """Efficiently copy file data between file descriptors""" - while 1: - data = src_file.read(65536) - if not data: break - dest_file.write(data) - def send_guru(msg_text, msg_type): if not msg_text: return print '
'
@@ -103,10 +96,8 @@ def send_guru(msg_text, msg_type):
     if msg_type == 'error':
         print '\n           Guru Meditation #DEADBEEF.ABADC0DE'
     print '
' - try: - sendfile(sys.stdout, open('gurumeditation.js', 'rb')) - except IOError, err: - pass + print '' \ + % relative_url('GuruMeditation.js') def send_title(name, text="Limbo", msg_text=None, msg_type='error', writable=False): global title_done