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

« back to all changes in this revision

Viewing changes to www/apps/browser/__init__.py

  • Committer: dcoles
  • Date: 2008-03-16 03:29:46 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:713
browser: Added console and run button to allow Python files to be executed in 
the console.

w/m/b/browser.js: Added code to execute file in console
w/a/b/__init__.py: Added code to add console to browser

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
import os.path
29
29
import cgi
 
30
import plugins.console
30
31
 
31
32
from common import (util, studpath)
32
33
 
57
58
        "media/browser/listing.js",
58
59
        "media/browser/editor.js",
59
60
    ]
 
61
    # Let the console plugin insert its own styles and scripts
 
62
    plugins.console.insert_scripts_styles(req.scripts, req.styles)
 
63
 
60
64
    req.write_html_head_foot = True     # Have dispatch print head and foot
61
65
    # The page title should contain the name of the file being browsed
62
66
    req.title = browsepath.rsplit('/', 1)[-1]
93
97
</div>
94
98
<!-- End body -->
95
99
""")
 
100
    # Console
 
101
    plugins.console.present(req, windowpane=True)
96
102
 
97
103
def presentpath(req, path, isdir):
98
104
    """