PyEphem on Win32 -- 2nd try

Discussion in 'Python' started by Guest, Feb 23, 2005.

  1. Guest

    Guest Guest

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

    >>> import ephem
    >>> ephem.date('1994/7/16')


    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/rcN3lp8EQIu2gCfRyDmSCtiP4uB2qKMtIvjcOOsNUkAn1FD
    rir+BKqfDqZ0P+lKcwfgdQPu
    =5+at
    -----END PGP SIGNATURE-----
     
    Guest, Feb 23, 2005
    #1
    1. Advertising

  2. Guest

    John Roth Guest

    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


    <> wrote in message
    news:...
    >
    > -----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
    >
    >>>> import ephem
    >>>> ephem.date('1994/7/16')

    >
    > 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/rcN3lp8EQIu2gCfRyDmSCtiP4uB2qKMtIvjcOOsNUkAn1FD
    > rir+BKqfDqZ0P+lKcwfgdQPu
    > =5+at
    > -----END PGP SIGNATURE-----
    >
     
    John Roth, Feb 23, 2005
    #2
    1. Advertising

  3. Guest

    Guest

    wrote:
    > 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
    >
    > >>> import ephem
    > >>> ephem.date('1994/7/16')

    >
    > 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 had the same problem with Python 2.4. Dates appear to need a
    trailing space.

    ephem.date('1994/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_ValueError,
    "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.
     
    , Feb 24, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason Us

    Struts vs. Expresso (2nd try)

    Jason Us, Oct 22, 2003, in forum: Java
    Replies:
    0
    Views:
    296
    Jason Us
    Oct 22, 2003
  2. Replies:
    1
    Views:
    386
  3. David Flory

    PyEphem on Win32

    David Flory, Feb 21, 2005, in forum: Python
    Replies:
    0
    Views:
    354
    David Flory
    Feb 21, 2005
  4. PyEphem on winXP

    , Sep 21, 2005, in forum: Python
    Replies:
    1
    Views:
    378
    vincent wehren
    Sep 22, 2005
  5. Girish

    [2nd try] Form validator problem.

    Girish, Jan 23, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    152
    Gerald Klein
    Jan 23, 2004
Loading...

Share This Page