[f2py] FW: f90 types as modul variables

<[email protected]>
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
Hi,
I have another problem with f2py, but i hope you can help me.
There are two .f90 files:

---------------------------------------
!testfile1.f90
module testmodule
	contains
	subroutine foo
		write(*,*) "yeahh!"
	end subroutine foo
end module testmodule
--------------------------------------
!testfile2.f90
subroutine testroutine
	use testmodule
	call foo()
end subroutine testroutine
----------------------------------------

I would like to wrap the second one with f2py, so that i can call mynewodule.testroutine() from python.
But: The first file should not be wrapped to f2py! I just wanna compile it with '-c' and than link the object file testfile1.o to my new module.
I think that should be possible but i just cant get it.

gfortran -c testfile1.f90
/usr/local/bin/python2.6 /usr/local/bin/f2py -m mynewmodul -h mynewmodul.pyf testfile2.f90
/usr/local/bin/python2.6 /usr/local/bin/f2py -c --fcompiler=gfortran mynewmodul.pyf testfile2.f90 testfile1.o

These are the commands I tried...

It would be okay for me if i created a library testfile1.a and link this to my module. But i dont know how to do, either.

Thank you in advance
Malte Mauelshagen

----------------------------------------------------------------------------
Deutsches Zentrum für Luft- und Raumfahrt e.V.
in der Helmholtz-Gemeinschaft
Ausbildung - Duale Hochschule Baden-Württemberg

German Aerospace Center (DLR)
Member of the Helmholtz-Association
Institute of Aerodynamics and Flow Technology

Malte Mauelshagen

Lilienthalplatz 7
38108 Braunschweig
Tel.: 0531/295-2483
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.