Commit ed610678 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

Use cherrypy to run webui-standalone

parent 4c1c0641
#!/usr/bin/env python
# Copyright (C) 2016 J.F.Dockes
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -13,7 +12,7 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the
# Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
from __future__ import print_function
......@@ -251,3 +250,21 @@ class ConfStack(object):
if v and dodecode:
v = v.decode('utf-8')
return v
def stringToStrings(s):
'''Parse a string made of space-separated words and C-Style strings
(double-quoted with backslash escape). E.g.:
word1 word2 "compound \\"quoted\\" string" ->
['word1', 'word2', 'compound "quoted string']'''
import shlex
lex = shlex.shlex(s, posix=True)
lex.quotes = '"'
lex.escape = '\\'
lex.escapedquotes = '"'
l = []
while True:
tok = lex.get_token()
if not tok:
return l
......@@ -15,6 +15,6 @@ if os.path.dirname(__file__) != "":
# set up webui and run in own http server
webui.bottle.debug(True), port=args.port, reloader=False)'cherrypy', host=args.addr, port=args.port, reloader=False)
# vim: foldmethod=marker:filetype=python:textwidth=80:ts=4:et
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment