[PYTHONMAC-SIG] Python + PaperPort?
Just van Rossum
Mon, 2 Sep 1996 15:55:47 +0200
At 11:14 AM 9/2/96, Jack Jansen wrote:
>> Does anybody else using Python on the Mac have a PaperPort? Again with
>> 1.4b3 (as with 1.3.3) when I tried to run MkPluginAliases, I got:
>> Traceback (innermost last):
>> File "flap:jack:Python:Mac:scripts:MkPluginAliases.py", line 11, in ?
>> ImportError: No module named os
>> I decided to try it with no extensions today, and <ta-dah> everything
>> worked fine! 11 restarts after fiddling with extensions later, it comes
>> down to the Paperport control panel. If it's loaded, I can't run Python;
>> if it isn't, everything's fine.
>The error message seems to point at a problem with STR# resource 129, where
>sys.path is stored. If the Paperport software somehow puts a new resource 129
>somewhere in the system resources Python will see this during startup and
>attempt to use it as initialization for sys.path.
>I don't know of an easy fix, if this is indeed the problem. For the next
>release I will access the "global" resources by name in stead of by number.
>Hmm, on second hands I *do* know a workaround. Start Python with extensions
>off, and let it create the preferences file. With ResEdit, open the
>preferences file and the interpreter, and copy STR# 128 from the preferences
>file to the interpreter as STR# 129.
If thats's indeed the problem, wouldn't it be easier to check for a STR# nr. 129
with Get1Resource(), to make sure only the current res file is searched?
PYTHONMAC-SIG - SIG on Python for the Apple Macintosh
send messages to: firstname.lastname@example.org
administrivia to: email@example.com