diff options
author | Stan Seibert <stan@mtrr.org> | 2011-10-21 16:05:11 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2021-05-09 08:42:38 -0700 |
commit | 70a2bdfe04e69303f8ee0d8fe8fd56e2006ccbe2 (patch) | |
tree | f9473cb34046f67cd736ba3997b97e6124540109 | |
parent | a6ceb716ddcb6a7f5dc183ca63f0b258fc90fc2d (diff) | |
download | chroma-70a2bdfe04e69303f8ee0d8fe8fd56e2006ccbe2.tar.gz chroma-70a2bdfe04e69303f8ee0d8fe8fd56e2006ccbe2.tar.bz2 chroma-70a2bdfe04e69303f8ee0d8fe8fd56e2006ccbe2.zip |
Allow chroma to be imported on systems without pygame. Good for clusters.
-rw-r--r-- | chroma/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
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 |