[f2py] Threading and Wrapping C-code with f2py

Travis Oliphant oliphant.travis@ieee.org
Tue, 28 Aug 2001 12:04:21 +0000


Some questions:

1.  Threading:  

Would it be possible to add to f2py a directive indicating that a wrapped 
module is thread-safe.  This directive would instruct f2py to insert 

Py_BEGIN_ALLOW_THREADS
  function call
Py_END_ALLOW_THREADS


2. Calling C-libraries.

For simple C-libraries it is possible to use f2py.  However, this seems to 
only work if all of the arguments to the C-function are pointers.

Is there any way to add to f2py a directive that instructs f2py to build a 
module that is intended to call a C-library, so that scalar arguments are 
passed directly by value in the function call.

3. Using a different Python name.

This has been discussed on this list before.  But, it would be really useful 
to be able to rename the Python-determined function.  There are many ways to 
do this but it would be useful if some meaningful directive were added to the 
CrackFortran code.

4.  f2py directives

I noticed that there is some support in crackfortran for f2py directives.  
When are these used currently.  I've been assuming that some of the requested 
features could be inserted as f2py directives, but perhaps I misunderstand 
their use.

Thanks very much,

-Travis



-- 
Travis E. Oliphant, Ph.D.
Assistant Professor
Brigham Young University
Provo, UT 84602
(801) 378-3108
oliphant.travis@ieee.org