diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-02 10:40:36 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-02 10:40:36 +0200 |
commit | dbc5865f1778c40438a7d2a4ac86f43e7e0f6131 (patch) | |
tree | 9e23dc6a0d695a09572affd5717d3fa699900051 /Lib/tkinter | |
parent | 61702c9318c8c26b59695fcab6296df6fe8194d2 (diff) | |
parent | 2c5c58618dad8a8aec140378c2c7b3856cf50176 (diff) | |
download | cpython-dbc5865f1778c40438a7d2a4ac86f43e7e0f6131.tar.gz |
Merge heads
Diffstat (limited to 'Lib/tkinter')
-rw-r--r-- | Lib/tkinter/__init__.py | 39 | ||||
-rw-r--r-- | Lib/tkinter/filedialog.py | 4 |
2 files changed, 2 insertions, 41 deletions
diff --git a/Lib/tkinter/__init__.py b/Lib/tkinter/__init__.py index 6755be6389..3956e85ad1 100644 --- a/Lib/tkinter/__init__.py +++ b/Lib/tkinter/__init__.py @@ -2152,45 +2152,6 @@ class Button(Widget): """ return self.tk.call(self._w, 'invoke') - -# Indices: -# XXX I don't like these -- take them away -def AtEnd(): - warnings.warn("tkinter.AtEnd will be removed in 3.4", - DeprecationWarning, stacklevel=2) - return 'end' - - -def AtInsert(*args): - warnings.warn("tkinter.AtInsert will be removed in 3.4", - DeprecationWarning, stacklevel=2) - s = 'insert' - for a in args: - if a: s = s + (' ' + a) - return s - - -def AtSelFirst(): - warnings.warn("tkinter.AtSelFirst will be removed in 3.4", - DeprecationWarning, stacklevel=2) - return 'sel.first' - - -def AtSelLast(): - warnings.warn("tkinter.AtSelLast will be removed in 3.4", - DeprecationWarning, stacklevel=2) - return 'sel.last' - - -def At(x, y=None): - warnings.warn("tkinter.At will be removed in 3.4", - DeprecationWarning, stacklevel=2) - if y is None: - return '@%r' % (x,) - else: - return '@%r,%r' % (x, y) - - class Canvas(Widget, XView, YView): """Canvas widget to display graphical elements like lines or text.""" def __init__(self, master=None, cnf={}, **kw): diff --git a/Lib/tkinter/filedialog.py b/Lib/tkinter/filedialog.py index 3ffb2528f0..a71afb25b9 100644 --- a/Lib/tkinter/filedialog.py +++ b/Lib/tkinter/filedialog.py @@ -166,7 +166,7 @@ class FileDialog: dir, pat = self.get_filter() try: names = os.listdir(dir) - except os.error: + except OSError: self.master.bell() return self.directory = dir @@ -209,7 +209,7 @@ class FileDialog: if not os.path.isabs(dir): try: pwd = os.getcwd() - except os.error: + except OSError: pwd = None if pwd: dir = os.path.join(pwd, dir) |