Re: PySol not working on WinXP, SP2

2005-06-01 Thread Skip Montanaro
Ivan> Nope.  The pyc files don't match the py files, and he imports the
Ivan> pyc files directly.  That's what 'imp.load_compiled("__main__",
Ivan> sys.argv[0])' means.  The windows version that Markus shipped
Ivan> never included the .py files anyway, since he didn't need them.

Ivan,

It's not as slick as Brian Lenihan's OSX package, but all I needed was the
sound package (seems you have that), the raw source and the data directory
from a not-to-old PySol distribution to get going.  Until I downloaded
Brian's package this evening I just ran from source using Python from CVS.
I imagine you could do the same on Windows with Python 2.3 or 2.4.

Ivan> I can get it working eventually, I suppose, but I was really
Ivan> hoping someone else had done the work already, or at least had
Ivan> pointers to docs on how to get it working.

Here's my "pysol" command:

#!/bin/bash

cd ~/src/pysol-4.82/src
pythonw pysol.py

I'd be happy to package up a tar or zip file for you with a couple notes on
installing it.

Skip
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PySol not working on WinXP, SP2

2005-06-01 Thread Terry Reedy

"Rocco Moretti" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Are you sure you're using the Python version (2.3, 2.4 etc) that the
> Pysol .pyw files were compiled for? As I understand it, that's what the
> "magic number" is - a versioning number for the .pyc/.pyw files which
> changes when the Python version is upped.
>
> If you had multiple versions of Python installed on your machine,
> upgrading to SP2 might have muddled your file associations.

2.4 came out about the same time as SP2.  If the .pyc files worked with 
2.3, I am pretty sure they will not work with 2.4 since I am pretty sure 
the marshal format (used to make .pycs) was changed slightly for 2.4 after 
no change for a few releases.  It will change again for 2.5.

Python is intended to be distributed as readable source.  .pycs are 
intended to be temporary caches, only kept around to avoid recompiling with 
every run, but certainly disposable with version changes.

Terry J. Reedy





-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PySol not working on WinXP, SP2

2005-06-01 Thread Rocco Moretti
Ivan Van Laningham wrote:
> Hi All--
> I've been using PySol-4.40 for years, because that was the last Windows
> installer version I could find.  My wife's been using it for almost the
> same length of time.  That version's worked just fine on W98, W98SE, W2K
> (server included), and WinXP SP1.
> 
> I upgraded to SP2 and pysol fails silently.  Running 'python pysol.pyw'
> gives me this error: 
> 
> Traceback (most recent call last):
> 
>   File "pysol.pyw", line 64, in ?
> 
> imp.load_compiled("__main__", sys.argv[0])
> 
> ImportError: Bad magic number in C:\Program
> Files\PySol-4.40\data\pysol.pyc

Are you sure you're using the Python version (2.3, 2.4 etc) that the 
Pysol .pyw files were compiled for? As I understand it, that's what the 
"magic number" is - a versioning number for the .pyc/.pyw files which 
changes when the Python version is upped.

If you had multiple versions of Python installed on your machine, 
upgrading to SP2 might have muddled your file associations.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PySol not working on WinXP, SP2

2005-06-01 Thread Ivan Van Laningham
Hi All--

James Carroll wrote:
> 
> You might try finding the source to pysol, and you might notice that
> you have a bunch of *.py files and for each of those, a corresponding
> .pyc file.  If you delete all the pyc files, then they'll get
> re-created from the .py files, and you might be all set.
> 

Nope.  The pyc files don't match the py files, and he imports the pyc
files directly.  That's what 'imp.load_compiled("__main__",
sys.argv[0])' means.  The windows version that Markus shipped never
included the .py files anyway, since he didn't need them.

Getting the source and trying to run it directly would work if there
were any doc help at all, but there's none.  What little there is is
aimed at Linux.  Makefiles need to be constructed, & there are templates
that get filled out automatically.  

I can get it working eventually, I suppose, but I was really hoping
someone else had done the work already, or at least had pointers to docs
on how to get it working.

Metta,
Ivan

> -Jim
> 
> On 6/1/05, Ivan Van Laningham <[EMAIL PROTECTED]> wrote:
> > Hi All--
> > I've been using PySol-4.40 for years, because that was the last Windows
> > installer version I could find.  My wife's been using it for almost the
> > same length of time.  That version's worked just fine on W98, W98SE, W2K
> > (server included), and WinXP SP1.
> >
> > I upgraded to SP2 and pysol fails silently.  Running 'python pysol.pyw'
> > gives me this error:
> >
> > Traceback (most recent call last):
> >
> >   File "pysol.pyw", line 64, in ?
> >
> > imp.load_compiled("__main__", sys.argv[0])
> >
> > ImportError: Bad magic number in C:\Program
> > Files\PySol-4.40\data\pysol.pyc
> >
> > I can't find any later version on google, although I turned up a thread
> > on this list regarding running pysol in a later version on W98.  I also
> > found http://avitous.net/software/pysol-windows/py23.shtml but the
> > version he has REQUIRES ActiveState python 2.2, even though he says he's
> > put together a version for 2.3--and of course, I'm running Python 2.4.
> >
> > My wife's going to be force to upgrade to SP2 some of these days, and
> > she won't be happy if her solitaire doesn't work.  Does anyone have a
> > working version?  Anyone know what happened to Markus ... Oberhumer?
> >
> > Metta,
> > Ivan
> > --
> > Ivan Van Laningham
> > God N Locomotive Works
> > http://www.andi-holmes.com/
> > http://www.foretec.com/python/workshops/1998-11/proceedings.html
> > Army Signal Corps:  Cu Chi, Class of '70
> > Author:  Teach Yourself Python in 24 Hours
> > --
> > http://mail.python.org/mailman/listinfo/python-list
> >
> >

-- 
--
Ivan Van Laningham
God N Locomotive Works
http://www.pauahtun.org/
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps:  Cu Chi, Class of '70
Author:  Teach Yourself Python in 24 Hours
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PySol not working on WinXP, SP2

2005-06-01 Thread Ivan Van Laningham
Hi All--

Robert Kern wrote:
> 
> Skip Montanaro wrote:
> > Ivan> I can't find any later version on google...
> >
> > It may not help you much, but I was able to get it working on MacOSX by
> > grabbing the latest available source and tracking down the contents of the
> > data directory via the Wayback Machine.  If you'd like to give it a try (I'm
> > not sure how you'd get sound stuff working - I'm not a Windows guy), let me
> > know.
> 
> Source, data, and OS X binaries for 4.82 also available from here:
> 
> http://homepage.mac.com/brian_l/FileSharing6.html
> 

Very cool, but MacOSX doesn't help me much.

I'm sure I could get it working on Linux, but I'd like to be able to run
it on my main machine, instead of having to hop back over to the Win98
machine (an option my wife doesn't have). 

Sound server seems to be available as a .pyd file for the Win32
extensions, so I think that's not a problem.

Metta,
Ivan
--
Ivan Van Laningham
God N Locomotive Works
http://www.andi-holmes.com/
http://www.foretec.com/python/workshops/1998-11/proceedings.html
Army Signal Corps:  Cu Chi, Class of '70
Author:  Teach Yourself Python in 24 Hours
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PySol not working on WinXP, SP2

2005-06-01 Thread James Carroll
You might try finding the source to pysol, and you might notice that
you have a bunch of *.py files and for each of those, a corresponding
.pyc file.  If you delete all the pyc files, then they'll get
re-created from the .py files, and you might be all set.

-Jim

On 6/1/05, Ivan Van Laningham <[EMAIL PROTECTED]> wrote:
> Hi All--
> I've been using PySol-4.40 for years, because that was the last Windows
> installer version I could find.  My wife's been using it for almost the
> same length of time.  That version's worked just fine on W98, W98SE, W2K
> (server included), and WinXP SP1.
> 
> I upgraded to SP2 and pysol fails silently.  Running 'python pysol.pyw'
> gives me this error:
> 
> Traceback (most recent call last):
> 
>   File "pysol.pyw", line 64, in ?
> 
> imp.load_compiled("__main__", sys.argv[0])
> 
> ImportError: Bad magic number in C:\Program
> Files\PySol-4.40\data\pysol.pyc
> 
> I can't find any later version on google, although I turned up a thread
> on this list regarding running pysol in a later version on W98.  I also
> found http://avitous.net/software/pysol-windows/py23.shtml but the
> version he has REQUIRES ActiveState python 2.2, even though he says he's
> put together a version for 2.3--and of course, I'm running Python 2.4.
> 
> My wife's going to be force to upgrade to SP2 some of these days, and
> she won't be happy if her solitaire doesn't work.  Does anyone have a
> working version?  Anyone know what happened to Markus ... Oberhumer?
> 
> Metta,
> Ivan
> --
> Ivan Van Laningham
> God N Locomotive Works
> http://www.andi-holmes.com/
> http://www.foretec.com/python/workshops/1998-11/proceedings.html
> Army Signal Corps:  Cu Chi, Class of '70
> Author:  Teach Yourself Python in 24 Hours
> --
> http://mail.python.org/mailman/listinfo/python-list
> 
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PySol not working on WinXP, SP2

2005-06-01 Thread Robert Kern
Skip Montanaro wrote:
> Ivan> I can't find any later version on google...
> 
> It may not help you much, but I was able to get it working on MacOSX by
> grabbing the latest available source and tracking down the contents of the
> data directory via the Wayback Machine.  If you'd like to give it a try (I'm
> not sure how you'd get sound stuff working - I'm not a Windows guy), let me
> know.

Source, data, and OS X binaries for 4.82 also available from here:

http://homepage.mac.com/brian_l/FileSharing6.html

-- 
Robert Kern
[EMAIL PROTECTED]

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PySol not working on WinXP, SP2

2005-06-01 Thread Skip Montanaro

Ivan> I can't find any later version on google...

It may not help you much, but I was able to get it working on MacOSX by
grabbing the latest available source and tracking down the contents of the
data directory via the Wayback Machine.  If you'd like to give it a try (I'm
not sure how you'd get sound stuff working - I'm not a Windows guy), let me
know.

Skip
-- 
http://mail.python.org/mailman/listinfo/python-list