kopia lustrzana https://github.com/jbruce12000/kiln-controller
Merge branch 'python3'
python2 is no longer supported, switching default to python3pull/12/head
commit
82fed5dc4f
|
@ -53,10 +53,10 @@ My controller plugs into the wall, and the kiln plugs into the controller.
|
|||
|
||||
Download [NOOBs](https://www.raspberrypi.org/downloads/noobs/). Copy files to an SD card. Install raspbian on RPi using NOOBs.
|
||||
|
||||
$ sudo apt-get install python-pip python-dev libevent-dev python-virtualenv
|
||||
$ sudo apt-get install python3-pip python3-dev python3-virtualenv libevent-dev
|
||||
$ git clone https://github.com/jbruce12000/kiln-controller.git
|
||||
$ cd kiln-controller
|
||||
$ virtualenv venv
|
||||
$ virtualenv -p python3 venv
|
||||
$ source venv/bin/activate
|
||||
$ pip install --upgrade setuptools
|
||||
$ pip install greenlet bottle gevent gevent-websocket
|
||||
|
@ -68,7 +68,7 @@ Download [NOOBs](https://www.raspberrypi.org/downloads/noobs/). Copy files to an
|
|||
If you want to deploy the code on a PI for production:
|
||||
|
||||
$ cd kiln-controller
|
||||
$ virtualenv venv
|
||||
$ virtualenv -p python3 venv
|
||||
$ source venv/bin/activate
|
||||
$ pip install RPi.GPIO
|
||||
|
||||
|
|
|
@ -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