summaryrefslogtreecommitdiffstats
path: root/Mac/Tools/twit/mactwit_edit.py
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Tools/twit/mactwit_edit.py')
-rw-r--r--Mac/Tools/twit/mactwit_edit.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/Mac/Tools/twit/mactwit_edit.py b/Mac/Tools/twit/mactwit_edit.py
new file mode 100644
index 0000000..ace253d
--- /dev/null
+++ b/Mac/Tools/twit/mactwit_edit.py
@@ -0,0 +1,24 @@
+"""Edit a file using the MetroWerks editor. Modify to suit your needs"""
+
+import MacOS
+import aetools
+import Metrowerks_Shell_Suite
+import Required_Suite
+
+_talker = None
+
+class MWShell(aetools.TalkTo,
+ Metrowerks_Shell_Suite.Metrowerks_Shell_Suite,
+ Required_Suite.Required_Suite):
+ pass
+
+def edit(file, line):
+ global _talker
+ if _talker == None:
+ _talker = MWShell('CWIE', start=1)
+ try:
+ _talker.open(file)
+ _talker.Goto_Line(line)
+ except "(MacOS.Error, aetools.Error)":
+ pass
+