[SciPy-User] scipy on snow leopard
Robert Kern
robert.kern at gmail.com
Wed Sep 2 13:21:18 EDT 2009
On Wed, Sep 2, 2009 at 12:12, Wolfgang
Kerzendorf<wkerzendorf at googlemail.com> wrote:
> Hello Robert,
>
> Here is the output http://pastebin.com/d5d081d18. Grep on Wolfgang and
> you should get all of the prinouts.
Ah! Someone screwed up the conversion to use subprocess instead of
os.popen(). Try this version of the _can_target() function.
def _can_target(cmd, arch):
"""Return true is the command supports the -arch flag for the given
architecture."""
newcmd = cmd[:]
newcmd.extend(["-arch", arch, "-v"])
p = Popen(newcmd, stderr=STDOUT, stdout=PIPE)
stdout, stderr = p.communicate()
for line in stdout.splitlines():
m = re.search(_R_ARCHS[arch], line)
if m:
return True
return False
--
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 SciPy-User
mailing list