Re: Creating Python wrapper for DLL

2005-06-28 Thread renwei
use ctype:
http://starship.python.net/crew/theller/ctypes/


"Tim" <[EMAIL PROTECTED]> 
news:[EMAIL PROTECTED]
> I have a DLL, and a C .h file that exports a bunch of functions from
> the DLL.  I would like to create a Python extension module for these
> functions.
>
> I have read the "Extending and Embedding" documentation in the Python
> 2.4 release.  I understand how to extend C code for use in Python if I
> have access to the C source code (I think).  But...
>
> Will I be able to create Python extensions for my DLL functions if I do
> not have access to the DLL source code?
>


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How can I load a module when I will only know the name 'on the fly'

2005-03-14 Thread renwei
use built-in function:  __import__

m = __import__('sys', globals())
print m.platform

weir



"Tobiah" <[EMAIL PROTECTED]> >
>
> m = get_next_module()
>
> some_nice_function_somehow_loads( m )
>
> Thanks,
>
> Tobiah


-- 
http://mail.python.org/mailman/listinfo/python-list