Hi Armin
No, i can't reproduce the error in simple way. Even
ctypes.util.find_library('sqlite3.so') works fine.
Actually it is very strange.
I can reproduce this error this way
>>>> from cffi.api import FFI
>>>> ffi = FFI()
>>>> ffi.dlopen('sqlite3.so')
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/e-max/workspace/pypy/lib_pypy/cffi/api.py", line 111, in
dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
But method dlopen in class FFI looks like
def dlopen(self, name, flags=0):
assert isinstance(name, basestring) or name is None
lib, function_cache = _make_ffi_library(self, name, flags)
....
and traceback show that error throws at line lib, function_cache =
_make_ffi_library(self, name, flags)
Strange thing is that if i do something like
>>>> from cffi.api import FFI, _make_ffi_library
>>>> ffi = FFI()
>>>> _make_ffi_library(ffi, 'sqlite3.so', 0)
(<cffi.api.FFILibrary_sqlite3.so object at 0x0000000004892950>, {})
it just works.
On Fri, Apr 12, 2013 at 12:47 PM, Armin Rigo <[email protected]> wrote:
> Re-hi,
>
> On Fri, Apr 12, 2013 at 9:48 AM, Armin Rigo <[email protected]> wrote:
> >> f = os.popen('/sbin/ldconfig -p 2>/dev/null')
> >> OSError: [Errno 12] Cannot allocate memory
>
> This said it would also be useful to understand this error -- why does
> os.popen() complain? Can you try to run a different script that does
> only "os.popen('ls')"? Can you try to reproduce the error in any
> simple way?
>
>
> A bientôt,
>
> Armin.
>
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev