summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Mac/Modules/ae/aescan.py7
-rw-r--r--Mac/Modules/ae/aesupport.py2
-rw-r--r--Mac/Modules/ae/nsremote.py5
-rw-r--r--Mac/Modules/cm/cmscan.py6
-rw-r--r--Mac/Modules/ctl/ctlscan.py6
-rw-r--r--Mac/Modules/ctl/ctlsupport.py3
-rw-r--r--Mac/Modules/dlg/dlgscan.py6
-rw-r--r--Mac/Modules/dlg/dlgsupport.py3
-rw-r--r--Mac/Modules/evt/evtscan.py6
-rw-r--r--Mac/Modules/fm/fmscan.py6
-rw-r--r--Mac/Modules/help/helpscan.py6
-rw-r--r--Mac/Modules/list/listscan.py6
-rw-r--r--Mac/Modules/menu/menuscan.py6
-rw-r--r--Mac/Modules/menu/menusupport.py3
-rw-r--r--Mac/Modules/qd/qdscan.py6
-rw-r--r--Mac/Modules/qd/qdsupport.py3
-rw-r--r--Mac/Modules/qt/qtscan.py6
-rw-r--r--Mac/Modules/res/resscan.py5
-rw-r--r--Mac/Modules/res/ressupport.py3
-rw-r--r--Mac/Modules/scrap/scrapscan.py6
-rw-r--r--Mac/Modules/snd/sndscan.py6
-rw-r--r--Mac/Modules/snd/sndsupport.py3
-rw-r--r--Mac/Modules/te/TEmodule.c2
-rw-r--r--Mac/Modules/te/tescan.py6
-rw-r--r--Mac/Modules/waste/wastescan.py6
-rw-r--r--Mac/Modules/win/winscan.py6
-rw-r--r--Mac/Modules/win/winsupport.py3
27 files changed, 68 insertions, 64 deletions
diff --git a/Mac/Modules/ae/aescan.py b/Mac/Modules/ae/aescan.py
index 620a91c..c1f4251 100644
--- a/Mac/Modules/ae/aescan.py
+++ b/Mac/Modules/ae/aescan.py
@@ -1,15 +1,16 @@
# Scan AppleEvents.h header file, generate aegen.py and AppleEvents.py files.
# Then run aesupport to generate AEmodule.c.
-0# (Should learn how to tell the compiler to compile it as well.)
+# (Should learn how to tell the compiler to compile it as well.)
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
import sys
import os
import string
import regex
import regsub
import MacOS
+
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from bgenlocations import TOOLBOXDIR
from scantools import Scanner
diff --git a/Mac/Modules/ae/aesupport.py b/Mac/Modules/ae/aesupport.py
index f2c947f..58af2df 100644
--- a/Mac/Modules/ae/aesupport.py
+++ b/Mac/Modules/ae/aesupport.py
@@ -3,8 +3,6 @@
# It execs the file aegen.py which contain the function definitions
# (aegen.py was generated by aescan.py, scanning the <AppleEvents.h> header file).
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
from macsupport import *
diff --git a/Mac/Modules/ae/nsremote.py b/Mac/Modules/ae/nsremote.py
index cace374..d823216 100644
--- a/Mac/Modules/ae/nsremote.py
+++ b/Mac/Modules/ae/nsremote.py
@@ -11,13 +11,8 @@ Jack Jansen, CWI, January 1996.
# be nicer to use the more "object oriented" standard OSA stuff, when it
# is implemented in Netscape.
#
-import addpack
import sys
-addpack.addpack('Tools')
-addpack.addpack('bgen')
-addpack.addpack('ae')
-
import aetools
import Standard_Suite
import WWW_Suite
diff --git a/Mac/Modules/cm/cmscan.py b/Mac/Modules/cm/cmscan.py
index 3e091a6..e1db4b4 100644
--- a/Mac/Modules/cm/cmscan.py
+++ b/Mac/Modules/cm/cmscan.py
@@ -1,7 +1,9 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/ctl/ctlscan.py b/Mac/Modules/ctl/ctlscan.py
index 311295b..4c4dbd1 100644
--- a/Mac/Modules/ctl/ctlscan.py
+++ b/Mac/Modules/ctl/ctlscan.py
@@ -1,6 +1,8 @@
# Scan <Controls.h>, generating ctlgen.py.
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py
index a905970..cee9a4c 100644
--- a/Mac/Modules/ctl/ctlsupport.py
+++ b/Mac/Modules/ctl/ctlsupport.py
@@ -5,9 +5,6 @@
import string
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
-
# Declarations that change for each manager
MACHEADERFILE = 'Controls.h' # The Apple header file
MODNAME = 'Ctl' # The name of the module
diff --git a/Mac/Modules/dlg/dlgscan.py b/Mac/Modules/dlg/dlgscan.py
index d51a2d1..7ae1341 100644
--- a/Mac/Modules/dlg/dlgscan.py
+++ b/Mac/Modules/dlg/dlgscan.py
@@ -1,7 +1,9 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py
index b8531ca..cbec130 100644
--- a/Mac/Modules/dlg/dlgsupport.py
+++ b/Mac/Modules/dlg/dlgsupport.py
@@ -3,9 +3,6 @@
# It execs the file dlggen.py which contain the function definitions
# (dlggen.py was generated by dlgscan.py, scanning the <Dialogs.h> header file).
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
-
from macsupport import *
# Create the type objects
diff --git a/Mac/Modules/evt/evtscan.py b/Mac/Modules/evt/evtscan.py
index 676c839..3b3765f 100644
--- a/Mac/Modules/evt/evtscan.py
+++ b/Mac/Modules/evt/evtscan.py
@@ -1,7 +1,9 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/fm/fmscan.py b/Mac/Modules/fm/fmscan.py
index 3f0e51b..d111964 100644
--- a/Mac/Modules/fm/fmscan.py
+++ b/Mac/Modules/fm/fmscan.py
@@ -1,7 +1,9 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/help/helpscan.py b/Mac/Modules/help/helpscan.py
index 3b1db65..da95e85 100644
--- a/Mac/Modules/help/helpscan.py
+++ b/Mac/Modules/help/helpscan.py
@@ -1,7 +1,9 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/list/listscan.py b/Mac/Modules/list/listscan.py
index dbaed68..d713c39 100644
--- a/Mac/Modules/list/listscan.py
+++ b/Mac/Modules/list/listscan.py
@@ -1,7 +1,9 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/menu/menuscan.py b/Mac/Modules/menu/menuscan.py
index cf00dcc..37ced2f 100644
--- a/Mac/Modules/menu/menuscan.py
+++ b/Mac/Modules/menu/menuscan.py
@@ -1,6 +1,8 @@
# Scan <Menus.h>, generating menugen.py.
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/menu/menusupport.py b/Mac/Modules/menu/menusupport.py
index 80b08b1..cbd57bf 100644
--- a/Mac/Modules/menu/menusupport.py
+++ b/Mac/Modules/menu/menusupport.py
@@ -5,9 +5,6 @@
import string
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
-
# Declarations that change for each manager
MACHEADERFILE = 'Menus.h' # The Apple header file
MODNAME = 'Menu' # The name of the module
diff --git a/Mac/Modules/qd/qdscan.py b/Mac/Modules/qd/qdscan.py
index 46adaaa..2619d36 100644
--- a/Mac/Modules/qd/qdscan.py
+++ b/Mac/Modules/qd/qdscan.py
@@ -1,7 +1,9 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/qd/qdsupport.py b/Mac/Modules/qd/qdsupport.py
index 461d27f..9b1151b 100644
--- a/Mac/Modules/qd/qdsupport.py
+++ b/Mac/Modules/qd/qdsupport.py
@@ -5,9 +5,6 @@
import string
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
-
# Declarations that change for each manager
MACHEADERFILE = 'QuickDraw.h' # The Apple header file
MODNAME = 'Qd' # The name of the module
diff --git a/Mac/Modules/qt/qtscan.py b/Mac/Modules/qt/qtscan.py
index ebef23b..9f326a6 100644
--- a/Mac/Modules/qt/qtscan.py
+++ b/Mac/Modules/qt/qtscan.py
@@ -1,7 +1,9 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/res/resscan.py b/Mac/Modules/res/resscan.py
index eff0005..efb538c 100644
--- a/Mac/Modules/res/resscan.py
+++ b/Mac/Modules/res/resscan.py
@@ -8,8 +8,9 @@ import string
import regex
import regsub
import MacOS
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
+
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from bgenlocations import TOOLBOXDIR
from scantools import Scanner
diff --git a/Mac/Modules/res/ressupport.py b/Mac/Modules/res/ressupport.py
index 4b4bd2f..5d45f2e 100644
--- a/Mac/Modules/res/ressupport.py
+++ b/Mac/Modules/res/ressupport.py
@@ -3,9 +3,6 @@
# It execs the file resgen.py which contain the function definitions
# (resgen.py was generated by resscan.py, scanning the <Resources.h> header file).
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
-
from macsupport import *
diff --git a/Mac/Modules/scrap/scrapscan.py b/Mac/Modules/scrap/scrapscan.py
index 0bad7c2..95bf1bb 100644
--- a/Mac/Modules/scrap/scrapscan.py
+++ b/Mac/Modules/scrap/scrapscan.py
@@ -3,8 +3,10 @@
# Note that the scrap-manager include file is so weird that this
# generates a boilerplate to be edited by hand.
-import addpack
-addpack.addpack(':tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/snd/sndscan.py b/Mac/Modules/snd/sndscan.py
index c7ca36b..f2f19ec 100644
--- a/Mac/Modules/snd/sndscan.py
+++ b/Mac/Modules/snd/sndscan.py
@@ -2,8 +2,10 @@
# Then import sndsupport (which execs sndgen.py) to generate Sndmodule.c.
# (Should learn how to tell the compiler to compile it as well.)
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from bgenlocations import TOOLBOXDIR
from scantools import Scanner
diff --git a/Mac/Modules/snd/sndsupport.py b/Mac/Modules/snd/sndsupport.py
index 279f22a..9856e79 100644
--- a/Mac/Modules/snd/sndsupport.py
+++ b/Mac/Modules/snd/sndsupport.py
@@ -3,9 +3,6 @@
# It execs the file sndgen.py which contain the function definitions
# (sndgen.py was generated by sndscan.py, scanning the <Sound.h> header file).
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
-
from macsupport import *
diff --git a/Mac/Modules/te/TEmodule.c b/Mac/Modules/te/TEmodule.c
index 70891ff..1c7e4f4 100644
--- a/Mac/Modules/te/TEmodule.c
+++ b/Mac/Modules/te/TEmodule.c
@@ -217,7 +217,7 @@ static PyObject *TEObj_TEKey(_self, _args)
{
PyObject *_res = NULL;
CharParameter key;
- if (!PyArg_ParseTuple(_args, "c",
+ if (!PyArg_ParseTuple(_args, "h",
&key))
return NULL;
TEKey(key,
diff --git a/Mac/Modules/te/tescan.py b/Mac/Modules/te/tescan.py
index 8d919e8..0e537ab 100644
--- a/Mac/Modules/te/tescan.py
+++ b/Mac/Modules/te/tescan.py
@@ -1,7 +1,9 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner
from bgenlocations import TOOLBOXDIR
diff --git a/Mac/Modules/waste/wastescan.py b/Mac/Modules/waste/wastescan.py
index ee9fa41..25f8d5d 100644
--- a/Mac/Modules/waste/wastescan.py
+++ b/Mac/Modules/waste/wastescan.py
@@ -1,7 +1,9 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from scantools import Scanner_PreUH3
from bgenlocations import MWERKSDIR, TOOLBOXDIR
diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py
index ae0462f..f15fb16 100644
--- a/Mac/Modules/win/winscan.py
+++ b/Mac/Modules/win/winscan.py
@@ -1,6 +1,8 @@
# Scan an Apple header file, generating a Python file of generator calls.
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
+import sys
+import os
+BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
+sys.path.append(BGENDIR)
from bgenlocations import TOOLBOXDIR
from scantools import Scanner
diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py
index 001a4a4..c7e1f7a 100644
--- a/Mac/Modules/win/winsupport.py
+++ b/Mac/Modules/win/winsupport.py
@@ -5,9 +5,6 @@
import string
-import addpack
-addpack.addpack(':Tools:bgen:bgen')
-
# Declarations that change for each manager
MACHEADERFILE = 'Windows.h' # The Apple header file
MODNAME = 'Win' # The name of the module