diff options
Diffstat (limited to 'Lib/idlelib')
35 files changed, 120 insertions, 119 deletions
diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py index 183a178..b187741 100644 --- a/Lib/idlelib/AutoComplete.py +++ b/Lib/idlelib/AutoComplete.py @@ -7,7 +7,7 @@ import os import sys import string -from .configHandler import idleConf +from idlelib.configHandler import idleConf # This string includes all chars that may be in a file name (without a path # separator) @@ -18,8 +18,8 @@ ID_CHARS = string.ascii_letters + string.digits + "_" # These constants represent the two different types of completions COMPLETE_ATTRIBUTES, COMPLETE_FILES = range(1, 2+1) -from . import AutoCompleteWindow -from .HyperParser import HyperParser +from idlelib import AutoCompleteWindow +from idlelib.HyperParser import HyperParser import __main__ diff --git a/Lib/idlelib/AutoCompleteWindow.py b/Lib/idlelib/AutoCompleteWindow.py index 368b42d..785979e 100644 --- a/Lib/idlelib/AutoCompleteWindow.py +++ b/Lib/idlelib/AutoCompleteWindow.py @@ -2,8 +2,8 @@ An auto-completion window for IDLE, used by the AutoComplete extension """ from Tkinter import * -from .MultiCall import MC_SHIFT -from .AutoComplete import COMPLETE_FILES, COMPLETE_ATTRIBUTES +from idlelib.MultiCall import MC_SHIFT +from idlelib.AutoComplete import COMPLETE_FILES, COMPLETE_ATTRIBUTES HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>" HIDE_SEQUENCES = ("<FocusOut>", "<ButtonPress>") diff --git a/Lib/idlelib/Bindings.py b/Lib/idlelib/Bindings.py index 26f4497..13e2a33 100644 --- a/Lib/idlelib/Bindings.py +++ b/Lib/idlelib/Bindings.py @@ -9,7 +9,7 @@ windows. """ import sys -from .configHandler import idleConf +from idlelib.configHandler import idleConf menudefs = [ # underscore prefixes character to underscore diff --git a/Lib/idlelib/CallTips.py b/Lib/idlelib/CallTips.py index 134491d..606ab8e 100644 --- a/Lib/idlelib/CallTips.py +++ b/Lib/idlelib/CallTips.py @@ -9,8 +9,8 @@ import re import sys import types -from . import CallTipWindow -from .HyperParser import HyperParser +from idlelib import CallTipWindow +from idlelib.HyperParser import HyperParser import __main__ diff --git a/Lib/idlelib/ClassBrowser.py b/Lib/idlelib/ClassBrowser.py index edda0ed..71176cd 100644 --- a/Lib/idlelib/ClassBrowser.py +++ b/Lib/idlelib/ClassBrowser.py @@ -14,10 +14,10 @@ import os import sys import pyclbr -from . import PyShell -from .WindowList import ListedToplevel -from .TreeWidget import TreeNode, TreeItem, ScrolledCanvas -from .configHandler import idleConf +from idlelib import PyShell +from idlelib.WindowList import ListedToplevel +from idlelib.TreeWidget import TreeNode, TreeItem, ScrolledCanvas +from idlelib.configHandler import idleConf class ClassBrowser: diff --git a/Lib/idlelib/CodeContext.py b/Lib/idlelib/CodeContext.py index 065be0f..edeb099 100644 --- a/Lib/idlelib/CodeContext.py +++ b/Lib/idlelib/CodeContext.py @@ -13,7 +13,7 @@ import Tkinter from Tkconstants import TOP, LEFT, X, W, SUNKEN import re from sys import maxint as INFINITY -from .configHandler import idleConf +from idlelib.configHandler import idleConf BLOCKOPENERS = set(["class", "def", "elif", "else", "except", "finally", "for", "if", "try", "while", "with"]) diff --git a/Lib/idlelib/ColorDelegator.py b/Lib/idlelib/ColorDelegator.py index 2b1c870..cc20c1e 100644 --- a/Lib/idlelib/ColorDelegator.py +++ b/Lib/idlelib/ColorDelegator.py @@ -3,8 +3,8 @@ import re import keyword import __builtin__ from Tkinter import * -from .Delegator import Delegator -from .configHandler import idleConf +from idlelib.Delegator import Delegator +from idlelib.configHandler import idleConf DEBUG = False @@ -248,7 +248,7 @@ class ColorDelegator(Delegator): self.tag_remove(tag, "1.0", "end") def main(): - from .Percolator import Percolator + from idlelib.Percolator import Percolator root = Tk() root.wm_protocol("WM_DELETE_WINDOW", root.quit) text = Text(background="white") diff --git a/Lib/idlelib/Debugger.py b/Lib/idlelib/Debugger.py index dbb1a7d..3c16b5a 100644 --- a/Lib/idlelib/Debugger.py +++ b/Lib/idlelib/Debugger.py @@ -2,9 +2,9 @@ import os import bdb import types from Tkinter import * -from .WindowList import ListedToplevel -from .ScrolledList import ScrolledList -from . import macosxSupport +from idlelib.WindowList import ListedToplevel +from idlelib.ScrolledList import ScrolledList +from idlelib import macosxSupport class Idb(bdb.Bdb): diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 27ff6e1..2d11f90 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -10,16 +10,16 @@ import tkMessageBox import traceback import webbrowser -from .MultiCall import MultiCallCreator -from . import idlever -from . import WindowList -from . import SearchDialog -from . import GrepDialog -from . import ReplaceDialog -from . import PyParse -from .configHandler import idleConf -from . import aboutDialog, textView, configDialog -from . import macosxSupport +from idlelib.MultiCall import MultiCallCreator +from idlelib import idlever +from idlelib import WindowList +from idlelib import SearchDialog +from idlelib import GrepDialog +from idlelib import ReplaceDialog +from idlelib import PyParse +from idlelib.configHandler import idleConf +from idlelib import aboutDialog, textView, configDialog +from idlelib import macosxSupport # The default tab setting for a Text widget, in average-width characters. TK_TABWIDTH_DEFAULT = 8 @@ -42,13 +42,13 @@ def _find_module(fullname, path=None): return file, filename, descr class EditorWindow(object): - from .Percolator import Percolator - from .ColorDelegator import ColorDelegator - from .UndoDelegator import UndoDelegator - from .IOBinding import IOBinding, filesystemencoding, encoding - from . import Bindings + from idlelib.Percolator import Percolator + from idlelib.ColorDelegator import ColorDelegator + from idlelib.UndoDelegator import UndoDelegator + from idlelib.IOBinding import IOBinding, filesystemencoding, encoding + from idlelib import Bindings from Tkinter import Toplevel - from .MultiStatusBar import MultiStatusBar + from idlelib.MultiStatusBar import MultiStatusBar help_url = None @@ -532,11 +532,11 @@ class EditorWindow(object): return None head, tail = os.path.split(filename) base, ext = os.path.splitext(tail) - from . import ClassBrowser + from idlelib import ClassBrowser ClassBrowser.ClassBrowser(self.flist, base, [head]) def open_path_browser(self, event=None): - from . import PathBrowser + from idlelib import PathBrowser PathBrowser.PathBrowser(self.flist) def gotoline(self, lineno): diff --git a/Lib/idlelib/FileList.py b/Lib/idlelib/FileList.py index 7e1d919..52b3eeb 100644 --- a/Lib/idlelib/FileList.py +++ b/Lib/idlelib/FileList.py @@ -5,8 +5,8 @@ import tkMessageBox class FileList: - from .EditorWindow import EditorWindow # class variable, may be overridden - # e.g. by PyShellFileList + # N.B. this import overridden in PyShellFileList. + from idlelib.EditorWindow import EditorWindow def __init__(self, root): self.root = root @@ -106,7 +106,7 @@ class FileList: def _test(): - from .EditorWindow import fixwordbreaks + from idlelib.EditorWindow import fixwordbreaks import sys root = Tk() fixwordbreaks(root) diff --git a/Lib/idlelib/FormatParagraph.py b/Lib/idlelib/FormatParagraph.py index 57868f1..9b4b3cb 100644 --- a/Lib/idlelib/FormatParagraph.py +++ b/Lib/idlelib/FormatParagraph.py @@ -15,7 +15,7 @@ # * Fancy comments, like this bulleted list, arent handled :-) import re -from .configHandler import idleConf +from idlelib.configHandler import idleConf class FormatParagraph: diff --git a/Lib/idlelib/GrepDialog.py b/Lib/idlelib/GrepDialog.py index 8c28c9a..51affef 100644 --- a/Lib/idlelib/GrepDialog.py +++ b/Lib/idlelib/GrepDialog.py @@ -2,8 +2,8 @@ import os import fnmatch import sys from Tkinter import * -from . import SearchEngine -from .SearchDialogBase import SearchDialogBase +from idlelib import SearchEngine +from idlelib.SearchDialogBase import SearchDialogBase def grep(text, io=None, flist=None): root = text._root() @@ -63,7 +63,7 @@ class GrepDialog(SearchDialogBase): if not path: self.top.bell() return - from .OutputWindow import OutputWindow + from idlelib.OutputWindow import OutputWindow save = sys.stdout try: sys.stdout = OutputWindow(self.flist) diff --git a/Lib/idlelib/HyperParser.py b/Lib/idlelib/HyperParser.py index 409e3c4..38a19f2 100644 --- a/Lib/idlelib/HyperParser.py +++ b/Lib/idlelib/HyperParser.py @@ -10,7 +10,7 @@ structure of code, used by extensions to help the user. import string import keyword -from . import PyParse +from idlelib import PyParse class HyperParser: diff --git a/Lib/idlelib/IdleHistory.py b/Lib/idlelib/IdleHistory.py index 8766ade..983a140 100644 --- a/Lib/idlelib/IdleHistory.py +++ b/Lib/idlelib/IdleHistory.py @@ -1,4 +1,4 @@ -from .configHandler import idleConf +from idlelib.configHandler import idleConf class History: diff --git a/Lib/idlelib/ObjectBrowser.py b/Lib/idlelib/ObjectBrowser.py index ad31c23..c98a8b6 100644 --- a/Lib/idlelib/ObjectBrowser.py +++ b/Lib/idlelib/ObjectBrowser.py @@ -9,7 +9,7 @@ # XXX TO DO: # - for classes/modules, add "open source" to object browser -from .TreeWidget import TreeItem, TreeNode, ScrolledCanvas +from idlelib.TreeWidget import TreeItem, TreeNode, ScrolledCanvas from repr import Repr diff --git a/Lib/idlelib/OutputWindow.py b/Lib/idlelib/OutputWindow.py index 330da76..ac1361b 100644 --- a/Lib/idlelib/OutputWindow.py +++ b/Lib/idlelib/OutputWindow.py @@ -1,8 +1,8 @@ from Tkinter import * -from .EditorWindow import EditorWindow +from idlelib.EditorWindow import EditorWindow import re import tkMessageBox -from . import IOBinding +from idlelib import IOBinding class OutputWindow(EditorWindow): diff --git a/Lib/idlelib/ParenMatch.py b/Lib/idlelib/ParenMatch.py index 6f56827..6d91b39 100644 --- a/Lib/idlelib/ParenMatch.py +++ b/Lib/idlelib/ParenMatch.py @@ -5,8 +5,8 @@ paren. Paren here is used generically; the matching applies to parentheses, square brackets, and curly braces. """ -from .HyperParser import HyperParser -from .configHandler import idleConf +from idlelib.HyperParser import HyperParser +from idlelib.configHandler import idleConf _openers = {')':'(',']':'[','}':'{'} CHECK_DELAY = 100 # miliseconds diff --git a/Lib/idlelib/PathBrowser.py b/Lib/idlelib/PathBrowser.py index 65efb48..d88a48e 100644 --- a/Lib/idlelib/PathBrowser.py +++ b/Lib/idlelib/PathBrowser.py @@ -2,8 +2,8 @@ import os import sys import imp -from .TreeWidget import TreeItem -from .ClassBrowser import ClassBrowser, ModuleBrowserTreeItem +from idlelib.TreeWidget import TreeItem +from idlelib.ClassBrowser import ClassBrowser, ModuleBrowserTreeItem class PathBrowser(ClassBrowser): @@ -86,7 +86,7 @@ class DirBrowserTreeItem(TreeItem): return sorted def main(): - from . import PyShell + from idlelib import PyShell PathBrowser(PyShell.flist) if sys.stdin is sys.__stdin__: mainloop() diff --git a/Lib/idlelib/Percolator.py b/Lib/idlelib/Percolator.py index dc28835..80140d0 100644 --- a/Lib/idlelib/Percolator.py +++ b/Lib/idlelib/Percolator.py @@ -1,5 +1,5 @@ -from .WidgetRedirector import WidgetRedirector -from .Delegator import Delegator +from idlelib.WidgetRedirector import WidgetRedirector +from idlelib.Delegator import Delegator class Percolator: diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index 1cfc330..7616db4 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -18,21 +18,21 @@ try: from Tkinter import * except ImportError: print("** IDLE can't import Tkinter. " \ - "Your Python may not be configured for Tk. **", file=sys.__stderr__) + "Your Python may not be configured for Tk. **", file=sys.__stderr__) sys.exit(1) import tkMessageBox -from .EditorWindow import EditorWindow, fixwordbreaks -from .FileList import FileList -from .ColorDelegator import ColorDelegator -from .UndoDelegator import UndoDelegator -from .OutputWindow import OutputWindow -from .configHandler import idleConf -from . import idlever -from . import rpc -from . import Debugger -from . import RemoteDebugger -from . import macosxSupport +from idlelib.EditorWindow import EditorWindow, fixwordbreaks +from idlelib.FileList import FileList +from idlelib.ColorDelegator import ColorDelegator +from idlelib.UndoDelegator import UndoDelegator +from idlelib.OutputWindow import OutputWindow +from idlelib.configHandler import idleConf +from idlelib import idlever +from idlelib import rpc +from idlelib import Debugger +from idlelib import RemoteDebugger +from idlelib import macosxSupport LOCALHOST = '127.0.0.1' @@ -541,13 +541,13 @@ class ModifiedInterpreter(InteractiveInterpreter): return def remote_stack_viewer(self): - from . import RemoteObjectBrowser + from idlelib import RemoteObjectBrowser oid = self.rpcclt.remotequeue("exec", "stackviewer", ("flist",), {}) if oid is None: self.tkconsole.root.bell() return item = RemoteObjectBrowser.StubObjectTreeItem(self.rpcclt, oid) - from .TreeWidget import ScrolledCanvas, TreeNode + from idlelib.TreeWidget import ScrolledCanvas, TreeNode top = Toplevel(self.tkconsole.root) theme = idleConf.GetOption('main','Theme','name') background = idleConf.GetHighlight(theme, 'normal')['background'] @@ -589,7 +589,7 @@ class ModifiedInterpreter(InteractiveInterpreter): # at the moment, InteractiveInterpreter expects str assert isinstance(source, str) #if isinstance(source, str): - # from . import IOBinding + # from idlelib import IOBinding # try: # source = source.encode(IOBinding.encoding) # except UnicodeError: @@ -782,7 +782,7 @@ class PyShell(OutputWindow): # New classes - from .IdleHistory import History + from idlelib.IdleHistory import History def __init__(self, flist=None): if use_subprocess: @@ -821,7 +821,7 @@ class PyShell(OutputWindow): self.save_stdout = sys.stdout self.save_stderr = sys.stderr self.save_stdin = sys.stdin - from . import IOBinding + from idlelib import IOBinding self.stdout = PseudoFile(self, "stdout", IOBinding.encoding) self.stderr = PseudoFile(self, "stderr", IOBinding.encoding) self.console = PseudoFile(self, "console", IOBinding.encoding) @@ -992,7 +992,7 @@ class PyShell(OutputWindow): if len(line) == 0: # may be EOF if we quit our mainloop with Ctrl-C line = "\n" if isinstance(line, str): - from . import IOBinding + from idlelib import IOBinding try: line = line.encode(IOBinding.encoding) except UnicodeError: @@ -1180,7 +1180,7 @@ class PyShell(OutputWindow): "(sys.last_traceback is not defined)", master=self.text) return - from .StackViewer import StackBrowser + from idlelib.StackViewer import StackBrowser sv = StackBrowser(self.root, self.flist) def view_restart_mark(self, event=None): diff --git a/Lib/idlelib/RemoteDebugger.py b/Lib/idlelib/RemoteDebugger.py index b2d5921..38583db 100644 --- a/Lib/idlelib/RemoteDebugger.py +++ b/Lib/idlelib/RemoteDebugger.py @@ -22,8 +22,8 @@ barrier, in particular frame and traceback objects. import sys import types -from . import rpc -from . import Debugger +from idlelib import rpc +from idlelib import Debugger debugging = 0 diff --git a/Lib/idlelib/RemoteObjectBrowser.py b/Lib/idlelib/RemoteObjectBrowser.py index bf1fb3b..3d767b3 100644 --- a/Lib/idlelib/RemoteObjectBrowser.py +++ b/Lib/idlelib/RemoteObjectBrowser.py @@ -1,4 +1,4 @@ -from . import rpc +from idlelib import rpc def remote_object_tree_item(item): wrapper = WrappedObjectTreeItem(item) diff --git a/Lib/idlelib/ReplaceDialog.py b/Lib/idlelib/ReplaceDialog.py index df7bed8..2d6c802 100644 --- a/Lib/idlelib/ReplaceDialog.py +++ b/Lib/idlelib/ReplaceDialog.py @@ -1,7 +1,7 @@ from Tkinter import * -from . import SearchEngine -from .SearchDialogBase import SearchDialogBase +from idlelib import SearchEngine +from idlelib.SearchDialogBase import SearchDialogBase def replace(text): root = text._root() diff --git a/Lib/idlelib/ScriptBinding.py b/Lib/idlelib/ScriptBinding.py index c84ec88..ae530e5 100644 --- a/Lib/idlelib/ScriptBinding.py +++ b/Lib/idlelib/ScriptBinding.py @@ -23,10 +23,10 @@ import string import tabnanny import tokenize import tkMessageBox -from .EditorWindow import EditorWindow -from . import PyShell +from idlelib.EditorWindow import EditorWindow +from idlelib import PyShell -from .configHandler import idleConf +from idlelib.configHandler import idleConf indent_message = """Error: Inconsistent indentation detected! diff --git a/Lib/idlelib/SearchDialog.py b/Lib/idlelib/SearchDialog.py index 87c34c1..7c70b84 100644 --- a/Lib/idlelib/SearchDialog.py +++ b/Lib/idlelib/SearchDialog.py @@ -1,7 +1,7 @@ from Tkinter import * -from . import SearchEngine -from .SearchDialogBase import SearchDialogBase +from idlelib import SearchEngine +from idlelib.SearchDialogBase import SearchDialogBase def _setup(text): root = text._root() diff --git a/Lib/idlelib/StackViewer.py b/Lib/idlelib/StackViewer.py index 8a1cace..33a73fc 100644 --- a/Lib/idlelib/StackViewer.py +++ b/Lib/idlelib/StackViewer.py @@ -2,8 +2,8 @@ import os import sys import linecache -from .TreeWidget import TreeNode, TreeItem, ScrolledCanvas -from .ObjectBrowser import ObjectTreeItem, make_objecttreeitem +from idlelib.TreeWidget import TreeNode, TreeItem, ScrolledCanvas +from idlelib.ObjectBrowser import ObjectTreeItem, make_objecttreeitem def StackBrowser(root, flist=None, tb=None, top=None): if top is None: diff --git a/Lib/idlelib/TreeWidget.py b/Lib/idlelib/TreeWidget.py index 8210117..09cb714 100644 --- a/Lib/idlelib/TreeWidget.py +++ b/Lib/idlelib/TreeWidget.py @@ -19,8 +19,8 @@ import sys from Tkinter import * import imp -from . import ZoomHeight -from .configHandler import idleConf +from idlelib import ZoomHeight +from idlelib.configHandler import idleConf ICONDIR = "Icons" @@ -453,7 +453,7 @@ class ScrolledCanvas: # Testing functions def test(): - from . import PyShell + from idlelib import PyShell root = Toplevel(PyShell.root) root.configure(bd=0, bg="yellow") root.focus_set() diff --git a/Lib/idlelib/UndoDelegator.py b/Lib/idlelib/UndoDelegator.py index 2b836a8..cdda142 100644 --- a/Lib/idlelib/UndoDelegator.py +++ b/Lib/idlelib/UndoDelegator.py @@ -2,7 +2,7 @@ import sys import string from Tkinter import * -from .Delegator import Delegator +from idlelib.Delegator import Delegator #$ event <<redo>> #$ win <Control-y> @@ -338,7 +338,7 @@ class CommandSequence(Command): return self.depth def main(): - from .Percolator import Percolator + from idlelib.Percolator import Percolator root = Tk() root.wm_protocol("WM_DELETE_WINDOW", root.quit) text = Text() diff --git a/Lib/idlelib/ZoomHeight.py b/Lib/idlelib/ZoomHeight.py index 5627a0d..e8d1710 100644 --- a/Lib/idlelib/ZoomHeight.py +++ b/Lib/idlelib/ZoomHeight.py @@ -3,7 +3,7 @@ import re import sys -from . import macosxSupport +from idlelib import macosxSupport class ZoomHeight: diff --git a/Lib/idlelib/aboutDialog.py b/Lib/idlelib/aboutDialog.py index 3e67078..a0a6691 100644 --- a/Lib/idlelib/aboutDialog.py +++ b/Lib/idlelib/aboutDialog.py @@ -5,8 +5,8 @@ from Tkinter import * import os -from . import textView -from . import idlever +from idlelib import textView +from idlelib import idlever class AboutDialog(Toplevel): """Modal about dialog for idle @@ -158,7 +158,7 @@ if __name__ == '__main__': # test the dialog root = Tk() def run(): - from . import aboutDialog + from idlelib import aboutDialog aboutDialog.AboutDialog(root, 'About') Button(root, text='Dialog', command=run).pack() root.mainloop() diff --git a/Lib/idlelib/configDialog.py b/Lib/idlelib/configDialog.py index b3e7b3e..8fee841 100644 --- a/Lib/idlelib/configDialog.py +++ b/Lib/idlelib/configDialog.py @@ -13,12 +13,12 @@ from Tkinter import * import tkMessageBox, tkColorChooser, tkFont import copy -from .configHandler import idleConf -from .dynOptionMenuWidget import DynOptionMenu -from .tabpage import TabPageSet -from .keybindingDialog import GetKeysDialog -from .configSectionNameDialog import GetCfgSectionNameDialog -from .configHelpSourceEdit import GetHelpSourceDialog +from idlelib.configHandler import idleConf +from idlelib.dynOptionMenuWidget import DynOptionMenu +from idlelib.tabpage import TabPageSet +from idlelib.keybindingDialog import GetKeysDialog +from idlelib.configSectionNameDialog import GetCfgSectionNameDialog +from idlelib.configHelpSourceEdit import GetHelpSourceDialog class ConfigDialog(Toplevel): diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index 98d6be7..2c9056e 100644 --- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -20,8 +20,8 @@ configuration problem notification and resolution. import os import sys -from . import macosxSupport -from .ConfigParser import ConfigParser, NoOptionError, NoSectionError +from idlelib import macosxSupport +from ConfigParser import ConfigParser, NoOptionError, NoSectionError class InvalidConfigType(Exception): pass class InvalidConfigSet(Exception): pass diff --git a/Lib/idlelib/idle.py b/Lib/idlelib/idle.py index 0db5fd4..52e2ebb 100644 --- a/Lib/idlelib/idle.py +++ b/Lib/idlelib/idle.py @@ -1,9 +1,10 @@ try: - import idlelib.PyShell + import idlelib, idlelib.PyShell except ImportError: # IDLE is not installed, but maybe PyShell is on sys.path: + print("*** idle.py import error! Trying alternate approach....") try: - from . import PyShell + import PyShell except ImportError: raise else: diff --git a/Lib/idlelib/macosxSupport.py b/Lib/idlelib/macosxSupport.py index 14c5bd8..20c8e23 100644 --- a/Lib/idlelib/macosxSupport.py +++ b/Lib/idlelib/macosxSupport.py @@ -47,10 +47,10 @@ def overrideRootMenu(root, flist): # Due to a (mis-)feature of TkAqua the user will also see an empty Help # menu. from Tkinter import Menu, Text, Text - from .EditorWindow import prepstr, get_accelerator - from . import Bindings - from . import WindowList - from .MultiCall import MultiCallCreator + from idlelib.EditorWindow import prepstr, get_accelerator + from idlelib import Bindings + from idlelib import WindowList + from idlelib.MultiCall import MultiCallCreator menubar = Menu(root) root.configure(menu=menubar) @@ -73,11 +73,11 @@ def overrideRootMenu(root, flist): menubar.add_cascade(label='IDLE', menu=menu) def about_dialog(event=None): - from . import aboutDialog + from idlelib import aboutDialog aboutDialog.AboutDialog(root, 'About IDLE') def config_dialog(event=None): - from . import configDialog + from idlelib import configDialog configDialog.ConfigDialog(root, 'Settings') diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py index 7914d20..d98eea5 100644 --- a/Lib/idlelib/run.py +++ b/Lib/idlelib/run.py @@ -8,13 +8,13 @@ import thread import threading import Queue -from . import CallTips -from . import AutoComplete +from idlelib import CallTips +from idlelib import AutoComplete -from . import RemoteDebugger -from . import RemoteObjectBrowser -from . import StackViewer -from . import rpc +from idlelib import RemoteDebugger +from idlelib import RemoteObjectBrowser +from idlelib import StackViewer +from idlelib import rpc import __main__ @@ -245,7 +245,7 @@ class MyHandler(rpc.RPCHandler): sys.stdin = self.console = self.get_remote_proxy("stdin") sys.stdout = self.get_remote_proxy("stdout") sys.stderr = self.get_remote_proxy("stderr") - from . import IOBinding + from idlelib import IOBinding sys.stdin.encoding = sys.stdout.encoding = \ sys.stderr.encoding = IOBinding.encoding self.interp = self.get_remote_proxy("interp") |