[Python-Dev] Syscall Proxying in Python
abo at minkirri.apana.org.au
Mon Aug 1 20:08:51 CEST 2005
On Mon, 2005-08-01 at 10:36, Gabriel Becedillas wrote:
> We embbeded Python 2.0.1 in our product a few years ago and we'd like to
> upgrade to Python 2.4.1. This was not a simple task, because we needed
> to execute syscalls on a remote host. We modified Python's source code
> in severall places to call our own versions of some functions. For
> example, instead of calling fopen(...), the source code was modified to
> call remote_fopen(...), and the same was done with other libc functions.
> Socket functions where hooked too (we modified socket.c), Windows
> Registry functions, etc..
Wow... you guys sure did it the hard way. If you had done it at the
Python level, you would have had a much easier time of both implementing
and updating it.
As an example, have a look at my osVFS stuff. This is a replacement for
the os module and open() that tricks Python into using a virtual file
Donovan Baarda <abo at minkirri.apana.org.au>
More information about the Python-Dev