PyEphem on Win32 -- 2nd try

G

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

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

John Roth

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
 
D

drobinow

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


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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top