diff options
Diffstat (limited to 'Mac')
-rw-r--r-- | Mac/Tools/IDE/ModuleBrowser.py | 12 | ||||
-rw-r--r-- | Mac/Tools/IDE/PyBrowser.py | 4 | ||||
-rw-r--r-- | Mac/Tools/IDE/PyConsole.py | 6 | ||||
-rw-r--r-- | Mac/Tools/IDE/PyDebugger.py | 16 | ||||
-rw-r--r-- | Mac/Tools/IDE/PyDocSearch.py | 2 | ||||
-rw-r--r-- | Mac/Tools/IDE/PyEdit.py | 32 | ||||
-rw-r--r-- | Mac/Tools/IDE/PythonIDEMain.py | 18 | ||||
-rw-r--r-- | Mac/Tools/IDE/Splash.py | 8 | ||||
-rw-r--r-- | Mac/Tools/IDE/Wapplication.py | 8 | ||||
-rw-r--r-- | Mac/Tools/IDE/Wtext.py | 2 | ||||
-rw-r--r-- | Mac/Tools/IDE/Wtraceback.py | 6 | ||||
-rw-r--r-- | Mac/Tools/IDE/Wwindows.py | 2 |
12 files changed, 58 insertions, 58 deletions
diff --git a/Mac/Tools/IDE/ModuleBrowser.py b/Mac/Tools/IDE/ModuleBrowser.py index d515901..454c099 100644 --- a/Mac/Tools/IDE/ModuleBrowser.py +++ b/Mac/Tools/IDE/ModuleBrowser.py @@ -14,9 +14,9 @@ class _modulebrowser: #self.window.bevelbox = W.BevelBox((0, 0, 0, 56)) self.window.openbutton = W.Button((10, 8, 80, 16), "Open", self.openbuttonhit) - self.window.browsebutton = W.Button((100, 8, 80, 16), "Browse", self.browsebuttonhit) + self.window.browsebutton = W.Button((100, 8, 80, 16), "Browse", self.browsebuttonhit) self.window.reloadbutton = W.Button((10, 32, 80, 16), "Reload", self.reloadbuttonhit) - self.window.openotherbutton = W.Button((100, 32, 80, 16), "Open other", self.openother) + self.window.openotherbutton = W.Button((100, 32, 80, 16), "Open other", self.openother) self.window.openbutton.enable(0) self.window.reloadbutton.enable(0) @@ -81,7 +81,7 @@ class _modulebrowser: file, path, description = imp.find_module(modname) except ImportError: W.SetCursor("arrow") - W.Message("Cant find file for module %s." + W.Message("Cant find file for module %s." % modname) else: self.openscript(path, modname) @@ -93,7 +93,7 @@ class _modulebrowser: elif path[-4:] in ['.pyc', '.pyo']: W.getapplication().openscript(path[:-1], modname=modname) else: - W.Message("Cant edit %s; it might be a shared library or a .pyc file." + W.Message("Cant edit %s; it might be a shared library or a .pyc file." % modname) def openother(self): @@ -106,9 +106,9 @@ class _modulebrowser: file, path, description = imp.find_module(modname) except ImportError: if modname in sys.builtin_module_names: - alerttext = "%s is a builtin module, which you cant edit." % modname + alerttext = "%s is a builtin module, which you cant edit." % modname else: - alerttext = "No module named %s." % modname + alerttext = "No module named %s." % modname raise W.AlertError, alerttext self.openscript(path, modname) diff --git a/Mac/Tools/IDE/PyBrowser.py b/Mac/Tools/IDE/PyBrowser.py index d62d256..31e6c86 100644 --- a/Mac/Tools/IDE/PyBrowser.py +++ b/Mac/Tools/IDE/PyBrowser.py @@ -36,7 +36,7 @@ def double_repr(key, value, truncvalue = 0, value = _repr(value) '' + value # test to see if it is a string, in case a __repr__ method is buggy except: - value = ' exception in repr()' + value = ' exception in repr()' if truncvalue: return key + '\t' + value[:255] return key + '\t' + value @@ -358,7 +358,7 @@ INDEXING_TYPES = ( def unpack_object(object, indent = 0): tp = type(object) if tp in SIMPLE_TYPES and tp is not types.NoneType: - raise TypeError, 'cant browse simple type: %s' % tp.__name__ + raise TypeError, 'cant browse simple type: %s' % tp.__name__ elif tp == types.DictionaryType: return unpack_dict(object, indent) elif tp in (types.TupleType, types.ListType): diff --git a/Mac/Tools/IDE/PyConsole.py b/Mac/Tools/IDE/PyConsole.py index ad71982..0dbea77 100644 --- a/Mac/Tools/IDE/PyConsole.py +++ b/Mac/Tools/IDE/PyConsole.py @@ -156,8 +156,8 @@ class PyConsole(W.Window): def makenamespacemenu(self, *args): W.SetCursor('watch') namespacelist = self.getnamespacelist() - self.namespacemenu.set([("Clear window", self.clearbuffer), ("Font settings", self.dofontsettings), - ["Namespace"] + namespacelist, ("Browse namespace", self.browsenamespace)]) + self.namespacemenu.set([("Clear window", self.clearbuffer), ("Font settings", self.dofontsettings), + ["Namespace"] + namespacelist, ("Browse namespace", self.browsenamespace)]) currentname = self.consoletext._namespace["__name__"] for i in range(len(namespacelist)): if namespacelist[i][0] == currentname: @@ -264,7 +264,7 @@ class PyOutput: tabbable = 0) self.w.outputtext = OutputTextWidget((-1, -1, -14, 1), inset = (6, 5), fontsettings = self.fontsettings, tabsettings = self.tabsettings, readonly = 1) - menuitems = [("Clear window", self.clearbuffer), ("Font settings", self.dofontsettings)] + menuitems = [("Clear window", self.clearbuffer), ("Font settings", self.dofontsettings)] self.w.popupmenu = W.PopupMenu((-15, -1, 16, 16), menuitems) self.w._bary = W.Scrollbar((-15, 14, 16, -14), self.w.outputtext.vscroll, max = 32767) diff --git a/Mac/Tools/IDE/PyDebugger.py b/Mac/Tools/IDE/PyDebugger.py index b0d4fb4..48d6ff8 100644 --- a/Mac/Tools/IDE/PyDebugger.py +++ b/Mac/Tools/IDE/PyDebugger.py @@ -72,7 +72,7 @@ class Debugger(bdb.Bdb): self.botframe = bottomframe if running: self.set_continue() - self.reason = 'Running' + self.reason = 'Running' self.setstate('running') else: self.set_step() @@ -187,7 +187,7 @@ class Debugger(bdb.Bdb): def makeoptionsmenu(self): options = [('Clear breakpoints', self.w.panes.bottom.src.source.clearbreakpoints), ('Clear all breakpoints', self.clear_all_breaks), - ('Edit breakpoints', self.edit_breaks), '-', + ('Edit breakpoints', self.edit_breaks), '-', (self.tracemagic and 'Disable __magic__ tracing' or 'Enable __magic__ tracing', self.togglemagic)] self.w.panes.bottom.src.optionsmenu.set(options) @@ -318,7 +318,7 @@ class Debugger(bdb.Bdb): def running(self): W.SetCursor('watch') - self.reason = 'Running' + self.reason = 'Running' self.setstate('running') #self.w.panes.bottom.src.source.set('') #self.w.panes.browserpanes.stacklist.stack.set([]) @@ -350,7 +350,7 @@ class Debugger(bdb.Bdb): try: f, filename, (suff, mode, dummy) = imp.find_module(modname) except ImportError: - self.w.panes.bottom.src.source.set('cant find file') + self.w.panes.bottom.src.source.set('cant find file') else: if f: f.close() @@ -360,9 +360,9 @@ class Debugger(bdb.Bdb): f.close() self.w.panes.bottom.src.source.set(data, filename) else: - self.w.panes.bottom.src.source.set('cant find file') + self.w.panes.bottom.src.source.set('cant find file') else: - self.w.panes.bottom.src.source.set('cant find file') + self.w.panes.bottom.src.source.set('cant find file') else: self.w.panes.bottom.src.source.set(data, filename) self.file = filename @@ -682,7 +682,7 @@ class BreakpointsViewer: self.w.panes.files = W.List(None, callback = self.filehit) #, flags = Lists.lOnlyOne) self.w.panes.gr = W.Group(None) self.w.panes.gr.breaks = W.List((0, 0, -130, 0), callback = self.linehit) #, flags = Lists.lOnlyOne) - self.w.panes.gr.openbutton = W.Button((-80, 4, 0, 16), 'View', self.openbuttonhit) + self.w.panes.gr.openbutton = W.Button((-80, 4, 0, 16), 'View', self.openbuttonhit) self.w.panes.gr.deletebutton = W.Button((-80, 28, 0, 16), 'Delete', self.deletebuttonhit) self.w.bind('<close>', self.close) @@ -880,7 +880,7 @@ _debugger = None def getdebugger(): if not __debug__: - raise W.AlertError, "Cant debug in Optimize bytecode mode.\r(see Default startup options in EditPythonPreferences)" + raise W.AlertError, "Cant debug in Optimize bytecode mode.\r(see Default startup options in EditPythonPreferences)" global _debugger if _debugger is None: _debugger = Debugger() diff --git a/Mac/Tools/IDE/PyDocSearch.py b/Mac/Tools/IDE/PyDocSearch.py index cd0fdce..f975026 100644 --- a/Mac/Tools/IDE/PyDocSearch.py +++ b/Mac/Tools/IDE/PyDocSearch.py @@ -101,7 +101,7 @@ class Results: class Status: def __init__(self): - self.w = W.Dialog((440, 64), "Searching") + self.w = W.Dialog((440, 64), "Searching") self.w.searching = W.TextBox((4, 4, -4, 16), "DevDev:PyPyDoc 1.5.1:ext:parseTupleAndKeywords.html") self.w.hits = W.TextBox((4, 24, -4, 16), "Hits: 0") self.w.canceltip = W.TextBox((4, 44, -4, 16), "Type cmd-period (.) to cancel.") diff --git a/Mac/Tools/IDE/PyEdit.py b/Mac/Tools/IDE/PyEdit.py index 8536b94..80397a1 100644 --- a/Mac/Tools/IDE/PyEdit.py +++ b/Mac/Tools/IDE/PyEdit.py @@ -185,10 +185,10 @@ class Editor(W.Window): self.linefield.bind("<click>", self.clicklinefield) def makeoptionsmenu(self): - menuitems = [('Font settings', self.domenu_fontsettings), + menuitems = [('Font settings', self.domenu_fontsettings), ('\0' + chr(self.run_as_main) + 'Run as __main__', self.domenu_toggle_run_as_main), ('Modularize', self.domenu_modularize), - ('Browse namespace', self.domenu_browsenamespace), + ('Browse namespace', self.domenu_browsenamespace), '-'] if self.profiling: menuitems = menuitems + [('Disable profiler', self.domenu_toggleprofiler)] @@ -197,7 +197,7 @@ class Editor(W.Window): if self.editgroup.editor._debugger: menuitems = menuitems + [('Disable debugger', self.domenu_toggledebugger), ('Clear breakpoints', self.domenu_clearbreakpoints), - ('Edit breakpoints', self.domenu_editbreakpoints)] + ('Edit breakpoints', self.domenu_editbreakpoints)] else: menuitems = menuitems + [('Enable debugger', self.domenu_toggledebugger)] self.editgroup.optionsmenu.set(menuitems) @@ -236,7 +236,7 @@ class Editor(W.Window): def domenu_modularize(self, *args): modname = _filename_as_modname(self.title) if not modname: - raise W.AlertError, 'Cant modularize %s' % self.title + raise W.AlertError, 'Cant modularize %s' % self.title run_as_main = self.run_as_main self.run_as_main = 0 self.run() @@ -305,7 +305,7 @@ class Editor(W.Window): import EasyDialogs import Qd Qd.InitCursor() # XXX should be done by dialog - save = EasyDialogs.AskYesNoCancel('Save window %s before closing?' % self.title, 1) + save = EasyDialogs.AskYesNoCancel('Save window %s before closing?' % self.title, 1) if save > 0: if self.domenu_save(): return 1 @@ -365,7 +365,7 @@ class Editor(W.Window): import buildtools except ImportError: # only have buildtools in Python >= 1.5.2 - raise W.AlertError, "Save as Applet is only supported in\rPython 1.5.2 and up." + raise W.AlertError, "Save as Applet is only supported in\rPython 1.5.2 and up." buildtools.DEBUG = 0 # ouch. @@ -468,23 +468,23 @@ class Editor(W.Window): classname = string.split(string.strip(line[6:]))[0] classend = identifieRE_match(classname) if classend < 1: - raise W.AlertError, 'Cant find a class.' + raise W.AlertError, 'Cant find a class.' classname = classname[:classend] break elif line and line[0] not in '\t#': - raise W.AlertError, 'Cant find a class.' + raise W.AlertError, 'Cant find a class.' else: - raise W.AlertError, 'Cant find a class.' + raise W.AlertError, 'Cant find a class.' if globals.has_key(classname): locals = globals[classname].__dict__ else: - raise W.AlertError, 'Cant find class %s.' % classname + raise W.AlertError, 'Cant find class %s.' % classname # dedent to top level for i in range(len(lines)): lines[i] = lines[i][1:] pytext = string.join(lines, '\r') elif indent > 0: - raise W.AlertError, 'Cant run indented code.' + raise W.AlertError, 'Cant run indented code.' # add "newlines" to fool compile/exec: # now a traceback will give the right line number @@ -674,7 +674,7 @@ class SearchEngine: self.buttons = [ ("Find", "cmdf", self.find), ("Replace", "cmdr", self.replace), ("Replace all", None, self.replaceall), - ("Dont find", "cmdd", self.dont), + ("Dont find", "cmdd", self.dont), ("Cancel", "cmd.", self.cancel) ] for i in range(len(self.buttons)): @@ -683,7 +683,7 @@ class SearchEngine: self.w[title] = W.Button(bounds, title, callback) if shortcut: self.w.bind(shortcut, self.w[title].push) - self.w.setdefaultbutton(self.w["Dont find"]) + self.w.setdefaultbutton(self.w["Dont find"]) self.w.find.edit.bind("<key>", self.key) self.w.bind("<activate>", self.activate) self.w.bind("<close>", self.close) @@ -716,11 +716,11 @@ class SearchEngine: else: for title, cmd, call in self.buttons[:-2]: self.w[title].enable(0) - self.w.setdefaultbutton(self.w["Dont find"]) + self.w.setdefaultbutton(self.w["Dont find"]) else: for title, cmd, call in self.buttons[:-2]: self.w[title].enable(0) - self.w.setdefaultbutton(self.w["Dont find"]) + self.w.setdefaultbutton(self.w["Dont find"]) def find(self): self.getparmsfromwindow() @@ -1019,7 +1019,7 @@ class _EditorDefaultSettings: self.template = "%s, %d point" self.fontsettings, self.tabsettings, self.windowsize = geteditorprefs() self.w = W.Dialog((328, 120), "Editor default settings") - self.w.setfontbutton = W.Button((8, 8, 80, 16), "Set font", self.dofont) + self.w.setfontbutton = W.Button((8, 8, 80, 16), "Set font", self.dofont) self.w.fonttext = W.TextBox((98, 10, -8, 14), self.template % (self.fontsettings[0], self.fontsettings[2])) self.w.picksizebutton = W.Button((8, 50, 80, 16), "Front window", self.picksize) diff --git a/Mac/Tools/IDE/PythonIDEMain.py b/Mac/Tools/IDE/PythonIDEMain.py index b6f637b..545c09b 100644 --- a/Mac/Tools/IDE/PythonIDEMain.py +++ b/Mac/Tools/IDE/PythonIDEMain.py @@ -38,13 +38,13 @@ class PythonIDE(Wapplication.Application): def makeusermenus(self): m = Wapplication.Menu(self.menubar, "File") newitem = FrameWork.MenuItem(m, "New", "N", 'new') - openitem = FrameWork.MenuItem(m, "Open", "O", 'open') + openitem = FrameWork.MenuItem(m, "Open", "O", 'open') FrameWork.Separator(m) closeitem = FrameWork.MenuItem(m, "Close", "W", 'close') saveitem = FrameWork.MenuItem(m, "Save", "S", 'save') - saveasitem = FrameWork.MenuItem(m, "Save as", None, 'save_as') + saveasitem = FrameWork.MenuItem(m, "Save as", None, 'save_as') FrameWork.Separator(m) - saveasappletitem = FrameWork.MenuItem(m, "Save as Applet", None, 'save_as_applet') + saveasappletitem = FrameWork.MenuItem(m, "Save as Applet", None, 'save_as_applet') FrameWork.Separator(m) quititem = FrameWork.MenuItem(m, "Quit", "Q", 'quit') @@ -59,7 +59,7 @@ class PythonIDE(Wapplication.Application): selallitem = FrameWork.MenuItem(m, "Select all", "A", "selectall") sellineitem = FrameWork.MenuItem(m, "Select line", "L", "selectline") FrameWork.Separator(m) - finditem = FrameWork.MenuItem(m, "Find", "F", "find") + finditem = FrameWork.MenuItem(m, "Find", "F", "find") findagainitem = FrameWork.MenuItem(m, "Find again", 'G', "findnext") enterselitem = FrameWork.MenuItem(m, "Enter search string", "E", "entersearchstring") replaceitem = FrameWork.MenuItem(m, "Replace", None, "replace") @@ -72,11 +72,11 @@ class PythonIDE(Wapplication.Application): runitem = FrameWork.MenuItem(m, "Run window", "R", 'run') runselitem = FrameWork.MenuItem(m, "Run selection", None, 'runselection') FrameWork.Separator(m) - moditem = FrameWork.MenuItem(m, "Module browser", "M", self.domenu_modulebrowser) + moditem = FrameWork.MenuItem(m, "Module browser", "M", self.domenu_modulebrowser) FrameWork.Separator(m) mm = FrameWork.SubMenu(m, "Preferences") - FrameWork.MenuItem(mm, "Set Scripts folder", None, self.do_setscriptsfolder) - FrameWork.MenuItem(mm, "Editor default settings", None, self.do_editorprefs) + FrameWork.MenuItem(mm, "Set Scripts folder", None, self.do_setscriptsfolder) + FrameWork.MenuItem(mm, "Editor default settings", None, self.do_editorprefs) self.openwindowsmenu = Wapplication.Menu(self.menubar, 'Windows') self.makeopenwindowsmenu() @@ -139,10 +139,10 @@ class PythonIDE(Wapplication.Application): if ftype == 'TEXT': self.openscript(path) else: - W.Message("Cant open file of type '%s'." % ftype) + W.Message("Cant open file of type '%s'." % ftype) def getabouttext(self): - return "About Python IDE" + return "About Python IDE" def do_about(self, id, item, window, event): Splash.about() diff --git a/Mac/Tools/IDE/Splash.py b/Mac/Tools/IDE/Splash.py index 19f16fc..d1973b4 100644 --- a/Mac/Tools/IDE/Splash.py +++ b/Mac/Tools/IDE/Splash.py @@ -70,7 +70,7 @@ import sys _keepsplashscreenopen = 0 -abouttext1 = """The Python Integrated Developement Environment for the Macintosh +abouttext1 = """The Python Integrated Developement Environment for the Macintosh Version: %s Copyright 1997-98 Just van Rossum, Letterror. <just@letterror.com> @@ -81,11 +81,11 @@ Written by Guido van Rossum with Jack Jansen (and others) See: <http://www.python.org/> for information and documentation.""" flauwekul = [ 'Goodday, Bruce.', - 'Whats new?', + 'Whats new?', 'Nudge, nudge, say no more!', - 'No, no sir, its not dead. Its resting.', + 'No, no sir, its not dead. Its resting.', 'Albatros!', - 'Its . . .', + 'Its . . .', 'Is your name not Bruce, then?', """But Mr F.G. Superman has a secret identity . . . when trouble strikes at any time . . . diff --git a/Mac/Tools/IDE/Wapplication.py b/Mac/Tools/IDE/Wapplication.py index 8db9a1a..10ac3f1 100644 --- a/Mac/Tools/IDE/Wapplication.py +++ b/Mac/Tools/IDE/Wapplication.py @@ -323,18 +323,18 @@ class Application(FrameWork.Application): # XXX and that's the last thing we want here. f, filename, (suff, mode, dummy) = imp.find_module(modname) except ImportError: - raise W.AlertError, "Cant find file for %s" % modname + raise W.AlertError, "Cant find file for %s" % modname else: if not f: - raise W.AlertError, "Cant find file for %s" % modname + raise W.AlertError, "Cant find file for %s" % modname f.close() if suff == '.py': self.openscript(filename, lineno, charoffset) return else: - raise W.AlertError, "Cant find file for %s" % modname + raise W.AlertError, "Cant find file for %s" % modname else: - raise W.AlertError, "Cant find file %s" % filename + raise W.AlertError, "Cant find file %s" % filename if lineno is not None: editor.selectline(lineno, charoffset) return editor diff --git a/Mac/Tools/IDE/Wtext.py b/Mac/Tools/IDE/Wtext.py index 821e4c5..b3fb66c 100644 --- a/Mac/Tools/IDE/Wtext.py +++ b/Mac/Tools/IDE/Wtext.py @@ -862,7 +862,7 @@ class PyEditor(TextEditor): if onoff: if not __debug__: import W - raise W.AlertError, "Cant debug in Optimize bytecode mode.\r(see Default startup options in EditPythonPreferences)" + raise W.AlertError, "Cant debug in Optimize bytecode mode.\r(see Default startup options in EditPythonPreferences)" import PyDebugger self._debugger = PyDebugger.getdebugger() self._debugger.register_editor(self, self.file) diff --git a/Mac/Tools/IDE/Wtraceback.py b/Mac/Tools/IDE/Wtraceback.py index 82e487f..1d7b7ba 100644 --- a/Mac/Tools/IDE/Wtraceback.py +++ b/Mac/Tools/IDE/Wtraceback.py @@ -57,7 +57,7 @@ class TraceBack: filename = os.path.split(filename)[1] if lineno: charno = charno - 1 - text = str(value) + '\rFile: "' + str(filename) + '", line ' + str(lineno) + '\r\r' + line[:charno] + "" + line[charno:-1] + text = str(value) + '\rFile: "' + str(filename) + '", line ' + str(lineno) + '\r\r' + line[:charno] + "" + line[charno:-1] else: text = str(value) + '\rFile: "' + str(filename) + '"' self.syntaxdialog = W.ModalDialog((360, 120), "Syntax Error") @@ -123,10 +123,10 @@ class TraceBack: self.w.editbutton = W.Button((10, -30, 60, 16), "Edit", self.edit) self.w.editbutton.enable(0) - self.w.browselocalsbutton = W.Button((80, -30, 100, 16), "Browse locals", self.browselocals) + self.w.browselocalsbutton = W.Button((80, -30, 100, 16), "Browse locals", self.browselocals) self.w.browselocalsbutton.enable(0) - self.w.postmortembutton = W.Button((190, -30, 100, 16), "Post mortem", self.postmortem) + self.w.postmortembutton = W.Button((190, -30, 100, 16), "Post mortem", self.postmortem) self.w.setdefaultbutton(self.w.editbutton) self.w.bind("cmdb", self.w.browselocalsbutton.push) diff --git a/Mac/Tools/IDE/Wwindows.py b/Mac/Tools/IDE/Wwindows.py index 4c16794..99a5fc8 100644 --- a/Mac/Tools/IDE/Wwindows.py +++ b/Mac/Tools/IDE/Wwindows.py @@ -556,7 +556,7 @@ def FrontWindowInsert(stuff): pass import EasyDialogs if EasyDialogs.AskYesNoCancel( - "Cant find window or widget to insert text into; copy to clipboard instead?", + "Cant find window or widget to insert text into; copy to clipboard instead?", 1) == 1: import Scrap Scrap.ZeroScrap() |