~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to console/python-console

  • Committer: mattgiuca
  • Date: 2008-01-30 23:59:38 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:342
trunk/console: python-console: Removed code which serves HTML, CSS and JS
    files. All of these are now served by IVLE. python-console is only a
    backend, and never talks directly to the user any more.
    Removed all the JS and HTML files which used to be served by
    python-console.
    (These have all already been duplicated in www/media).

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        self.curr_cmd = ''
98
98
 
99
99
urls = (
100
 
    '/',            'index',
101
 
    '/index.html',  'index',
102
 
    '/(.*\.js)',    'jscript',
103
 
    '/(.*\.css)',   'style',
104
100
    '/chat',        'chat',
105
101
    '/block',       'block')
106
102
 
109
105
# It is assigned a real value at startup.
110
106
magic = ''
111
107
 
112
 
class index:
113
 
    def GET(self):
114
 
        inp = web.input()
115
 
 
116
 
        # Authenticate
117
 
        digest = md5.new('hello' + magic).digest().encode('hex')
118
 
        if inp.digest != digest:
119
 
            web.ctx.status = '401 Unauthorized'
120
 
            return
121
 
 
122
 
        # Okay, so the authentication succeeded,
123
 
        # so all we need to do is send back the static
124
 
        # HTML for the console app.
125
 
        web.output(file("index.html", "r").read())
126
 
 
127
 
class jscript:
128
 
    def GET(self, name):
129
 
        web.output(file(name, "r").read())
130
 
 
131
 
class style:
132
 
    def GET(self, name):
133
 
        web.output(file(name, "r").read())
134
 
 
135
108
class chat:
136
109
 
137
110
    def POST(self):