diff options
author | Armin Rigo <arigo@tunes.org> | 2016-01-07 16:54:33 +0100 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2016-01-07 16:54:33 +0100 |
commit | 53fcb5e73a2433476482452269199f5139ece3d8 (patch) | |
tree | cd80fe950a64c2070162c234a3d7b3b3673738c0 /demo | |
parent | 1bdca6b4997058a07a25f984a63705201834ef21 (diff) | |
download | cffi-53fcb5e73a2433476482452269199f5139ece3d8.tar.gz |
tweaks
Diffstat (limited to 'demo')
-rw-r--r-- | demo/winclipboard.py | 10 | ||||
-rw-r--r-- | demo/winclipboard_build.py | 2 |
2 files changed, 4 insertions, 8 deletions
diff --git a/demo/winclipboard.py b/demo/winclipboard.py index 22bdf07..5278cd0 100644 --- a/demo/winclipboard.py +++ b/demo/winclipboard.py @@ -5,18 +5,14 @@ import sys, os if not sys.platform == 'win32': raise Exception("Windows-only demo") -# 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('.') - try: - from _winclipboard import ffi, lib + from _winclipboard_cffi import ffi, lib except ImportError: print 'run winclipboard_build first, then make sure the shared object is on sys.path' - sys.exit(-1) + sys.exit(1) # ffi "knows" about the declared variables and functions from the -# cdef parts of the module xclient_build created, +# cdef parts of the module _winclipboard_cffi created, # lib "knows" how to call the functions from the set_source parts # of the module. diff --git a/demo/winclipboard_build.py b/demo/winclipboard_build.py index 6ad55b2..1a510eb 100644 --- a/demo/winclipboard_build.py +++ b/demo/winclipboard_build.py @@ -28,7 +28,7 @@ ffi.cdef(''' void * memcpy(void * s1, void * s2, int n); ''') -ffi.set_source('_winclipboard', ''' +ffi.set_source('_winclipboard_cffi', ''' #include <windows.h> ''', libraries=["user32"]) |