コード例 #1
0
ファイル: info.py プロジェクト: blopker/aQuarium
def index(path):
    if path == "":
        return render_template("browse.html", output=getScripts("info"))
    if utils.isScript("info/" + path):
        g.title = path
        return render_template("script.html", output=utils.tabularToDict(utils.runScript("info/" + path)))
    abort(404)
コード例 #2
0
ファイル: views.py プロジェクト: blopker/aQuarium
def index():
    g.title = "Home"
    g.url_path = '/'
    raw = utils.runScript('index.sh')
    data = utils.tabularToDict(raw)
    return render_template('index.html', output=data)
コード例 #3
0
ファイル: test.py プロジェクト: blopker/aQuarium
 def test_tabularToDict(self):
     data = "bo is awesome\n1 2 3\n4 5 6"
     dic = OrderedDict([("bo", ("1", "4")), ("is", ("2", "5")), ("awesome", ("3", "6"))])
     assert utils.tabularToDict(data) == dic