summaryrefslogtreecommitdiff
path: root/demo/xclient.py
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2016-01-07 16:55:22 +0100
committerArmin Rigo <arigo@tunes.org>2016-01-07 16:55:22 +0100
commit3d079fe77d642011c9b925621c9c1a92b546e8b8 (patch)
treead5ef523cf772ef170eb4ae9b5f01d315d4cbb76 /demo/xclient.py
parent53fcb5e73a2433476482452269199f5139ece3d8 (diff)
downloadcffi-3d079fe77d642011c9b925621c9c1a92b546e8b8.tar.gz
tweaks
Diffstat (limited to 'demo/xclient.py')
-rw-r--r--demo/xclient.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/demo/xclient.py b/demo/xclient.py
index 37e7597..e4b3dd2 100644
--- a/demo/xclient.py
+++ b/demo/xclient.py
@@ -1,14 +1,8 @@
import sys, os
-# If the build script was run immediately before this script, the cffi module
-# ends up in the current directory. Make sure we can import it.
-sys.path.append('.')
+# run xclient_build first, then make sure the shared object is on sys.path
+from _xclient_cffi import ffi, lib
-try:
- from _xclient import ffi, lib
-except ImportError:
- print 'run xclient_build first, then make sure the shared object is on sys.path'
- sys.exit(-1)
# ffi "knows" about the declared variables and functions from the
# cdef parts of the module xclient_build created,