PyEphem on Win32 -- 2nd try

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    #1

    PyEphem on Win32 -- 2nd try


    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    A second request for help...

    Has anyone run the PyEphem ephemeris application under WinXP?

    I have compiled it with Visual Studio 6 and it crashes Python with a
    simple
    [color=blue][color=green][color=darkred]
    >>> import ephem
    >>> ephem.date('199 4/7/16')[/color][/color][/color]

    Identical code works fine under Linux. I suspect that the problem has
    to do with a parser built into the c shell for the c code that the
    app wraps around. However, I am not good enough at c to spot the
    error.

    I am running ActivePython 2.3.5 Build 236 on a WinXP SP2 system with
    Visual Studio 6 patched to sp6.

    I would appreciate either help from a c guru who knows how to wrap
    python around c or a pointer to another list where experts might
    reside.
    - -------------------------------------------
    Cheers, David Flory

    -----BEGIN PGP SIGNATURE-----
    Version: PGP 8.1

    iQA/AwUBQhy551e2/rcN3lp8EQIu2gCf RyDmSCtiP4uB2qK MtIvjcOOsNUkAn1 FD
    rir+BKqfDqZ0P+l KcwfgdQPu
    =5+at
    -----END PGP SIGNATURE-----

  • John Roth

    #2
    Re: PyEphem on Win32 -- 2nd try

    A quick look at the site, and following the link to
    the XEphem site reveals that the Windows port
    of XEphem uses Cygwin. AFAIK, that's not
    compatible with the usual CPython implementation.

    Again, AFAIK, you'll either have to use a Python
    port compiled under Cygwin, or you'll have to
    find a Windows port compiled with VS 6 or
    higher.

    Someone who knows more about those
    issues will have to take it from here.

    John Roth


    <Flory@fdu.ed u> wrote in message
    news:mailman.29 72.1109178865.2 2381.python-list@python.org ...[color=blue]
    >
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > A second request for help...
    >
    > Has anyone run the PyEphem ephemeris application under WinXP?
    > http://rhodesmill.org/brandon/projects/pyephem.html
    > I have compiled it with Visual Studio 6 and it crashes Python with a
    > simple
    >[color=green][color=darkred]
    >>>> import ephem
    >>>> ephem.date('199 4/7/16')[/color][/color]
    >
    > Identical code works fine under Linux. I suspect that the problem has
    > to do with a parser built into the c shell for the c code that the
    > app wraps around. However, I am not good enough at c to spot the
    > error.
    >
    > I am running ActivePython 2.3.5 Build 236 on a WinXP SP2 system with
    > Visual Studio 6 patched to sp6.
    >
    > I would appreciate either help from a c guru who knows how to wrap
    > python around c or a pointer to another list where experts might
    > reside.
    > - -------------------------------------------
    > Cheers, David Flory
    >
    > -----BEGIN PGP SIGNATURE-----
    > Version: PGP 8.1
    >
    > iQA/AwUBQhy551e2/rcN3lp8EQIu2gCf RyDmSCtiP4uB2qK MtIvjcOOsNUkAn1 FD
    > rir+BKqfDqZ0P+l KcwfgdQPu
    > =5+at
    > -----END PGP SIGNATURE-----
    >[/color]

    Comment

    • drobinow@gmail.com

      #3
      Re: PyEphem on Win32 -- 2nd try


      Flory@fdu.edu wrote:[color=blue]
      > Has anyone run the PyEphem ephemeris application under WinXP?
      > http://rhodesmill.org/brandon/projects/pyephem.html
      > I have compiled it with Visual Studio 6 and it crashes Python with a
      > simple
      >[color=green][color=darkred]
      > >>> import ephem
      > >>> ephem.date('199 4/7/16')[/color][/color]
      >
      > Identical code works fine under Linux. I suspect that the problem has
      > to do with a parser built into the c shell for the c code that the
      > app wraps around. However, I am not good enough at c to spot the
      > error.[/color]

      I had the same problem with Python 2.4. Dates appear to need a
      trailing space.

      ephem.date('199 4/7/16 ')
      works for me.

      I believe the following code in ephem.c is responsible:
      if (conversions == -1 || !conversions ||
      (conversions == 1 && s[dchars] != '\0') ||
      (conversions == 2 && s[tchars] != '\0')) {
      PyErr_SetString (PyExc_ValueErr or,
      "your date string does not seem to have "
      "year/month/day followed optionally by "
      "hours:minutes: seconds");

      This may be a VC versus gcc issue. It would be interesting to see if a
      Mingw compile would help here.

      Comment

      Working...