Re: [Pympi-users] pyMPI interactively
Status: Alpha
Brought to you by:
patmiller
|
From: <db...@br...> - 2005-09-26 22:35:32
|
Thanks! Now working. Details below.
> Doug,
> did you change
>
> int isatty(int filedes) __THROW {
> return (filedes =3D=3D 0 || filedes =3D=3D 1 || filedes =3D=3D 2);
> }
>
> to
>
> int isatty(int filedes) {
> return (filedes =3D=3D 0 || filedes =3D=3D 1 || filedes =3D=3D 2);
> }
Originally, I had just deleted those lines. But I tried your safe version
below and that gave an error in the make:
pyMPI_isatty.c:43: Warning: FORMAT ERROR
Traceback (most recent call last):
File "./utils/grind_docs_and_prototypes.py", line 530, in ?
actor.check(source,file)
File "./utils/grind_docs_and_prototypes.py", line 179, in check
method(kind,name,file,line,follow_line,*arguments)
File "./utils/grind_docs_and_prototypes.py", line 306, in GLOBAL
raise ValueError,follow
ValueError: int isatty(int filedes)
make[1]: *** [pyMPI_Externals.h] Error 1
make[1]: Leaving directory `/home/setup/pyMPI-2.4b3'
make: *** [all] Error 2
Then I tried the version above without the __THROW, and that worked. Hope
that gives you some hints on how you can write that portably.
Thanks again,
-Doug
> I should likely change it to something safer (if less readable) like:
>
>
> int isatty(int filedes)
> #ifdef __THROW
> __THROW
> #endif
> {
> return (filedes =3D=3D 0 || filedes =3D=3D 1 || filedes =3D=3D 2);
> }
>
> The test suite (from make check which is more extensive than PyMPITest.=
py
> doesn't do a good job of testing interactive (and indeed, I diddn't bui=
ld
> a version --with-isatty when I did the release test!). I'm not sure ho=
w
> to do that automatically.
>
> Pat
>
>
|