Say inside test_fortran_module.f90 there is defined a subroutine
subroutine sum2numbers(x, y, z)
implicit none
real, intent(in) :: x, y
real, intent(out) :: z
write (*, *) 'z = x + y'
z = x + y
end subroutine sum2numbers
and I compile it using f2py:
f2py3 -c test_fortran_module.f90 -m test_fortran_module
Inside IPython (the interactive prompt),
In [26]: import test_fortran_module
In [27]: z = test_fortran_module.sum2numbers(7, 6)
z = x + y
it is seen that 'z = x + y' is printed. But if the same thing is done in a IPython notebook,
'z = x + y' is not printed. Is there a way to do it?