[It's not often you get to reply to a thread that's 8 months old ]

Kevin Altis wrote:

> Alex Tweedlt said:
>
>> Thanks again for that.  (Not quite was I was hoping for :-), but very 
>> valuable info).
>>
>> So we now know this simplest case works as expected - and the rather 
>> complex case within PythonCard doesn't.
>>
>> It should be straightforward (if somewhat tedious) to narrow down the 
>> differences until we find where the difference is. But that's not the 
>> kind of debugging we can do via email on a list (or two!!), so I'm 
>> hoping a PythonCard / Mac user can take it from there (or will 
>> contact me off-list and we can work on narrowing it down).
>
I finally bought my own Mac, but by then I had forgotten this problem 
(or assumed it had gone away). Today I upgraded to Python 2.4 and ran 
into the problem myself - and now I'm in a position to track it down.

>
> I expect the problem has to do with relative paths. For some reason 
> Python 2.4.1 is behaving different from 2.3 on the Mac as well as 
> 2.3.x and 2.4.x versions on Windows and Linux. The reason why 
> PythonCard tickles this problem is likely due to one or more lines in 
> model.py. In particular, at the top there is a try/except block with 
> the following line that was added as a fix for relative paths that 
> would show up in earlier versions of Python when the module was imported:
>
No, it's not relative paths. We do some hackery to try to determine 
whether we are running 'normally' or from a standalone built with 
py2app, py2exe, bundlebuilder, macmillan, etc. (so we can look for 
resource files in the different places they finish up, rather than in 
their usual directory alongside the .py file). Part of this is in 
util.py / main_is_frozen() - where there was an explicit test for a 2.3 
based path, specific to the OSX version. Because we wrongly believed we 
were "frozen". we looked in the wrong place(s). 

Not sure what the medium term fix is (long term I think it is probably 
setuptools as Ronald suggested earlier) - but there will be a short term 
fix in CVS soon, hopefully tonight, so if you have been wanting to move 
to Python 2.4 but were held back by PythonCard, you should be able to 
get that soon. Note there may be a delay of up to 24 hours before 
anonymous cvs access catches any updates.



-- 
Alex Tweedly       http://www.tweedly.net



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.392 / Virus Database: 268.5.5/333 - Release Date: 05/05/2006

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to