kopia lustrzana https://github.com/jbruce12000/kiln-controller
- first stab at getting code python3 compliant
rodzic
56fec3ede7
commit
3718d0952a
|
|
@ -56,7 +56,7 @@ Download [NOOBs](https://www.raspberrypi.org/downloads/noobs/). Copy files to an
|
|||
$ sudo apt-get install python-pip python-dev libevent-dev python-virtualenv
|
||||
$ git clone https://github.com/jbruce12000/kiln-controller.git
|
||||
$ cd kiln-controller
|
||||
$ virtualenv venv
|
||||
$ virtualenv -p python3 venv
|
||||
$ source venv/bin/activate
|
||||
$ pip install greenlet bottle gevent gevent-websocket
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python2
|
||||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
|
@ -18,8 +18,8 @@ try:
|
|||
import config
|
||||
sys.dont_write_bytecode = False
|
||||
except:
|
||||
print "Could not import config file."
|
||||
print "Copy config.py.EXAMPLE to config.py and adapt it for your setup."
|
||||
print ("Could not import config file.")
|
||||
print ("Copy config.py.EXAMPLE to config.py and adapt it for your setup.")
|
||||
exit(1)
|
||||
|
||||
logging.basicConfig(level=config.log_level, format=config.log_format)
|
||||
|
|
|
|||
|
|
@ -66,10 +66,10 @@ class OvenWatcher(threading.Thread):
|
|||
'log': self.lastlog_subset(),
|
||||
#'started': self.started
|
||||
}
|
||||
print backlog
|
||||
print (backlog)
|
||||
backlog_json = json.dumps(backlog)
|
||||
try:
|
||||
print backlog_json
|
||||
print (backlog_json)
|
||||
observer.send(backlog_json)
|
||||
except:
|
||||
log.error("Could not send backlog to new observer")
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue