thecocce / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Python interpriter can not output the results generated by F2PY #329

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. following the steps described here:http://www.scipy.org/F2PY_Windows
2. in the interpriter>>>import foo
3. >>> foo.hello()

What is the expected output? What do you see instead?

No output.
I expected that it will output :Hello from Fortran90!!!

What version of the product are you using? On what operating system?

ver1.9.9.7, Winxp

Please provide any additional information below.

If I use the command line python, i will get  the output. But even I use
the gui IDLE come with the Python, i still can not get the output. So I
guess this is not only the Pyscripter problem. But I am wondering that
there is any way to solve this problem in an IDE?

Thanks.

Original issue reported on code.google.com by alexy...@gmail.com on 4 Aug 2009 at 5:18

GoogleCodeExporter commented 9 years ago
I think the hello example given in http://www.scipy.org/F2PY_Windows is 
unfortunate.  The fortran code writes directly to the console which would work 
when you run the program from the Python console but not when you run it from 
an IDE, since IDEs capture the output of sys.stdout sys.stderr.

In most realistic cases you would use Fortran code to do calculations and all 
the printing should be done using Python print statements.

Original comment by pyscripter on 14 Sep 2010 at 10:33