Re: [Tutor] Running and passing variables to/from Fortran

2007-05-12 Thread John Washakie
WAY too large a project I'm afraid. Yes, that would be the one which would make me an 'expert' in Python ;) Too bad there's just no time right now... On 5/10/07, Bob Gailer <[EMAIL PROTECTED]> wrote: > John Washakie wrote: > > I have access to the source code. > Did you tell us why you want to ke

Re: [Tutor] Running and passing variables to/from Fortran

2007-05-09 Thread Bob Gailer
John Washakie wrote: > I have access to the source code. Did you tell us why you want to keep the code in FORTRAN? Would converting it to Python solve the issue? -- Bob Gailer 510-978-4454 ___ Tutor maillist - Tutor@python.org http://mail.python.o

Re: [Tutor] Running and passing variables to/from Fortran

2007-05-09 Thread John Washakie
I have access to the source code. And I probably could pass the data to stdout, so maybe .popen would work! I'll have a look... thanks! ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Running and passing variables to/from Fortran

2007-05-08 Thread Alan Gauld
"John Washakie" <[EMAIL PROTECTED]> wrote >I have a FORTRAN program which reads in unformatted sparse matrix > data. Rather than rewriting the code in Python, I was hoping there > is > a way to call the Fortran program, passing filename variables TO > Fortran, and returning the data (which is an

Re: [Tutor] Running and passing variables to/from

2007-05-06 Thread emilia12
hi john, what about f2py - Fortran to Python interface generator Port description for lang/f2py Writing Python C/API wrappers for Fortran routines can be a very tedious task, especially if a Fortran routine takes more than 20 arguments but only few of them are relevant for the problems that they

Re: [Tutor] Running and passing variables to/from Fortran

2007-05-06 Thread Andreas Kostyrka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simple is the wrong idea. But I'd guess that you can access your Fortan from C. If so, Pyrex provides a C-for-Python-coder tool. OTOH, just reading the stuff in Python might be simpler than doing all the interfacing. (I presume that you are just readin

[Tutor] Running and passing variables to/from Fortran

2007-05-06 Thread John Washakie
I have a FORTRAN program which reads in unformatted sparse matrix data. Rather than rewriting the code in Python, I was hoping there is a way to call the Fortran program, passing filename variables TO Fortran, and returning the data (which is an array) back to my .py code for use there. Is there a