[f2py] f2py and Compaq Visual Fortran/Visual Studio

Vagabond_Aero <[email protected]> Tue, 4 Sep 2012 15:51:10 -0700
Newsgroups gmane.comp.python.f2py.user
Message-ID <CAMHhCEV1vkJsoQd3Yw9OzYdTGqNvU_xPnu79Y2Ggkh2F6Jg-5w@mail.gmail.com>
--===============5158315954467592621==
Content-Type: multipart/alternative; boundary=20cf300515383691c204c8e81886

--20cf300515383691c204c8e81886
Content-Type: text/plain; charset=ISO-8859-1

I have a situation where I'm being given an object module which has been
compiled using Compaq Visual Fortran that I would like to use in my python
scripts.  I already know I can specify --fcompiler=compaqv to use the same
compiler for the fortran code to wrap the object module, but have not been
successfully able to get --compiler=msvc to work so I can build a pyd I can
use.

I am still using Windows XP (32 bit) for a few more months, and need the
module before we switch over to Win 7 and whatever problems/solutions that
will bring.  Python version is 2.7.3; numpy version is 1.6.1.

The complaint I'm getting hung up on when I specify --compiler=msvc is f2py
cannot find vcvarsall.bat, even though I have a copy of it in the working
directory (making sure a copy was in a directory on the PATH did not work,
either!).  Manually executing vcvarsall.bat modifies the PATH for that
session, but f2py has a problem with the spaces in the directory names
having spaces in them, like "Program Files".  I tried replacing the spaces
with %20's but something (Windows) converted the '%' character to 0, and
that failed.

I know I can compile the obj module into a standalone program with the
wrapper code and execute it using, for example, an os.subprocess, but it
would work so much better if it could be built as a library I can call.

Does anyone have any other suggestions?

Bruce

-- 
Co-discoverer of KBO:
IH-X-694190<http://www.icehunters.org/object.php?id=694190>

--20cf300515383691c204c8e81886
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<font face=3D"comic sans ms,sans-serif">I have a situation where I&#39;m be=
ing given an object module which has been compiled using Compaq Visual Fort=
ran that I would like to use in my python scripts. =A0I already know I can =
specify --fcompiler=3Dcompaqv to use the same compiler for the fortran code=
 to wrap the object module, but have not been successfully able to get --co=
mpiler=3Dmsvc to work so I can build a pyd I can use.</font><div>

<font face=3D"comic sans ms,sans-serif"><br></font></div><div><font face=3D=
"comic sans ms,sans-serif">I am still using Windows XP (32 bit) for a few m=
ore months, and need the module before we switch over to Win 7 and whatever=
 problems/solutions that will bring. =A0Python version is 2.7.3; numpy vers=
ion is 1.6.1.</font></div>
<div><font face=3D"comic sans ms,sans-serif"><br></font></div><div><font fa=
ce=3D"comic sans ms,sans-serif">The complaint I&#39;m getting hung up on wh=
en I specify --compiler=3Dmsvc is f2py cannot find vcvarsall.bat, even thou=
gh I have a copy of it in the working directory (making sure a copy was in =
a directory on the PATH did not work, either!). =A0Manually executing vcvar=
sall.bat modifies the PATH for that session, but f2py has a problem with th=
e spaces in the directory names having spaces in them, like &quot;Program F=
iles&quot;. =A0I tried replacing the spaces with %20&#39;s but something (W=
indows) converted the &#39;%&#39; character to 0, and that failed.</font></=
div>
<div><br></div><div><font face=3D"comic sans ms,sans-serif">I know I can co=
mpile the obj module into a standalone program with the wrapper code and ex=
ecute it using, for example, an os.subprocess, but it would work so much be=
tter if it could be built as a library I can call.</font></div>
<div><div><font face=3D"comic sans ms,sans-serif"><br class=3D"Apple-interc=
hange-newline">Does anyone have any other suggestions?</font></div></div><d=
iv><font face=3D"comic sans ms,sans-serif"><br></font></div><div><font face=
=3D"comic sans ms,sans-serif">Bruce<br clear=3D"all">
</font><div><br></div>-- <br>
Co-discoverer of KBO: =A0<h3><a href=3D"http://www.icehunters.org/object.ph=
p?id=3D694190" style=3D"margin-top:0px;margin-right:0px;margin-bottom:0px;m=
argin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding=
-left:0px;color:rgb(247,216,135)" target=3D"_blank">IH-X-694190</a></h3>

<br>
</div>

--20cf300515383691c204c8e81886--


--===============5158315954467592621==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
f2py-users mailing list
f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
http://cens.ioc.ee/mailman/listinfo/f2py-users

--===============5158315954467592621==--