mk wrote: > I wonder if there is a way to load C extension from in-memory object, > not from the file on the disk? No, that's not possible since Python depends on the operating system. A lot of operating systems require a physical file to load the shared library from. Python uses dlopen() on most Un*x platforms and LoadLibraryEx() on Windows.