Merge branch 'python3'

python2 is no longer supported, switching default to python3
pull/12/head
Jason Bruce 2019-12-10 12:52:33 -05:00
commit 82fed5dc4f
3 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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)

Wyświetl plik

@ -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")