From 53fcb5e73a2433476482452269199f5139ece3d8 Mon Sep 17 00:00:00 2001 From: Armin Rigo Date: Thu, 7 Jan 2016 16:54:33 +0100 Subject: tweaks --- demo/winclipboard.py | 10 +++------- demo/winclipboard_build.py | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'demo') 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 ''', libraries=["user32"]) -- cgit v1.2.1