[Numpy-discussion] Will f2py ever be used in numpy ?

Robert Kern robert.kern@gmail....
Mon Mar 10 03:57:54 CDT 2008


On Mon, Mar 10, 2008 at 3:45 AM, David Cournapeau
<cournapeau@cslab.kecl.ntt.co.jp> wrote:
> On Mon, 2008-03-10 at 02:11 -0500, Robert Kern wrote:
>
>  >
>  > Yes, but it's probably going to be easier to wrap whatever by hand
>  > than try to ensure that f2py bootstraps correctly, scons or no scons.
>  >
>
>  Ok, thanks. Some last questions regarding f2py:
>         - does it make any difference to use it from the command line
>  (executing it through the shell) compared to using it by importing the
>  module (import numpy.f2py), as long as I am making sure I use the right
>  executable ?

Depends on exactly what you are doing with numpy.f2py. The Python API
is (by logical necessity) more capable than the executable.

>         - Would it be possible to add a facility to f2py to get the executable
>  name from the module ? Something like sys.executable, but for f2py ? (If
>  it is ok, I can add the facility myself)

No, because the module knows nothing about where an executable might
be installed. There might be several executables, in fact.

It would be better to just execute [sys.executable, '-c', 'from
numpy.f2py.f2py2e import main;main()']

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco


More information about the Numpy-discussion mailing list