Skip to content

Commit

Permalink
Adding experimental CherryPy support
Browse files Browse the repository at this point in the history
  • Loading branch information
adammhaile committed Dec 17, 2015
1 parent 4b2e526 commit 66cd7db
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
8 changes: 7 additions & 1 deletion pixelweb/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def runCommand(cmd):
_bootstrap_installs = {
"BiblioPixel": "pip install BiblioPixel --upgrade",
"BiblioPixelAnimations": "pip install https://github.com/ManiacalLabs/BiblioPixelAnimations/archive/master.zip --upgrade",
"pyserial": "pip install pyserial --upgrade"
"pyserial": "pip install pyserial --upgrade",
"cherrypy": "pip install cherrypy --upgrade"
}

def doInstall(mod):
Expand Down Expand Up @@ -76,6 +77,11 @@ def runBootstrap(upgrade = False):
except:
doInstall("pyserial")

# try:
# import cherrypy
# except:
# doInstall("cherrypy")

try:
import bibliopixel
import BiblioPixelAnimations
Expand Down
10 changes: 9 additions & 1 deletion pixelweb/pixelweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,15 @@ def startServer():

app = default_app()
setupRouting(app)
globals._server_obj = StoppableServer(host=host, port=globals._server_config.port)
server = "wsgiref"
try:
import cherrypy
server = "cherrypy"
print "Using CherryPy for Server"
except:
pass

globals._server_obj = StoppableServer(host=host, port=globals._server_config.port, server=server)
globals._running = False
app.run(server=globals._server_obj)
except Exception, e:
Expand Down
2 changes: 1 addition & 1 deletion pixelweb/ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<div class="pusher" id="main_content">
<div class="ui basic segment ui_pane" id="paneAbout">
<img class="ui huge centered image" src="/img/PixelWebLogo_Large.png">
<p class="ui basic center aligned segment largeFont">v1.0.7 beta</p>
<p class="ui basic center aligned segment largeFont">v1.0.8 beta</p>
<p class="ui basic center aligned segment largeFont">Thank you for choosing PixelWeb!</p>
<p class="ui basic center aligned segment largeFont">PixelWeb is Open Source, under the MIT License and provided free of charge to all. If you paid for this software, please contact Maniacal Labs via <a href="mailto:[email protected]">[email protected]</a> to report the license violation.</p>
<p class="ui basic center aligned segment largeFont"></p>
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def run(self):

setup(
name='PixelWeb',
version='1.0b7',
version='1.0b8',
description='PixelWeb is a flexible web-based UI for BiblioPixel',
author='Adam Haile',
author_email='[email protected]',
Expand Down

0 comments on commit 66cd7db

Please sign in to comment.