summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/twit/twit.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-09-26 16:26:05 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-09-26 16:26:05 (GMT)
commita1560cfb294f35e5d295b13f372eac0a5d7f59d7 (patch)
treeb29f27df9e1c6da8a5f0248e9a4a0f0c9387b268 /Mac/Tools/twit/twit.py
parentb1667ef782af47a55d438382e7e63b75f77a1054 (diff)
downloadcpython-a1560cfb294f35e5d295b13f372eac0a5d7f59d7.zip
cpython-a1560cfb294f35e5d295b13f372eac0a5d7f59d7.tar.gz
cpython-a1560cfb294f35e5d295b13f372eac0a5d7f59d7.tar.bz2
- Simplified inheritance structure (still not good enough)
- Added menubar in stead of buttons - (optionally) switch menubar back and forth to facilitate debugging FrameWork applications - Handle "Open Document" appleevent - Fixed click in grow-box location - Allow a new debug session after previous one has finished
Diffstat (limited to 'Mac/Tools/twit/twit.py')
-rw-r--r--Mac/Tools/twit/twit.py51
1 files changed, 4 insertions, 47 deletions
diff --git a/Mac/Tools/twit/twit.py b/Mac/Tools/twit/twit.py
index d12bca2..19d6af1 100644
--- a/Mac/Tools/twit/twit.py
+++ b/Mac/Tools/twit/twit.py
@@ -15,11 +15,7 @@ if os.name == 'mac':
# Not supported in distributed 1.4b3:
## import MacOS
## MacOS.splash(515) # Try to show the splash screen
- import mactwit_mod; twit_mod = mactwit_mod
- import mactwit_stack; twit_stack = mactwit_stack
import mactwit_app; twit_app = mactwit_app
- import mactwit_browser; twit_browser = mactwit_browser
- import mactwit_edit; twit_edit = mactwit_edit
else:
try:
import _tkinter
@@ -27,65 +23,26 @@ else:
except ImportError:
have_tk = 0
if have_tk:
- import tktwit_mod; twit_mod = tktwit_mod
- import tktwit_stack; twit_stack = tktwit_stack
import tktwit_app; twit_app = tktwit_app
else:
- print 'Please implementent twit_mod, twit_stack and twit_app and try again:-)'
+ print 'Please implementent machine-dependent code and try again:-)'
sys.exit(1)
-import TwitCore
import sys
-
-class Twit(twit_app.Application, TwitCore.Application):
-
- def new_module_browser(self, *args):
- return apply(TWIT_ModuleBrowser, args)
-
- def new_stack_browser(self, *args):
- return apply(TWIT_StackBrowser, args)
-
- def new_var_browser(self, *args):
- return apply(TWIT_VarBrowser, args)
-
- def edit(self, *args):
- return apply(twit_edit.edit, args)
-
-class TWIT_ModuleBrowser(twit_mod.ModuleBrowser, TwitCore.ModuleBrowser):
- pass
-
-class TWIT_StackBrowser(twit_stack.StackBrowser, TwitCore.StackBrowser):
- pass
-
-def TWIT_VarBrowser(parent, var):
- return twit_browser.VarBrowser(parent).open(var)
-
-def Initialize():
- # Gross...
- TwitCore.AskString = twit_app.AskString
- TwitCore.ShowMessage = twit_app.ShowMessage
- TwitCore.SetWatch = twit_app.SetWatch
- TwitCore.SetCursor = twit_app.SetCursor
def main():
twit_app.Initialize()
- TwitCore.Initialize()
- Initialize()
## if os.name == 'mac':
## MacOS.splash()
- Twit(None, None)
+ twit_app.Twit('none', None)
def run(statement, globals=None, locals=None):
twit_app.Initialize()
- TwitCore.Initialize()
- Initialize()
- Twit((statement, globals, locals), None)
+ twit_app.Twit('run', (statement, globals, locals))
def post_mortem(t):
- twit_app.Initialize()
- TwitCore.Initialize()
Initialize()
- Twit(None, t)
+ twit_app.Twit('pm', t)
def pm():
post_mortem(sys.last_traceback)