[Matrix-SIG] Fortran-to-python-interface-generator: looking for opinions

Pearu Peterson pearu@ioc.ee
Fri, 27 Aug 1999 21:32:28 +0300 (EETDST)


On Fri, 27 Aug 1999 jhauser@ifm.uni-kiel.de wrote:

> If you say additional flags, do you mean flags during the
> extension_module creation or at runtime?
> 
> If at creation time, I would say, if one does see a need to write
> additional wrapper code in Python he can choose the option flag to
> produce a raw-binding (1).
This is what I meant.

> 
> For the rest I like (3) as the default. One question I have, how would 
> common blocks be handled. If these are wraped into workspace fields on 
> the python side than there needs to be a way to use them as arguments.
> 
> But I don't know if you think already about common-blocks.

Yes, I have thought about common blocks and my new code supports them as
well. Common blocks need not be in the arguments of the functions. I have
thinking of interacting with them directly, with additional get/set
functions in the module. For example,
 subroutine sub
 integer i,j
 common /cblock1/ i,j
 j=i
 end
In python
 import test
 test.cblock1_i_set(5)
 test.sub()
 print test.cblock1_j_get() 
would print '5'

If you can think of more natural way in seeing common blocks from python,
I would like to know as the above is just first solution that I
thought of.

Thanks,
	Pearu