path stringlengths 14 112 | content stringlengths 0 6.32M | size int64 0 6.32M | max_lines int64 1 100k | repo_name stringclasses 2
values | autogenerated bool 1
class |
|---|---|---|---|---|---|
cosmopolitan/third_party/python/Lib/idlelib/parenmatch.py | """ParenMatch -- for parenthesis matching.
When you hit a right paren, the cursor should move briefly to the left
paren. Paren here is used generically; the matching applies to
parentheses, square brackets, and curly braces.
"""
from idlelib.hyperparser import HyperParser
from idlelib.config import idleConf
_openers... | 7,204 | 184 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/config_key.py | """
Dialog for building Tkinter accelerator key bindings
"""
from tkinter import *
from tkinter.ttk import Scrollbar
from tkinter import messagebox
import string
import sys
class GetKeysDialog(Toplevel):
# Dialog title for invalid key sequence
keyerror_title = 'Key Sequence Error'
def __init__(self, par... | 13,408 | 301 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/mainmenu.py | """Define the menu contents, hotkeys, and event bindings.
There is additional configuration information in the EditorWindow class (and
subclasses): the menus are created there based on the menu_specs (class)
variable, and menus not created are silently skipped in the code here. This
makes it possible, for example, to... | 3,703 | 120 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/calltip.py | """Pop up a reminder of how to call a function.
Call Tips are floating windows which display function, class, and method
parameter and docstring information when you type an opening parenthesis, and
which disappear when you type a closing parenthesis.
"""
import inspect
import re
import sys
import textwrap
import type... | 6,067 | 179 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/search.py | from tkinter import TclError
from idlelib import searchengine
from idlelib.searchbase import SearchDialogBase
def _setup(text):
"Create or find the singleton SearchDialog instance."
root = text._root()
engine = searchengine.get(root)
if not hasattr(engine, "_searchdialog"):
engine._searchdialo... | 3,164 | 102 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/help.py | """ help.py: Implement the Idle help menu.
Contents are subject to revision at any time, without notice.
Help => About IDLE: diplay About Idle dialog
<to be moved here from help_about.py>
Help => IDLE Help: Display help.html with proper formatting.
Doc/library/idle.rst (Sphinx)=> Doc/build/html/library/idle.html
(... | 11,325 | 286 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/config-main.def | # IDLE reads several config files to determine user preferences. This
# file is the default config file for general idle settings.
#
# When IDLE starts, it will look in
# the following two sets of files, in order:
#
# default configuration files in idlelib
# --------------------------------------
# config-... | 3,128 | 92 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/colorizer.py | import builtins
import keyword
import re
import time
from idlelib.config import idleConf
from idlelib.delegator import Delegator
DEBUG = False
def any(name, alternates):
"Return a named group pattern matching list of alternates."
return "(?P<%s>" % name + "|".join(alternates) + ")"
def make_pat():
kw = ... | 11,275 | 297 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/NEWS.txt | What's New in IDLE 3.6.8
Released on 2018-12-20?
**This is the final 3.6 bugfix maintenance release**
======================================
bpo-34864: When starting IDLE on MacOS, warn if the system setting
"Prefer tabs when opening documents" is "Always". As previous
documented for this issue, running IDLE with th... | 39,839 | 959 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/_pyclbr.py | # A private copy of 3.7.0a1 pyclbr for use by idlelib.browser
"""Parse a Python module and describe its classes and functions.
Parse enough of a Python file to recognize imports and class and
function definitions, and to find out the superclasses of a class.
The interface consists of a single function:
readmodule... | 15,199 | 403 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/filelist.py | "idlelib.filelist"
import os
from tkinter import messagebox as tkMessageBox
class FileList:
# N.B. this import overridden in PyShellFileList.
from idlelib.editor import EditorWindow
def __init__(self, root):
self.root = root
self.dict = {}
self.inversedict = {}
self.vars... | 3,896 | 132 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/pyshell.py | #! /usr/bin/env python3
import sys
try:
from tkinter import *
except ImportError:
print("** IDLE can't import Tkinter.\n"
"Your Python may not be configured for Tk. **", file=sys.__stderr__)
raise SystemExit(1)
# Valid arguments for the ...Awareness call below are defined in the following.
# ht... | 57,717 | 1,578 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/tree.py | # XXX TO DO:
# - popup menu
# - support partial or total redisplay
# - key bindings (instead of quick-n-dirty bindings on Canvas):
# - up/down arrow keys to move focus around
# - ditto for page up/down, home/end
# - left/right arrows to expand/collapse & move out/in
# - more doc strings
# - add icons for "file", ... | 15,089 | 470 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle.py | import os.path
import sys
# Enable running IDLE with idlelib in a non-standard location.
# This was once used to run development versions of IDLE.
# Because PEP 434 declared idle.py a public interface,
# removal should require deprecation.
idlelib_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if i... | 454 | 15 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/zoomheight.py | "Zoom a window to maximum height."
import re
import sys
from idlelib import macosx
class ZoomHeight:
def __init__(self, editwin):
self.editwin = editwin
def zoom_height_event(self, event=None):
top = self.editwin.top
zoom_height(top)
return "break"
def zoom_height(top):
... | 1,340 | 56 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/paragraph.py | """Format a paragraph, comment block, or selection to a max width.
Does basic, standard text formatting, and also understands Python
comment blocks. Thus, for editing Python source code, this
extension is really only suitable for reformatting these comment
blocks or triple-quoted strings.
Known problems with comment ... | 7,167 | 195 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/editor.py | import importlib.abc
import importlib.util
import os
import platform
import string
import tokenize
import traceback
import webbrowser
from tkinter import *
from tkinter.ttk import Scrollbar
import tkinter.simpledialog as tkSimpleDialog
import tkinter.messagebox as tkMessageBox
from idlelib.config import idleConf
from... | 67,275 | 1,726 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/squeezer.py | """An IDLE extension to avoid having very long texts printed in the shell.
A common problem in IDLE's interactive shell is printing of large amounts of
text into the shell. This makes looking at the previous history difficult.
Worse, this can cause IDLE to become very slow, even to the point of being
completely unusab... | 13,308 | 356 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/pathbrowser.py | import importlib.machinery
import os
import sys
from idlelib.browser import ModuleBrowser, ModuleBrowserTreeItem
from idlelib.tree import TreeItem
class PathBrowser(ModuleBrowser):
def __init__(self, master, *, _htest=False, _utest=False):
"""
_htest - bool, change box location when running htes... | 3,193 | 112 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/debugger_r.py | """Support for remote Python debugging.
Some ASCII art to describe the structure:
IN PYTHON SUBPROCESS # IN IDLE PROCESS
#
# oid='gui_adapter'
+----------+ # +------------+ ... | 12,140 | 394 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/__main__.py | """
IDLE main entry point
Run IDLE as python -m idlelib
"""
import idlelib.pyshell
idlelib.pyshell.main()
# This file does not work for 2.7; See issue 24212.
| 159 | 9 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/query.py | """
Dialogs that query users and verify the answer before accepting.
Use ttk widgets, limiting use to tcl/tk 8.5+, as in IDLE 3.6+.
Query is the generic base class for a popup dialog.
The user must either enter a valid answer or close the dialog.
Entries are validated when <Return> is entered or [Ok] is clicked.
Entri... | 12,434 | 313 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/history.py | "Implement Idle Shell history mechanism with History class"
from idlelib.config import idleConf
class History:
''' Implement Idle Shell history mechanism.
store - Store source statement (called from pyshell.resetoutput).
fetch - Fetch stored statement matching prefix already entered.
history_next - ... | 4,043 | 107 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/runscript.py | """Execute code from an editor.
Check module: do a full syntax check of the current module.
Also run the tabnanny to catch any inconsistent tabs.
Run module: also execute the module's code in the __main__ namespace.
The window must have been saved previously. The module is added to
sys.modules, and is also added to t... | 7,841 | 201 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/CREDITS.txt | Guido van Rossum, as well as being the creator of the Python language, is the
original creator of IDLE. Other contributors prior to Version 0.8 include
Mark Hammond, Jeremy Hylton, Tim Peters, and Moshe Zadka.
IDLE's recent development was carried out in the SF IDLEfork project. The
objective was to develop a version... | 1,866 | 38 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/multicall.py | """
MultiCall - a class which inherits its methods from a Tkinter widget (Text, for
example), but enables multiple calls of functions per virtual event - all
matching events will be called, not only the most specific one. This is done
by wrapping the event functions - event_add, event_delete and event_info.
MultiCall r... | 18,648 | 449 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/iomenu.py | import codecs
from codecs import BOM_UTF8
import os
import re
import shlex
import sys
import tempfile
import tkinter.filedialog as tkFileDialog
import tkinter.messagebox as tkMessageBox
from tkinter.simpledialog import askstring
import idlelib
from idlelib.config import idleConf
if idlelib.testing: # Set True by te... | 20,734 | 575 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/run.py | import io
import linecache
import queue
import sys
import time
import traceback
import _thread as thread
import threading
import warnings
import tkinter # Tcl, deletions, messagebox if startup fails
from idlelib import autocomplete # AutoComplete, fetch_encodings
from idlelib import calltip # Calltip
from idlelib ... | 17,272 | 526 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/help_about.py | """About Dialog for IDLE
"""
import os
import sys
from platform import python_version, architecture
from tkinter import Toplevel, Frame, Label, Button, PhotoImage
from tkinter import SUNKEN, TOP, BOTTOM, LEFT, X, BOTH, W, EW, NSEW, E
from idlelib import textview
def build_bits():
"Return bits for platform."
... | 8,981 | 208 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/searchbase.py | '''Define SearchDialogBase used by Search, Replace, and Grep dialogs.'''
from tkinter import Toplevel, Frame
from tkinter.ttk import Entry, Label, Button, Checkbutton, Radiobutton
class SearchDialogBase:
'''Create most of a 3 or 4 row, 3 column search dialog.
The left and wide middle column contain:
1 o... | 7,451 | 202 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/codecontext.py | """codecontext - display the block context above the edit window
Once code has scrolled off the top of a window, it can be difficult to
determine which block you are in. This extension implements a pane at the top
of each IDLE edit window which provides block structure hints. These hints are
the lines which contain ... | 10,490 | 241 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/configdialog.py | """IDLE Configuration Dialog: support user customization of IDLE by GUI
Customize font faces, sizes, and colorization attributes. Set indentation
defaults. Customize keybindings. Colorization and keybindings can be
saved as user defined sets. Select startup options including shell/editor
and default window size. ... | 101,057 | 2,309 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/window.py | from tkinter import *
class WindowList:
def __init__(self):
self.dict = {}
self.callbacks = []
def add(self, window):
window.after_idle(self.call_callbacks)
self.dict[str(window)] = window
def delete(self, window):
try:
del self.dict[str(window)]
... | 2,588 | 98 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/macosx.py | """
A number of functions that enhance IDLE on macOS.
"""
from os.path import expanduser
import plistlib
from sys import platform # Used in _init_tk_type, changed by test.
import tkinter
## Define functions that query the Mac graphics type.
## _tk_type and its initializer are private to this section.
_tk_type = No... | 9,660 | 288 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/dynoption.py | """
OptionMenu widget modified to allow dynamic menu reconfiguration
and setting of highlightthickness
"""
import copy
from tkinter import OptionMenu, _setit, StringVar, Button
class DynOptionMenu(OptionMenu):
"""
unlike OptionMenu, our kwargs can include highlightthickness
"""
def __init__(self, mast... | 2,017 | 59 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/debugobj_r.py | from idlelib import rpc
def remote_object_tree_item(item):
wrapper = WrappedObjectTreeItem(item)
oid = id(wrapper)
rpc.objecttable[oid] = wrapper
return oid
class WrappedObjectTreeItem:
# Lives in PYTHON subprocess
def __init__(self, item):
self.__item = item
def __getattr__(self... | 1,082 | 42 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/stackviewer.py | import linecache
import os
import sys
import tkinter as tk
from idlelib.debugobj import ObjectTreeItem, make_objecttreeitem
from idlelib.tree import TreeNode, TreeItem, ScrolledCanvas
def StackBrowser(root, flist=None, tb=None, top=None):
global sc, item, node # For testing.
if top is None:
top = tk... | 4,454 | 156 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/config.py | """idlelib.config -- Manage IDLE configuration information.
The comments at the beginning of config-main.def describe the
configuration files and the design implemented to update user
configuration information. In particular, user configuration choices
which duplicate the defaults will be removed from the user's
conf... | 38,879 | 931 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/ChangeLog | Please refer to the IDLEfork and IDLE CVS repositories for
change details subsequent to the 0.8.1 release.
IDLEfork ChangeLog
==================
2001-07-20 11:35 elguavas
* README.txt, NEWS.txt: bring up to date for 0.8.1 release
2001-07-19 16:40 elguavas
* IDLEFORK.html: replaced by IDLEFORK-index.html
2001... | 56,360 | 1,592 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/config-extensions.def | # config-extensions.def
#
# The following sections are for features that are no longer extensions.
# Their options values are left here for back-compatibility.
[AutoComplete]
popupwait= 2000
[CodeContext]
maxlines= 15
[FormatParagraph]
max-width= 72
[ParenMatch]
style= expression
flash-delay= 500
bell= True
# IDLE... | 2,266 | 63 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/grep.py | """Grep dialog for Find in Files functionality.
Inherits from SearchDialogBase for GUI and uses searchengine
to prepare search pattern.
"""
import fnmatch
import os
import sys
from tkinter import StringVar, BooleanVar
from tkinter.ttk import Checkbutton
from idlelib.searchbase import SearchDialogBase
from idle... | 6,742 | 201 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/percolator.py | from idlelib.delegator import Delegator
from idlelib.redirector import WidgetRedirector
class Percolator:
def __init__(self, text):
# XXX would be nice to inherit from Delegator
self.text = text
self.redir = WidgetRedirector(text)
self.top = self.bottom = Delegator(text)
s... | 3,130 | 104 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/replace.py | """Replace dialog for IDLE. Inherits SearchDialogBase for GUI.
Uses idlelib.SearchEngine for search capability.
Defines various replace related functions like replace, replace all,
replace+find.
"""
import re
from tkinter import StringVar, TclError
from idlelib.searchbase import SearchDialogBase
from idlelib import s... | 7,502 | 243 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/redirector.py | from tkinter import TclError
class WidgetRedirector:
"""Support for redirecting arbitrary widget subcommands.
Some Tk operations don't normally pass through tkinter. For example, if a
character is inserted into a Text widget by pressing a key, a default Tk
binding to the widget's 'insert' operation i... | 6,875 | 175 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/outwin.py | """Editor window that can serve as an output file.
"""
import re
from tkinter import messagebox
from idlelib.editor import EditorWindow
from idlelib import iomenu
file_line_pats = [
# order of patterns matters
r'file "([^"]*)", line (\d+)',
r'([^\s]+)\((\d+)\)',
r'^(\s*\S.*?):\s*(\d+):', # Win fil... | 5,808 | 189 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/__init__.py | """The idlelib package implements the Idle application.
Idle includes an interactive shell and editor.
Starting with Python 3.6, IDLE requires tcl/tk 8.5 or later.
Use the files named idle.* to start Idle.
The other files are private implementations. Their details are subject to
change. See PEP 434 for more. Impor... | 396 | 11 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/rstrip.py | 'Provides "Strip trailing whitespace" under the "Format" menu.'
class Rstrip:
def __init__(self, editwin):
self.editwin = editwin
def do_rstrip(self, event=None):
text = self.editwin.text
undo = self.editwin.undo
undo.undo_block_start()
end_line = int(float(text.ind... | 868 | 30 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/autoexpand.py | '''Complete the current word before the cursor with words in the editor.
Each menu selection or shortcut key selection replaces the word with a
different word with the same prefix. The search for matches begins
before the target and moves toward the top of the editor. It then starts
after the cursor and moves down. It... | 3,216 | 97 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/statusbar.py | from tkinter import Frame, Label
class MultiStatusBar(Frame):
def __init__(self, master, **kw):
Frame.__init__(self, master, **kw)
self.labels = {}
def set_label(self, name, text='', side='left', width=0):
if name not in self.labels:
label = Label(self, borderwidth=0, anc... | 1,441 | 50 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/Icons/openfolder.gif | GIF89a
¢ÿ ÿÿÿÏðððÏÏ` ÀÀÀ !ù ,
@BhJÌú@i !²¬ 8OaèéM Ð4kaã0.Â¥gÁ°+аBCÁèÅl ËãlV»}f»Øl ; | 125 | 3 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/Icons/idle_16.gif | GIF89a ÷ Ec}Ed}Fd}Ge}Ed~ÿÃ0ÿÇ4ÿÈ3ÿÊ5ÿÌ7ÿÅ8ÿË?ÿÐ=ÿÑ>ÿÒ@ÿÔBÿ×FÿØGÿÒHÿÛKÿÝMÿÛSÿßSÿàQÿãVÿåXÿçZÿé_ÿë`ÿìaÿíaÿícÿâv?q>s>t =u¢=u£<x©<y«;z>~±Cg
ChGi
BiAkAmEo@nKxI~©=¶G²E»q³¬ ¢¢¢¤¤¤¥¥¥¨¨¨ªªª¬¬¬®®®¯¯¯³³³¶¶¶···¹¹¹»»»½½½¾¾¾¿¿¿ÿàÿâÿôÿì¨ÿñ®ÿò·§ºÊ¤¼Ð¢ÂÞ°ÁСÄàÀÀÀÁÁÁÃÃÃÅÅÅÇÇÇÈÈÈÉÉÉÌÌÌÍÍÍÎÎÎÏÏÏÐÐÐÑÑÑÜÜÜÝÝÝÞ... | 1,034 | 3 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/Icons/python.gif | GIF89a öd ë»ë¾!óÁúÇýËÿÌëÂ*ÿÏ#ÿÏ$ÿÐ%ÿÐ&ÿÓ-ýÒ/ÿÓ.ÿÓ/ëÅ4èÇ=ÿÓ0ÿÔ0ýÕ6ÿÖ7úÓ9ÿ×8ÿ×9ÿ×:ùÕ>ÿØ:ìÎEýÙAÿÚAÿÚBÿÛBÿÛCÿÛDýÝJÿÞKÿßMýÞNÿßNÿâUÿãWÿãXÿæaÿçaÿçbòánõãoýéjÿël2`6f6g5h6i6i7h7j9l8l9m:o:p;p;p<q=s =s¢=t¡>t¢>u£?v¥@x¦@x§Ay¨B{ªC|«C}C}®D}D~E¯F°F±F²G²H´HµH
¶I
·J¹JºK»L¼L¼M¾L¿NÀOÁPÃRÆÿÿÿ ... | 585 | 1 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/Icons/idle_48.gif | GIF89a0 0 ö Ed~ÿ¸ÿ¼$ÿ½)ÿ¾0ÿÂ,ÿÆ1ÿÊ5ÿÎ:ÿÑ>ÿÈOÿÕCÿØGÿÖLÿÜKÿÊRÿßRÿÓ^ÿâTÿæZÿé]ÿÑfÿÚeÿÕlÿÛmÿØpÿì`ÿïs?r=v¤<y«:}³9¸DfChBjZu@n@pMxJ|¥C}«8¼Aµ@
¼g·o¼7Á>ÃDÅdÀbÍaÐv£Çv¥Íu§Ò¤¤¤´´´½½½ÿÜÿçÿì¢ÿåªÿí³·Ì¹Ñ®Ä×µËÝÁá³ÑèÄÄÄÌÌÌÓÓÓÐ×ÞÜÜÜÿú×äääìììÿúééïôêðõôôôÿüö÷úüüüü ... | 1,388 | 8 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/Icons/tk.gif | GIF89a ÿ ÿ ÀÀÀ!ù , @»Ên¯&ØÎrF×ñ¡cè¢J ; ;;º
D ;; | 85 | 2 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/Icons/plusnode.gif | GIF89a ÿ ÿÿÿ ÀÀÀ!ù , @ À
¡hp,Çê3§¯â(FL÷Dº¦D
ä8 ; | 79 | 2 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/Icons/minusnode.gif | GIF89a ÿÿÿ ÀÀÀ!ù , 2 HP`À°! 28 ÄhÔø0¢D/¼Ø±bÂS | 96 | 1 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/Icons/idle_32.gif | GIF89a ÷ò Ec|Ec}Ed}Fd}Ed~Debbbÿ¼$ÿ¼%ÿ¾'ÿ¿(ÿ½+ÿÀ)ÿÁ+ÿÂ,ÿÃ-ÿÄ.ÿÅ/ÿÃ2ÿÅ0ÿÇ1ÿÈ2ÿÈ3ÿÉ4ÿÊ5ÿË6ÿÌ7ÿÁ<ÿÄ?ÿÍ8ÿÍ9ÿÎ:ÿÎ;ÿÏ;ÿÌ=ÿÏ<ÿÐ<ÿÑ=ÿÑ>ÿÑ?ÿÒ?ÿÒ@ÿÓ@ÿÓAÿÔBÿÖDÿ×Eÿ×FÿØFÿØGÿÖHÿÚJÿÛJÿÛKÿÜLÿÝMÿÞOÿËYÿÎ\ÿßPÿÛ\ÿàQÿáRÿâSÿâTÿãUÿãVÿäVÿäWÿåXÿæYÿçZÿè[ÿé]ÿê^ÿê_ÿÛmÿßrÿägÿë`ÿìaÿíbÿâv?p?q?q?r>s>s>s>t>t >u¡=u¢=v£=v¤=v¥=w¦<w§=w§<x¨<x©<... | 1,435 | 9 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/Icons/folder.gif | GIF89a
¢ÿ ÿÿÏÿÿÿÏïïïÏÏ` ÀÀÀ!ù ,
@=xW̦Pªb¦ýwdi¡®DÓ,Xiܤe¸ Å Ä
Gö+)µè\æÍÙs×aYY ; | 120 | 3 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_paragraph.py | "Test paragraph, coverage 76%."
from idlelib import paragraph as pg
import unittest
from test.support import requires
from tkinter import Tk, Text
from idlelib.editor import EditorWindow
class Is_Get_Test(unittest.TestCase):
"""Test the is_ and get_ functions"""
test_comment = '# This is a comment'
test_... | 14,352 | 380 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/README.txt | README FOR IDLE TESTS IN IDLELIB.IDLE_TEST
0. Quick Start
Automated unit tests were added in 3.3 for Python 3.x.
To run the tests from a command line:
python -m test.test_idle
Human-mediated tests were added later in 3.4.
python -m idlelib.idle_test.htest
1. Test Files
The idle directory, idlelib, has over 60 x... | 8,729 | 239 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_rstrip.py | "Test rstrip, coverage 100%."
from idlelib import rstrip
import unittest
from idlelib.idle_test.mock_idle import Editor
class rstripTest(unittest.TestCase):
def test_rstrip_line(self):
editor = Editor()
text = editor.text
do_rstrip = rstrip.Rstrip(editor).do_rstrip
do_rstrip()
... | 1,605 | 54 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_editor.py | "Test editor, coverage 35%."
from idlelib import editor
import unittest
from test.support import requires
from tkinter import Tk
Editor = editor.EditorWindow
class EditorWindowTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('gui')
cls.root = Tk()
cls.root.withdra... | 1,141 | 47 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_outwin.py | "Test outwin, coverage 76%."
from idlelib import outwin
import unittest
from test.support import requires
from tkinter import Tk, Text
from idlelib.idle_test.mock_tk import Mbox_func
from idlelib.idle_test.mock_idle import Func
from unittest import mock
class OutputWindowTest(unittest.TestCase):
@classmethod
... | 5,545 | 172 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_delegator.py | "Test delegator, coverage 100%."
from idlelib.delegator import Delegator
import unittest
class DelegatorTest(unittest.TestCase):
def test_mydel(self):
# Test a simple use scenario.
# Initialize an int delegator.
mydel = Delegator(int)
self.assertIs(mydel.delegate, int)
s... | 1,567 | 45 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_scrolledlist.py | "Test scrolledlist, coverage 38%."
from idlelib.scrolledlist import ScrolledList
import unittest
from test.support import requires
requires('gui')
from tkinter import Tk
class ScrolledListTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.root = Tk()
@classmethod
def tearDownCla... | 496 | 28 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_searchengine.py | "Test searchengine, coverage 99%."
from idlelib import searchengine as se
import unittest
# from test.support import requires
from tkinter import BooleanVar, StringVar, TclError # ,Tk, Text
import tkinter.messagebox as tkMessageBox
from idlelib.idle_test.mock_tk import Var, Mbox
from idlelib.idle_test.mock_tk import... | 11,543 | 331 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_hyperparser.py | "Test hyperparser, coverage 98%."
from idlelib.hyperparser import HyperParser
import unittest
from test.support import requires
from tkinter import Tk, Text
from idlelib.editor import EditorWindow
class DummyEditwin:
def __init__(self, text):
self.text = text
self.indentwidth = 8
self.tabw... | 9,080 | 277 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/template.py | "Test , coverage %."
from idlelib import zzdummy
import unittest
from test.support import requires
from tkinter import Tk
class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('gui')
cls.root = Tk()
cls.root.withdraw()
@classmethod
def tearDownClass(cls):... | 642 | 31 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_run.py | "Test run, coverage 42%."
from idlelib import run
import unittest
from unittest import mock
from test.support import captured_stderr
import io
class RunTest(unittest.TestCase):
def test_print_exception_unhashable(self):
class UnhashableException(Exception):
def __eq__(self, other):
... | 9,414 | 265 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_browser.py | "Test browser, coverage 90%."
from idlelib import browser
from test.support import requires
import unittest
from unittest import mock
from idlelib.idle_test.mock_idle import Func
from collections import deque
import os.path
from idlelib import _pyclbr as pyclbr
from tkinter import Tk
from idlelib.tree import TreeNod... | 7,986 | 249 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_tree.py | "Test tree. coverage 56%."
from idlelib import tree
import unittest
from test.support import requires
requires('gui')
from tkinter import Tk
class TreeTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.root = Tk()
cls.root.withdraw()
@classmethod
def tearDownClass(cls):
... | 792 | 34 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/mock_idle.py | '''Mock classes that imitate idlelib modules or classes.
Attributes and methods will be added as needed for tests.
'''
from idlelib.idle_test.mock_tk import Text
class Func:
'''Record call, capture args, return/raise result set by test.
When mock function is called, set or use attributes:
self.called - ... | 1,870 | 61 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_debugger.py | "Test debugger, coverage 19%"
from idlelib import debugger
import unittest
from test.support import requires
requires('gui')
from tkinter import Tk
class NameSpaceTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.root = Tk()
cls.root.withdraw()
@classmethod
def tearDown... | 571 | 30 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_grep.py | """ !Changing this line will break Test_findfile.test_found!
Non-gui unit tests for grep.GrepDialog methods.
dummy_command calls grep_it calls findfiles.
An exception raised in one method will fail callers.
Otherwise, tests are mostly independent.
Currently only test grep_it, coverage 51%.
"""
from idlelib.grep import ... | 2,660 | 87 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_rpc.py | "Test rpc, coverage 20%."
from idlelib import rpc
import unittest
class CodePicklerTest(unittest.TestCase):
def test_pickle_unpickle(self):
def f(): return a + b + c
func, (cbytes,) = rpc.pickle_code(f.__code__)
self.assertIs(func, rpc.unpickle_code)
self.assertIn(b'test_rpc.py'... | 805 | 30 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_warning.py | '''Test warnings replacement in pyshell.py and run.py.
This file could be expanded to include traceback overrides
(in same two modules). If so, change name.
Revise if output destination changes (http://bugs.python.org/issue18318).
Make sure warnings module is left unaltered (http://bugs.python.org/issue18081).
'''
fro... | 2,740 | 74 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_runscript.py | "Test runscript, coverage 16%."
from idlelib import runscript
import unittest
from test.support import requires
from tkinter import Tk
from idlelib.editor import EditorWindow
class ScriptBindingTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('gui')
cls.root = Tk()
... | 777 | 34 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_autocomplete_w.py | "Test autocomplete_w, coverage 11%."
import unittest
from test.support import requires
from tkinter import Tk, Text
import idlelib.autocomplete_w as acw
class AutoCompleteWindowTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('gui')
cls.root = Tk()
cls.root.withdr... | 709 | 33 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_filelist.py | "Test filelist, coverage 19%."
from idlelib import filelist
import unittest
from test.support import requires
from tkinter import Tk
class FileListTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('gui')
cls.root = Tk()
cls.root.withdraw()
@classmethod
def t... | 795 | 34 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_history.py | " Test history, coverage 100%."
from idlelib.history import History
import unittest
from test.support import requires
import tkinter as tk
from tkinter import Text as tkText
from idlelib.idle_test.mock_tk import Text as mkText
from idlelib.config import idleConf
line1 = 'a = 7'
line2 = 'b = a'
class StoreTest(unit... | 5,517 | 173 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_help.py | "Test help, coverage 87%."
from idlelib import help
import unittest
from test.support import requires
requires('gui')
from os.path import abspath, dirname, join
from tkinter import Tk
class HelpFrameTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
"By itself, this tests that file parsed wi... | 849 | 35 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_redirector.py | "Test redirector, coverage 100%."
from idlelib.redirector import WidgetRedirector
import unittest
from test.support import requires
from tkinter import Tk, Text, TclError
from idlelib.idle_test.mock_idle import Func
class InitCloseTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('... | 4,176 | 123 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/htest.py | '''Run human tests of Idle's window, dialog, and popup widgets.
run(*tests)
Create a master Tk window. Within that, run each callable in tests
after finding the matching test spec in this file. If tests is empty,
run an htest for each spec dict in this file after finding the matching
callable in the module named in ... | 13,997 | 416 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_debugobj.py | "Test debugobj, coverage 40%."
from idlelib import debugobj
import unittest
class ObjectTreeItemTest(unittest.TestCase):
def test_init(self):
ti = debugobj.ObjectTreeItem('label', 22)
self.assertEqual(ti.labeltext, 'label')
self.assertEqual(ti.object, 22)
self.assertEqual(ti.setf... | 1,561 | 58 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_colorizer.py | "Test colorizer, coverage 25%."
from idlelib import colorizer
from test.support import requires
from tkinter import Tk, Text
import unittest
class FunctionTest(unittest.TestCase):
def test_any(self):
self.assertTrue(colorizer.any('test', ('a', 'b')))
def test_make_pat(self):
self.assertTrue... | 1,058 | 54 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_zoomheight.py | "Test zoomheight, coverage 66%."
# Some code is system dependent.
from idlelib import zoomheight
import unittest
from test.support import requires
from tkinter import Tk
from idlelib.editor import EditorWindow
class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('gui')
c... | 999 | 40 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_percolator.py | "Test percolator, coverage 100%."
from idlelib.percolator import Percolator, Delegator
import unittest
from test.support import requires
requires('gui')
from tkinter import Text, Tk, END
class MyFilter(Delegator):
def __init__(self):
Delegator.__init__(self, None)
def insert(self, *args):
se... | 4,065 | 119 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_pyparse.py | "Test pyparse, coverage 96%."
from idlelib import pyparse
import unittest
from collections import namedtuple
class ParseMapTest(unittest.TestCase):
def test_parsemap(self):
keepwhite = {ord(c): ord(c) for c in ' \t\n\r'}
mapping = pyparse.ParseMap(keepwhite)
self.assertEqual(mapping[ord(... | 18,588 | 467 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_pathbrowser.py | "Test pathbrowser, coverage 95%."
from idlelib import pathbrowser
import unittest
from test.support import requires
from tkinter import Tk
import os.path
import pyclbr # for _modules
import sys # for sys.path
from idlelib.idle_test.mock_idle import Func
import idlelib # for __file__
from idlelib import browser
fr... | 2,422 | 87 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_calltip_w.py | "Test calltip_w, coverage 18%."
from idlelib import calltip_w
import unittest
from test.support import requires
from tkinter import Tk, Text
class CallTipWindowTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
requires('gui')
cls.root = Tk()
cls.root.withdraw()
cls.t... | 686 | 30 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_parenmatch.py | """Test parenmatch, coverage 91%.
This must currently be a gui test because ParenMatch methods use
several text methods not defined on idlelib.idle_test.mock_tk.Text.
"""
from idlelib.parenmatch import ParenMatch
from test.support import requires
requires('gui')
import unittest
from unittest.mock import Mock
from tki... | 3,512 | 113 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_stackviewer.py | "Test stackviewer, coverage 63%."
from idlelib import stackviewer
import unittest
from test.support import requires
from tkinter import Tk
from idlelib.tree import TreeNode, ScrolledCanvas
import sys
class StackBrowserTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
svs = stackviewer.sys
... | 1,206 | 48 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/mock_tk.py | """Classes that replace tkinter gui objects used by an object being tested.
A gui object is anything with a master or parent parameter, which is
typically required in spite of what the doc strings say.
"""
class Event:
'''Minimal mock with attributes for testing event handlers.
This is not a gui object, but ... | 11,627 | 304 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_replace.py | "Test replace, coverage 78%."
from idlelib.replace import ReplaceDialog
import unittest
from test.support import requires
requires('gui')
from tkinter import Tk, Text
from unittest.mock import Mock
from idlelib.idle_test.mock_tk import Mbox
import idlelib.searchengine as se
orig_mbox = se.tkMessageBox
showerror = Mb... | 8,305 | 295 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_autocomplete.py | "Test autocomplete, coverage 57%."
import unittest
from test.support import requires
from tkinter import Tk, Text
import idlelib.autocomplete as ac
import idlelib.autocomplete_w as acw
from idlelib.idle_test.mock_idle import Func
from idlelib.idle_test.mock_tk import Event
class DummyEditwin:
def __init__(self,... | 5,107 | 145 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_config.py | """Test config, coverage 93%.
(100% for IdleConfParser, IdleUserConfParser*, ConfigChanges).
* Exception is OSError clause in Save method.
Much of IdleConf is also exercised by ConfigDialog and test_configdialog.
"""
from idlelib import config
import sys
import os
import tempfile
from test.support import captured_stder... | 32,805 | 823 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_searchbase.py | "Test searchbase, coverage 98%."
# The only thing not covered is inconsequential --
# testing skipping of suite when self.needwrapbutton is false.
import unittest
from test.support import requires
from tkinter import Tk, Frame ##, BooleanVar, StringVar
from idlelib import searchengine as se
from idlelib import search... | 5,479 | 157 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_text.py | ''' Test mock_tk.Text class against tkinter.Text class
Run same tests with both by creating a mixin class.
'''
import unittest
from test.support import requires
from _tkinter import TclError
class TextTest(object):
"Define items common to both sets of tests."
hw = 'hello\nworld' # Several tests insert this ... | 6,978 | 237 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_codecontext.py | "Test codecontext, coverage 100%"
from idlelib import codecontext
import unittest
from test.support import requires
from tkinter import Tk, Frame, Text, TclError
from unittest import mock
import re
from idlelib import config
usercfg = codecontext.idleConf.userCfg
testcfg = {
'main': config.IdleUserConfParser(''... | 14,494 | 404 | jart/cosmopolitan | false |
cosmopolitan/third_party/python/Lib/idlelib/idle_test/test_squeezer.py | from collections import namedtuple
from tkinter import Text, Tk
import unittest
from unittest.mock import Mock, NonCallableMagicMock, patch, sentinel, ANY
from test.support import requires
from idlelib.config import idleConf
from idlelib.squeezer import count_lines_with_wrapping, ExpandingButton, \
Squeezer
from i... | 21,861 | 510 | jart/cosmopolitan | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.