From 70a2bdfe04e69303f8ee0d8fe8fd56e2006ccbe2 Mon Sep 17 00:00:00 2001 From: Stan Seibert Date: Fri, 21 Oct 2011 16:05:11 -0500 Subject: Allow chroma to be imported on systems without pygame. Good for clusters. --- chroma/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chroma/__init__.py b/chroma/__init__.py index a7b87ab..c3f4243 100644 --- a/chroma/__init__.py +++ b/chroma/__init__.py @@ -1,4 +1,7 @@ -from chroma.camera import Camera, EventViewer, view, build +try: + from chroma.camera import Camera, EventViewer, view, build +except ImportError: + pass # Allow chroma usage when pygame not present from chroma import geometry from chroma import event from chroma.io import root -- cgit