From fdee879283f7ad6a43b7795275b121a002d8465c Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Mon, 21 Dec 2015 14:02:06 -0500 Subject: [PATCH] reconfigure syspath/module import strategy --- lib/__init__.py | 0 myelements/elements.py | 2 +- physics.py | 5 +++-- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 lib/__init__.py diff --git a/lib/__init__.py b/lib/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/myelements/elements.py b/myelements/elements.py index f7efc17..f1f72ff 100644 --- a/myelements/elements.py +++ b/myelements/elements.py @@ -30,7 +30,7 @@ # Load Box2D try: - import Box2D as box2d + import lib.Box2D as box2d except: print 'Could not load the pybox2d library (Box2D).' print 'Please run "setup.py install" to install the dependencies.' diff --git a/physics.py b/physics.py index 3eb2402..97eaaae 100644 --- a/physics.py +++ b/physics.py @@ -35,8 +35,9 @@ from pygame.locals import * from pygame.color import * -sys.path.insert(0, 'lib/') -import Box2D as box2d +# from sugar3.activity import activity +# sys.path.insert(0, os.path.join(activity.get_bundle_path(), 'lib')) +import lib.Box2D as box2d import myelements as elements import tools