[Numpy-discussion] Replacement for numpy.distutils.config.try_run

Robert Kern robert.kern at gmail.com
Fri Jan 9 04:30:01 EST 2009


On Fri, Jan 9, 2009 at 03:27, Stéfan van der Walt <stefan at sun.ac.za> wrote:
> 2009/1/9 Robert Kern <robert.kern at gmail.com>:
>> try_run() is not the right thing to call for such a purpose. Use
>> FCompiler.get_version().
>
> That was just an example.  What I want to do is run something like
> "pkg-config blah" and parse the output, but I get the idea from
> David's post that that is OK.

But that's not what try_run() does. Use exec_command() for general
purpose running of programs. try_run() compiles a program from source
and runs the result.

-- 
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