From 82025ee9372f939db3141b3d9bd571507569ba16 Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Sun, 8 Mar 2015 20:25:38 +0100 Subject: [PATCH] - Added requests and pillow/imaging(PIL) deps --- README.md | 3 ++- main.py | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c851cb5..d7c5b6d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,8 @@ Dependencies ------------ ``` -sudo apt-get install python-imaging +sudo apt-get install python-imaging python3-pip python-requests python3-requests +sudo pip-3.2 install pillow # Initialize submodules in repo git submodule update --init diff --git a/main.py b/main.py index a6745cb..788f5b2 100755 --- a/main.py +++ b/main.py @@ -1,7 +1,17 @@ #!/usr/bin/env python3 -import Image -import ImageDraw +try: + import Image + import ImageDraw + HAVE_PIL = True +except: + try: + from PIL import Image + from PIL import ImageDraw + HAVE_PIL = True + except: + HAVE_PIL = False + import time from rgbmatrix import Adafruit_RGBmatrix