From 88bf87afc8ca2d4c481f20165bc42fbd4124844e Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Thu, 9 Apr 2009 01:27:55 +0200 Subject: [PATCH] Just send GuruMeditation.js as an external file --- geekigeeki.py | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) 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 -- 2.25.1