@simplexai/localmodels-darwin-arm64 0.1.0-dev.31.build.gitb5579b4b26f273bf03468c6aedf61b327fa6c245 → 0.1.0-dev.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bootstrap.identity +1 -1
- package/bootstrap.sha256 +10 -582
- package/modules/localmodels/__init__.py +1 -1
- package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/METADATA +1 -1
- package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/RECORD +7 -7
- package/package.json +1 -1
- package/tool.json +1 -1
- package/python/bin/2to3 +0 -7
- package/python/bin/2to3-3.12 +0 -7
- package/python/bin/idle3 +0 -7
- package/python/bin/idle3.12 +0 -7
- package/python/bin/pip +0 -8
- package/python/bin/pip3 +0 -8
- package/python/bin/pip3.12 +0 -8
- package/python/bin/pydoc3 +0 -7
- package/python/bin/pydoc3.12 +0 -7
- package/python/bin/python +0 -0
- package/python/bin/python3 +0 -0
- package/python/bin/python3-config +0 -76
- package/python/bin/python3.12-config +0 -76
- package/python/include/python3.12/Python.h +0 -109
- package/python/include/python3.12/abstract.h +0 -899
- package/python/include/python3.12/bltinmodule.h +0 -14
- package/python/include/python3.12/boolobject.h +0 -42
- package/python/include/python3.12/bytearrayobject.h +0 -44
- package/python/include/python3.12/bytesobject.h +0 -69
- package/python/include/python3.12/ceval.h +0 -168
- package/python/include/python3.12/codecs.h +0 -248
- package/python/include/python3.12/compile.h +0 -22
- package/python/include/python3.12/complexobject.h +0 -30
- package/python/include/python3.12/cpython/abstract.h +0 -206
- package/python/include/python3.12/cpython/bytearrayobject.h +0 -34
- package/python/include/python3.12/cpython/bytesobject.h +0 -133
- package/python/include/python3.12/cpython/cellobject.h +0 -44
- package/python/include/python3.12/cpython/ceval.h +0 -35
- package/python/include/python3.12/cpython/classobject.h +0 -71
- package/python/include/python3.12/cpython/code.h +0 -389
- package/python/include/python3.12/cpython/compile.h +0 -69
- package/python/include/python3.12/cpython/complexobject.h +0 -44
- package/python/include/python3.12/cpython/context.h +0 -78
- package/python/include/python3.12/cpython/descrobject.h +0 -64
- package/python/include/python3.12/cpython/dictobject.h +0 -118
- package/python/include/python3.12/cpython/fileobject.h +0 -19
- package/python/include/python3.12/cpython/fileutils.h +0 -8
- package/python/include/python3.12/cpython/floatobject.h +0 -27
- package/python/include/python3.12/cpython/frameobject.h +0 -29
- package/python/include/python3.12/cpython/funcobject.h +0 -190
- package/python/include/python3.12/cpython/genobject.h +0 -89
- package/python/include/python3.12/cpython/import.h +0 -46
- package/python/include/python3.12/cpython/initconfig.h +0 -256
- package/python/include/python3.12/cpython/interpreteridobject.h +0 -11
- package/python/include/python3.12/cpython/listobject.h +0 -47
- package/python/include/python3.12/cpython/longintrepr.h +0 -133
- package/python/include/python3.12/cpython/longobject.h +0 -100
- package/python/include/python3.12/cpython/memoryobject.h +0 -52
- package/python/include/python3.12/cpython/methodobject.h +0 -66
- package/python/include/python3.12/cpython/modsupport.h +0 -109
- package/python/include/python3.12/cpython/object.h +0 -575
- package/python/include/python3.12/cpython/objimpl.h +0 -95
- package/python/include/python3.12/cpython/odictobject.h +0 -43
- package/python/include/python3.12/cpython/picklebufobject.h +0 -31
- package/python/include/python3.12/cpython/pthread_stubs.h +0 -88
- package/python/include/python3.12/cpython/pyctype.h +0 -39
- package/python/include/python3.12/cpython/pydebug.h +0 -38
- package/python/include/python3.12/cpython/pyerrors.h +0 -178
- package/python/include/python3.12/cpython/pyfpe.h +0 -15
- package/python/include/python3.12/cpython/pyframe.h +0 -35
- package/python/include/python3.12/cpython/pylifecycle.h +0 -111
- package/python/include/python3.12/cpython/pymem.h +0 -98
- package/python/include/python3.12/cpython/pystate.h +0 -456
- package/python/include/python3.12/cpython/pythonrun.h +0 -121
- package/python/include/python3.12/cpython/pythread.h +0 -42
- package/python/include/python3.12/cpython/pytime.h +0 -331
- package/python/include/python3.12/cpython/setobject.h +0 -72
- package/python/include/python3.12/cpython/sysmodule.h +0 -16
- package/python/include/python3.12/cpython/traceback.h +0 -16
- package/python/include/python3.12/cpython/tupleobject.h +0 -39
- package/python/include/python3.12/cpython/unicodeobject.h +0 -976
- package/python/include/python3.12/cpython/warnings.h +0 -20
- package/python/include/python3.12/cpython/weakrefobject.h +0 -56
- package/python/include/python3.12/datetime.h +0 -267
- package/python/include/python3.12/descrobject.h +0 -100
- package/python/include/python3.12/dictobject.h +0 -97
- package/python/include/python3.12/dynamic_annotations.h +0 -499
- package/python/include/python3.12/enumobject.h +0 -17
- package/python/include/python3.12/errcode.h +0 -38
- package/python/include/python3.12/exports.h +0 -36
- package/python/include/python3.12/fileobject.h +0 -49
- package/python/include/python3.12/fileutils.h +0 -26
- package/python/include/python3.12/floatobject.h +0 -54
- package/python/include/python3.12/frameobject.h +0 -20
- package/python/include/python3.12/genericaliasobject.h +0 -14
- package/python/include/python3.12/import.h +0 -98
- package/python/include/python3.12/internal/pycore_abstract.h +0 -25
- package/python/include/python3.12/internal/pycore_asdl.h +0 -112
- package/python/include/python3.12/internal/pycore_ast.h +0 -922
- package/python/include/python3.12/internal/pycore_ast_state.h +0 -265
- package/python/include/python3.12/internal/pycore_atexit.h +0 -57
- package/python/include/python3.12/internal/pycore_atomic.h +0 -557
- package/python/include/python3.12/internal/pycore_atomic_funcs.h +0 -94
- package/python/include/python3.12/internal/pycore_bitutils.h +0 -186
- package/python/include/python3.12/internal/pycore_blocks_output_buffer.h +0 -317
- package/python/include/python3.12/internal/pycore_bytes_methods.h +0 -73
- package/python/include/python3.12/internal/pycore_bytesobject.h +0 -47
- package/python/include/python3.12/internal/pycore_call.h +0 -133
- package/python/include/python3.12/internal/pycore_ceval.h +0 -164
- package/python/include/python3.12/internal/pycore_ceval_state.h +0 -103
- package/python/include/python3.12/internal/pycore_code.h +0 -496
- package/python/include/python3.12/internal/pycore_compile.h +0 -118
- package/python/include/python3.12/internal/pycore_condvar.h +0 -99
- package/python/include/python3.12/internal/pycore_context.h +0 -71
- package/python/include/python3.12/internal/pycore_descrobject.h +0 -26
- package/python/include/python3.12/internal/pycore_dict.h +0 -199
- package/python/include/python3.12/internal/pycore_dict_state.h +0 -50
- package/python/include/python3.12/internal/pycore_dtoa.h +0 -69
- package/python/include/python3.12/internal/pycore_emscripten_signal.h +0 -25
- package/python/include/python3.12/internal/pycore_exceptions.h +0 -37
- package/python/include/python3.12/internal/pycore_faulthandler.h +0 -99
- package/python/include/python3.12/internal/pycore_fileutils.h +0 -292
- package/python/include/python3.12/internal/pycore_fileutils_windows.h +0 -98
- package/python/include/python3.12/internal/pycore_floatobject.h +0 -71
- package/python/include/python3.12/internal/pycore_flowgraph.h +0 -120
- package/python/include/python3.12/internal/pycore_format.h +0 -27
- package/python/include/python3.12/internal/pycore_frame.h +0 -283
- package/python/include/python3.12/internal/pycore_function.h +0 -26
- package/python/include/python3.12/internal/pycore_gc.h +0 -211
- package/python/include/python3.12/internal/pycore_genobject.h +0 -49
- package/python/include/python3.12/internal/pycore_getopt.h +0 -22
- package/python/include/python3.12/internal/pycore_gil.h +0 -50
- package/python/include/python3.12/internal/pycore_global_objects.h +0 -105
- package/python/include/python3.12/internal/pycore_global_objects_fini_generated.h +0 -1517
- package/python/include/python3.12/internal/pycore_global_strings.h +0 -777
- package/python/include/python3.12/internal/pycore_hamt.h +0 -134
- package/python/include/python3.12/internal/pycore_hashtable.h +0 -149
- package/python/include/python3.12/internal/pycore_import.h +0 -183
- package/python/include/python3.12/internal/pycore_initconfig.h +0 -179
- package/python/include/python3.12/internal/pycore_instruments.h +0 -106
- package/python/include/python3.12/internal/pycore_interp.h +0 -275
- package/python/include/python3.12/internal/pycore_intrinsics.h +0 -32
- package/python/include/python3.12/internal/pycore_list.h +0 -83
- package/python/include/python3.12/internal/pycore_long.h +0 -258
- package/python/include/python3.12/internal/pycore_memoryobject.h +0 -18
- package/python/include/python3.12/internal/pycore_moduleobject.h +0 -45
- package/python/include/python3.12/internal/pycore_namespace.h +0 -20
- package/python/include/python3.12/internal/pycore_object.h +0 -455
- package/python/include/python3.12/internal/pycore_object_state.h +0 -42
- package/python/include/python3.12/internal/pycore_obmalloc.h +0 -700
- package/python/include/python3.12/internal/pycore_obmalloc_init.h +0 -73
- package/python/include/python3.12/internal/pycore_opcode.h +0 -587
- package/python/include/python3.12/internal/pycore_opcode_utils.h +0 -92
- package/python/include/python3.12/internal/pycore_parser.h +0 -66
- package/python/include/python3.12/internal/pycore_pathconfig.h +0 -24
- package/python/include/python3.12/internal/pycore_pyarena.h +0 -64
- package/python/include/python3.12/internal/pycore_pyerrors.h +0 -129
- package/python/include/python3.12/internal/pycore_pyhash.h +0 -40
- package/python/include/python3.12/internal/pycore_pylifecycle.h +0 -99
- package/python/include/python3.12/internal/pycore_pymath.h +0 -205
- package/python/include/python3.12/internal/pycore_pymem.h +0 -98
- package/python/include/python3.12/internal/pycore_pymem_init.h +0 -85
- package/python/include/python3.12/internal/pycore_pystate.h +0 -180
- package/python/include/python3.12/internal/pycore_pythread.h +0 -81
- package/python/include/python3.12/internal/pycore_range.h +0 -21
- package/python/include/python3.12/internal/pycore_runtime.h +0 -235
- package/python/include/python3.12/internal/pycore_runtime_init.h +0 -188
- package/python/include/python3.12/internal/pycore_runtime_init_generated.h +0 -1511
- package/python/include/python3.12/internal/pycore_signal.h +0 -98
- package/python/include/python3.12/internal/pycore_sliceobject.h +0 -22
- package/python/include/python3.12/internal/pycore_strhex.h +0 -36
- package/python/include/python3.12/internal/pycore_structseq.h +0 -39
- package/python/include/python3.12/internal/pycore_symtable.h +0 -160
- package/python/include/python3.12/internal/pycore_sysmodule.h +0 -34
- package/python/include/python3.12/internal/pycore_time.h +0 -25
- package/python/include/python3.12/internal/pycore_token.h +0 -108
- package/python/include/python3.12/internal/pycore_traceback.h +0 -101
- package/python/include/python3.12/internal/pycore_tracemalloc.h +0 -123
- package/python/include/python3.12/internal/pycore_tuple.h +0 -79
- package/python/include/python3.12/internal/pycore_typeobject.h +0 -151
- package/python/include/python3.12/internal/pycore_typevarobject.h +0 -24
- package/python/include/python3.12/internal/pycore_ucnhash.h +0 -34
- package/python/include/python3.12/internal/pycore_unicodeobject.h +0 -86
- package/python/include/python3.12/internal/pycore_unicodeobject_generated.h +0 -2832
- package/python/include/python3.12/internal/pycore_unionobject.h +0 -23
- package/python/include/python3.12/internal/pycore_warnings.h +0 -29
- package/python/include/python3.12/interpreteridobject.h +0 -17
- package/python/include/python3.12/intrcheck.h +0 -30
- package/python/include/python3.12/iterobject.h +0 -27
- package/python/include/python3.12/listobject.h +0 -52
- package/python/include/python3.12/longobject.h +0 -108
- package/python/include/python3.12/marshal.h +0 -31
- package/python/include/python3.12/memoryobject.h +0 -34
- package/python/include/python3.12/methodobject.h +0 -132
- package/python/include/python3.12/modsupport.h +0 -168
- package/python/include/python3.12/moduleobject.h +0 -119
- package/python/include/python3.12/object.h +0 -993
- package/python/include/python3.12/objimpl.h +0 -234
- package/python/include/python3.12/opcode.h +0 -271
- package/python/include/python3.12/osdefs.h +0 -51
- package/python/include/python3.12/osmodule.h +0 -17
- package/python/include/python3.12/patchlevel.h +0 -35
- package/python/include/python3.12/py_curses.h +0 -99
- package/python/include/python3.12/pybuffer.h +0 -145
- package/python/include/python3.12/pycapsule.h +0 -59
- package/python/include/python3.12/pyconfig.h +0 -1943
- package/python/include/python3.12/pydtrace.h +0 -59
- package/python/include/python3.12/pyerrors.h +0 -337
- package/python/include/python3.12/pyexpat.h +0 -70
- package/python/include/python3.12/pyframe.h +0 -26
- package/python/include/python3.12/pyhash.h +0 -146
- package/python/include/python3.12/pylifecycle.h +0 -78
- package/python/include/python3.12/pymacconfig.h +0 -99
- package/python/include/python3.12/pymacro.h +0 -172
- package/python/include/python3.12/pymath.h +0 -62
- package/python/include/python3.12/pymem.h +0 -104
- package/python/include/python3.12/pyport.h +0 -782
- package/python/include/python3.12/pystate.h +0 -132
- package/python/include/python3.12/pystats.h +0 -110
- package/python/include/python3.12/pystrcmp.h +0 -23
- package/python/include/python3.12/pystrtod.h +0 -46
- package/python/include/python3.12/pythonrun.h +0 -49
- package/python/include/python3.12/pythread.h +0 -135
- package/python/include/python3.12/pytypedefs.h +0 -30
- package/python/include/python3.12/rangeobject.h +0 -27
- package/python/include/python3.12/setobject.h +0 -49
- package/python/include/python3.12/sliceobject.h +0 -65
- package/python/include/python3.12/structmember.h +0 -56
- package/python/include/python3.12/structseq.h +0 -49
- package/python/include/python3.12/sysmodule.h +0 -54
- package/python/include/python3.12/traceback.h +0 -26
- package/python/include/python3.12/tracemalloc.h +0 -77
- package/python/include/python3.12/tupleobject.h +0 -46
- package/python/include/python3.12/typeslots.h +0 -88
- package/python/include/python3.12/unicodeobject.h +0 -1020
- package/python/include/python3.12/warnings.h +0 -45
- package/python/include/python3.12/weakrefobject.h +0 -42
- package/python/lib/itcl4.3.8/itcl.tcl +0 -151
- package/python/lib/itcl4.3.8/itclConfig.sh +0 -67
- package/python/lib/itcl4.3.8/itclHullCmds.tcl +0 -562
- package/python/lib/itcl4.3.8/itclWidget.tcl +0 -447
- package/python/lib/itcl4.3.8/libitcl4.3.8.dylib +0 -0
- package/python/lib/itcl4.3.8/libitclstub.a +0 -0
- package/python/lib/itcl4.3.8/libitclstub4.3.8.a +0 -0
- package/python/lib/itcl4.3.8/libtcl9itcl4.3.8.dylib +0 -0
- package/python/lib/itcl4.3.8/pkgIndex.tcl +0 -14
- package/python/lib/libpython3.12.dylib +0 -0
- package/python/lib/libtcl9.0.dylib +0 -0
- package/python/lib/libtcl9tk9.0.dylib +0 -0
- package/python/lib/pkgconfig/python-3.12-embed.pc +0 -13
- package/python/lib/pkgconfig/python-3.12.pc +0 -13
- package/python/lib/pkgconfig/python3-embed.pc +0 -13
- package/python/lib/pkgconfig/python3.pc +0 -13
- package/python/lib/python3.12/config-3.12-darwin/Makefile +0 -3273
- package/python/lib/python3.12/config-3.12-darwin/Setup +0 -303
- package/python/lib/python3.12/config-3.12-darwin/Setup.bootstrap +0 -36
- package/python/lib/python3.12/config-3.12-darwin/Setup.local +0 -19
- package/python/lib/python3.12/config-3.12-darwin/Setup.stdlib +0 -183
- package/python/lib/python3.12/config-3.12-darwin/config.c +0 -246
- package/python/lib/python3.12/config-3.12-darwin/config.c.in +0 -71
- package/python/lib/python3.12/config-3.12-darwin/install-sh +0 -541
- package/python/lib/python3.12/config-3.12-darwin/makesetup +0 -353
- package/python/lib/python3.12/config-3.12-darwin/python-config.py +0 -76
- package/python/lib/python3.12/config-3.12-darwin/python.o +0 -0
- package/python/lib/python3.12/idlelib/CREDITS.txt +0 -47
- package/python/lib/python3.12/idlelib/ChangeLog +0 -1591
- package/python/lib/python3.12/idlelib/HISTORY.txt +0 -296
- package/python/lib/python3.12/idlelib/Icons/README.txt +0 -51
- package/python/lib/python3.12/idlelib/Icons/folder.gif +0 -0
- package/python/lib/python3.12/idlelib/Icons/idle.ico +0 -0
- package/python/lib/python3.12/idlelib/Icons/idle_16.gif +0 -0
- package/python/lib/python3.12/idlelib/Icons/idle_16.png +0 -0
- package/python/lib/python3.12/idlelib/Icons/idle_256.png +0 -0
- package/python/lib/python3.12/idlelib/Icons/idle_32.gif +0 -0
- package/python/lib/python3.12/idlelib/Icons/idle_32.png +0 -0
- package/python/lib/python3.12/idlelib/Icons/idle_48.gif +0 -0
- package/python/lib/python3.12/idlelib/Icons/idle_48.png +0 -0
- package/python/lib/python3.12/idlelib/Icons/minusnode.gif +0 -0
- package/python/lib/python3.12/idlelib/Icons/openfolder.gif +0 -0
- package/python/lib/python3.12/idlelib/Icons/plusnode.gif +0 -0
- package/python/lib/python3.12/idlelib/Icons/python.gif +0 -0
- package/python/lib/python3.12/idlelib/Icons/tk.gif +0 -0
- package/python/lib/python3.12/idlelib/NEWS2x.txt +0 -660
- package/python/lib/python3.12/idlelib/News3.txt +0 -1390
- package/python/lib/python3.12/idlelib/README.txt +0 -290
- package/python/lib/python3.12/idlelib/TODO.txt +0 -210
- package/python/lib/python3.12/idlelib/__init__.py +0 -10
- package/python/lib/python3.12/idlelib/__main__.py +0 -7
- package/python/lib/python3.12/idlelib/autocomplete.py +0 -228
- package/python/lib/python3.12/idlelib/autocomplete_w.py +0 -498
- package/python/lib/python3.12/idlelib/autoexpand.py +0 -96
- package/python/lib/python3.12/idlelib/browser.py +0 -260
- package/python/lib/python3.12/idlelib/calltip.py +0 -205
- package/python/lib/python3.12/idlelib/calltip_w.py +0 -202
- package/python/lib/python3.12/idlelib/codecontext.py +0 -270
- package/python/lib/python3.12/idlelib/colorizer.py +0 -384
- package/python/lib/python3.12/idlelib/config-extensions.def +0 -62
- package/python/lib/python3.12/idlelib/config-highlight.def +0 -105
- package/python/lib/python3.12/idlelib/config-keys.def +0 -309
- package/python/lib/python3.12/idlelib/config-main.def +0 -93
- package/python/lib/python3.12/idlelib/config.py +0 -917
- package/python/lib/python3.12/idlelib/config_key.py +0 -354
- package/python/lib/python3.12/idlelib/configdialog.py +0 -2408
- package/python/lib/python3.12/idlelib/debugger.py +0 -602
- package/python/lib/python3.12/idlelib/debugger_r.py +0 -390
- package/python/lib/python3.12/idlelib/debugobj.py +0 -146
- package/python/lib/python3.12/idlelib/debugobj_r.py +0 -41
- package/python/lib/python3.12/idlelib/delegator.py +0 -34
- package/python/lib/python3.12/idlelib/dynoption.py +0 -57
- package/python/lib/python3.12/idlelib/editor.py +0 -1767
- package/python/lib/python3.12/idlelib/extend.txt +0 -83
- package/python/lib/python3.12/idlelib/filelist.py +0 -132
- package/python/lib/python3.12/idlelib/format.py +0 -426
- package/python/lib/python3.12/idlelib/grep.py +0 -223
- package/python/lib/python3.12/idlelib/help.html +0 -805
- package/python/lib/python3.12/idlelib/help.py +0 -297
- package/python/lib/python3.12/idlelib/help_about.py +0 -211
- package/python/lib/python3.12/idlelib/history.py +0 -106
- package/python/lib/python3.12/idlelib/hyperparser.py +0 -312
- package/python/lib/python3.12/idlelib/idle.bat +0 -4
- package/python/lib/python3.12/idlelib/idle.py +0 -14
- package/python/lib/python3.12/idlelib/idle.pyw +0 -17
- package/python/lib/python3.12/idlelib/iomenu.py +0 -441
- package/python/lib/python3.12/idlelib/macosx.py +0 -278
- package/python/lib/python3.12/idlelib/mainmenu.py +0 -126
- package/python/lib/python3.12/idlelib/multicall.py +0 -451
- package/python/lib/python3.12/idlelib/outwin.py +0 -188
- package/python/lib/python3.12/idlelib/parenmatch.py +0 -183
- package/python/lib/python3.12/idlelib/pathbrowser.py +0 -107
- package/python/lib/python3.12/idlelib/percolator.py +0 -120
- package/python/lib/python3.12/idlelib/pyparse.py +0 -589
- package/python/lib/python3.12/idlelib/pyshell.py +0 -1694
- package/python/lib/python3.12/idlelib/query.py +0 -392
- package/python/lib/python3.12/idlelib/redirector.py +0 -173
- package/python/lib/python3.12/idlelib/replace.py +0 -300
- package/python/lib/python3.12/idlelib/rpc.py +0 -635
- package/python/lib/python3.12/idlelib/run.py +0 -646
- package/python/lib/python3.12/idlelib/runscript.py +0 -213
- package/python/lib/python3.12/idlelib/scrolledlist.py +0 -151
- package/python/lib/python3.12/idlelib/search.py +0 -165
- package/python/lib/python3.12/idlelib/searchbase.py +0 -210
- package/python/lib/python3.12/idlelib/searchengine.py +0 -235
- package/python/lib/python3.12/idlelib/sidebar.py +0 -544
- package/python/lib/python3.12/idlelib/squeezer.py +0 -345
- package/python/lib/python3.12/idlelib/stackviewer.py +0 -134
- package/python/lib/python3.12/idlelib/statusbar.py +0 -52
- package/python/lib/python3.12/idlelib/textview.py +0 -193
- package/python/lib/python3.12/idlelib/tooltip.py +0 -190
- package/python/lib/python3.12/idlelib/tree.py +0 -509
- package/python/lib/python3.12/idlelib/undo.py +0 -367
- package/python/lib/python3.12/idlelib/util.py +0 -37
- package/python/lib/python3.12/idlelib/window.py +0 -98
- package/python/lib/python3.12/idlelib/zoomheight.py +0 -124
- package/python/lib/python3.12/idlelib/zzdummy.py +0 -73
- package/python/lib/python3.12/lib-dynload/_tkinter.cpython-312-darwin.so +0 -0
- package/python/lib/python3.12/tkinter/__init__.py +0 -4682
- package/python/lib/python3.12/tkinter/__main__.py +0 -7
- package/python/lib/python3.12/tkinter/colorchooser.py +0 -86
- package/python/lib/python3.12/tkinter/commondialog.py +0 -53
- package/python/lib/python3.12/tkinter/constants.py +0 -110
- package/python/lib/python3.12/tkinter/dialog.py +0 -49
- package/python/lib/python3.12/tkinter/dnd.py +0 -324
- package/python/lib/python3.12/tkinter/filedialog.py +0 -492
- package/python/lib/python3.12/tkinter/font.py +0 -239
- package/python/lib/python3.12/tkinter/messagebox.py +0 -146
- package/python/lib/python3.12/tkinter/scrolledtext.py +0 -56
- package/python/lib/python3.12/tkinter/simpledialog.py +0 -441
- package/python/lib/python3.12/tkinter/tix.py +0 -1948
- package/python/lib/python3.12/tkinter/ttk.py +0 -1640
- package/python/lib/python3.12/turtle.py +0 -4207
- package/python/lib/python3.12/turtledemo/__init__.py +0 -14
- package/python/lib/python3.12/turtledemo/__main__.py +0 -404
- package/python/lib/python3.12/turtledemo/bytedesign.py +0 -161
- package/python/lib/python3.12/turtledemo/chaos.py +0 -59
- package/python/lib/python3.12/turtledemo/clock.py +0 -138
- package/python/lib/python3.12/turtledemo/colormixer.py +0 -58
- package/python/lib/python3.12/turtledemo/forest.py +0 -108
- package/python/lib/python3.12/turtledemo/fractalcurves.py +0 -138
- package/python/lib/python3.12/turtledemo/lindenmayer.py +0 -119
- package/python/lib/python3.12/turtledemo/minimal_hanoi.py +0 -79
- package/python/lib/python3.12/turtledemo/nim.py +0 -226
- package/python/lib/python3.12/turtledemo/paint.py +0 -54
- package/python/lib/python3.12/turtledemo/peace.py +0 -61
- package/python/lib/python3.12/turtledemo/penrose.py +0 -175
- package/python/lib/python3.12/turtledemo/planet_and_moon.py +0 -111
- package/python/lib/python3.12/turtledemo/rosette.py +0 -65
- package/python/lib/python3.12/turtledemo/round_dance.py +0 -86
- package/python/lib/python3.12/turtledemo/sorting_animate.py +0 -204
- package/python/lib/python3.12/turtledemo/tree.py +0 -62
- package/python/lib/python3.12/turtledemo/turtle.cfg +0 -10
- package/python/lib/python3.12/turtledemo/two_canvases.py +0 -54
- package/python/lib/python3.12/turtledemo/yinyang.py +0 -49
- package/python/lib/tcl9/9.0/http-2.10.2.tm +0 -5451
- package/python/lib/tcl9/9.0/msgcat-1.7.1.tm +0 -1349
- package/python/lib/tcl9/9.0/platform/shell-1.1.4.tm +0 -241
- package/python/lib/tcl9/9.0/platform-1.1.0.tm +0 -442
- package/python/lib/tcl9/9.0/tcltest-2.5.11.tm +0 -3600
- package/python/lib/tcl9.0/auto.tcl +0 -710
- package/python/lib/tcl9.0/clock.tcl +0 -2110
- package/python/lib/tcl9.0/cookiejar0.2/cookiejar.tcl +0 -746
- package/python/lib/tcl9.0/cookiejar0.2/idna.tcl +0 -292
- package/python/lib/tcl9.0/cookiejar0.2/pkgIndex.tcl +0 -3
- package/python/lib/tcl9.0/cookiejar0.2/public_suffix_list.dat.gz +0 -0
- package/python/lib/tcl9.0/encoding/ascii.enc +0 -20
- package/python/lib/tcl9.0/encoding/big5.enc +0 -1516
- package/python/lib/tcl9.0/encoding/cns11643.enc +0 -1584
- package/python/lib/tcl9.0/encoding/cp1250.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp1251.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp1252.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp1253.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp1254.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp1255.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp1256.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp1257.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp1258.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp165.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp437.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp737.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp775.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp850.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp852.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp855.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp857.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp860.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp861.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp862.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp863.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp864.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp865.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp866.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp869.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp874.enc +0 -20
- package/python/lib/tcl9.0/encoding/cp932.enc +0 -801
- package/python/lib/tcl9.0/encoding/cp936.enc +0 -2162
- package/python/lib/tcl9.0/encoding/cp949.enc +0 -2128
- package/python/lib/tcl9.0/encoding/cp950.enc +0 -1499
- package/python/lib/tcl9.0/encoding/dingbats.enc +0 -20
- package/python/lib/tcl9.0/encoding/ebcdic.enc +0 -20
- package/python/lib/tcl9.0/encoding/euc-cn.enc +0 -1397
- package/python/lib/tcl9.0/encoding/euc-jp.enc +0 -1353
- package/python/lib/tcl9.0/encoding/euc-kr.enc +0 -1533
- package/python/lib/tcl9.0/encoding/gb12345.enc +0 -1414
- package/python/lib/tcl9.0/encoding/gb1988.enc +0 -20
- package/python/lib/tcl9.0/encoding/gb2312-raw.enc +0 -1380
- package/python/lib/tcl9.0/encoding/gb2312.enc +0 -1397
- package/python/lib/tcl9.0/encoding/iso2022-jp.enc +0 -12
- package/python/lib/tcl9.0/encoding/iso2022-kr.enc +0 -7
- package/python/lib/tcl9.0/encoding/iso2022.enc +0 -14
- package/python/lib/tcl9.0/encoding/iso8859-1.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-10.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-11.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-13.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-14.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-15.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-16.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-2.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-3.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-4.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-5.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-6.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-7.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-8.enc +0 -20
- package/python/lib/tcl9.0/encoding/iso8859-9.enc +0 -20
- package/python/lib/tcl9.0/encoding/jis0201.enc +0 -20
- package/python/lib/tcl9.0/encoding/jis0208.enc +0 -1319
- package/python/lib/tcl9.0/encoding/jis0212.enc +0 -1159
- package/python/lib/tcl9.0/encoding/koi8-r.enc +0 -20
- package/python/lib/tcl9.0/encoding/koi8-ru.enc +0 -20
- package/python/lib/tcl9.0/encoding/koi8-t.enc +0 -20
- package/python/lib/tcl9.0/encoding/koi8-u.enc +0 -20
- package/python/lib/tcl9.0/encoding/ksc5601.enc +0 -1516
- package/python/lib/tcl9.0/encoding/macCentEuro.enc +0 -20
- package/python/lib/tcl9.0/encoding/macCroatian.enc +0 -20
- package/python/lib/tcl9.0/encoding/macCyrillic.enc +0 -20
- package/python/lib/tcl9.0/encoding/macDingbats.enc +0 -20
- package/python/lib/tcl9.0/encoding/macGreek.enc +0 -20
- package/python/lib/tcl9.0/encoding/macIceland.enc +0 -20
- package/python/lib/tcl9.0/encoding/macJapan.enc +0 -785
- package/python/lib/tcl9.0/encoding/macRoman.enc +0 -20
- package/python/lib/tcl9.0/encoding/macRomania.enc +0 -20
- package/python/lib/tcl9.0/encoding/macThai.enc +0 -20
- package/python/lib/tcl9.0/encoding/macTurkish.enc +0 -20
- package/python/lib/tcl9.0/encoding/macUkraine.enc +0 -20
- package/python/lib/tcl9.0/encoding/shiftjis.enc +0 -690
- package/python/lib/tcl9.0/encoding/symbol.enc +0 -20
- package/python/lib/tcl9.0/encoding/tis-620.enc +0 -20
- package/python/lib/tcl9.0/foreachline.tcl +0 -25
- package/python/lib/tcl9.0/history.tcl +0 -335
- package/python/lib/tcl9.0/icu.tcl +0 -145
- package/python/lib/tcl9.0/init.tcl +0 -772
- package/python/lib/tcl9.0/install.tcl +0 -274
- package/python/lib/tcl9.0/opt0.4/optparse.tcl +0 -1060
- package/python/lib/tcl9.0/opt0.4/pkgIndex.tcl +0 -12
- package/python/lib/tcl9.0/package.tcl +0 -776
- package/python/lib/tcl9.0/parray.tcl +0 -28
- package/python/lib/tcl9.0/readfile.tcl +0 -23
- package/python/lib/tcl9.0/safe.tcl +0 -1459
- package/python/lib/tcl9.0/tclAppInit.c +0 -183
- package/python/lib/tcl9.0/tclIndex +0 -112
- package/python/lib/tcl9.0/tm.tcl +0 -378
- package/python/lib/tcl9.0/word.tcl +0 -155
- package/python/lib/tcl9.0/writefile.tcl +0 -37
- package/python/lib/thread3.0.6/libtcl9thread3.0.6.dylib +0 -0
- package/python/lib/thread3.0.6/libthread3.0.6.dylib +0 -0
- package/python/lib/thread3.0.6/pkgIndex.tcl +0 -52
- package/python/lib/thread3.0.6/ttrace.tcl +0 -943
- package/python/lib/tk9.0/bgerror.tcl +0 -282
- package/python/lib/tk9.0/button.tcl +0 -782
- package/python/lib/tk9.0/choosedir.tcl +0 -310
- package/python/lib/tk9.0/clrpick.tcl +0 -696
- package/python/lib/tk9.0/comdlg.tcl +0 -322
- package/python/lib/tk9.0/console.tcl +0 -1148
- package/python/lib/tk9.0/dialog.tcl +0 -175
- package/python/lib/tk9.0/entry.tcl +0 -721
- package/python/lib/tk9.0/focus.tcl +0 -178
- package/python/lib/tk9.0/fontchooser.tcl +0 -512
- package/python/lib/tk9.0/iconbadges.tcl +0 -253
- package/python/lib/tk9.0/iconlist.tcl +0 -705
- package/python/lib/tk9.0/icons.tcl +0 -54
- package/python/lib/tk9.0/images/README +0 -7
- package/python/lib/tk9.0/images/logo.eps +0 -2091
- package/python/lib/tk9.0/images/logo100.gif +0 -0
- package/python/lib/tk9.0/images/logo64.gif +0 -0
- package/python/lib/tk9.0/images/logoLarge.gif +0 -0
- package/python/lib/tk9.0/images/logoMed.gif +0 -0
- package/python/lib/tk9.0/images/pwrdLogo.eps +0 -1897
- package/python/lib/tk9.0/images/pwrdLogo100.gif +0 -0
- package/python/lib/tk9.0/images/pwrdLogo150.gif +0 -0
- package/python/lib/tk9.0/images/pwrdLogo175.gif +0 -0
- package/python/lib/tk9.0/images/pwrdLogo200.gif +0 -0
- package/python/lib/tk9.0/images/pwrdLogo75.gif +0 -0
- package/python/lib/tk9.0/images/tai-ku.gif +0 -0
- package/python/lib/tk9.0/listbox.tcl +0 -522
- package/python/lib/tk9.0/megawidget.tcl +0 -297
- package/python/lib/tk9.0/menu.tcl +0 -1376
- package/python/lib/tk9.0/mkpsenc.tcl +0 -1488
- package/python/lib/tk9.0/msgbox.tcl +0 -454
- package/python/lib/tk9.0/optMenu.tcl +0 -43
- package/python/lib/tk9.0/palette.tcl +0 -283
- package/python/lib/tk9.0/panedwindow.tcl +0 -194
- package/python/lib/tk9.0/pkgIndex.tcl +0 -3
- package/python/lib/tk9.0/print.tcl +0 -1460
- package/python/lib/tk9.0/safetk.tcl +0 -262
- package/python/lib/tk9.0/scale.tcl +0 -299
- package/python/lib/tk9.0/scaling.tcl +0 -232
- package/python/lib/tk9.0/scrlbar.tcl +0 -506
- package/python/lib/tk9.0/spinbox.tcl +0 -590
- package/python/lib/tk9.0/systray.tcl +0 -483
- package/python/lib/tk9.0/tclIndex +0 -252
- package/python/lib/tk9.0/tearoff.tcl +0 -155
- package/python/lib/tk9.0/text.tcl +0 -1295
- package/python/lib/tk9.0/tk.tcl +0 -853
- package/python/lib/tk9.0/tkAppInit.c +0 -200
- package/python/lib/tk9.0/tkfbox.tcl +0 -1251
- package/python/lib/tk9.0/ttk/altTheme.tcl +0 -158
- package/python/lib/tk9.0/ttk/aquaTheme.tcl +0 -254
- package/python/lib/tk9.0/ttk/button.tcl +0 -83
- package/python/lib/tk9.0/ttk/clamTheme.tcl +0 -200
- package/python/lib/tk9.0/ttk/classicTheme.tcl +0 -165
- package/python/lib/tk9.0/ttk/combobox.tcl +0 -555
- package/python/lib/tk9.0/ttk/cursors.tcl +0 -205
- package/python/lib/tk9.0/ttk/defaults.tcl +0 -250
- package/python/lib/tk9.0/ttk/entry.tcl +0 -678
- package/python/lib/tk9.0/ttk/fonts.tcl +0 -152
- package/python/lib/tk9.0/ttk/menubutton.tcl +0 -237
- package/python/lib/tk9.0/ttk/notebook.tcl +0 -261
- package/python/lib/tk9.0/ttk/panedwindow.tcl +0 -89
- package/python/lib/tk9.0/ttk/progress.tcl +0 -55
- package/python/lib/tk9.0/ttk/scale.tcl +0 -94
- package/python/lib/tk9.0/ttk/scrollbar.tcl +0 -119
- package/python/lib/tk9.0/ttk/sizegrip.tcl +0 -102
- package/python/lib/tk9.0/ttk/spinbox.tcl +0 -204
- package/python/lib/tk9.0/ttk/treeview.tcl +0 -464
- package/python/lib/tk9.0/ttk/ttk.tcl +0 -220
- package/python/lib/tk9.0/ttk/utils.tcl +0 -317
- package/python/lib/tk9.0/ttk/vistaTheme.tcl +0 -260
- package/python/lib/tk9.0/ttk/winTheme.tcl +0 -123
- package/python/lib/tk9.0/ttk/xpTheme.tcl +0 -99
- package/python/lib/tk9.0/xmfbox.tcl +0 -982
- package/python/share/man/man1/python.1 +0 -630
- package/python/share/man/man1/python3.1 +0 -630
- package/python/share/man/man1/python3.12.1 +0 -630
- /package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/WHEEL +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/entry_points.txt +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/licenses/NOTICE +0 -0
- /package/modules/{simplex_localmodels-0.1.0.dev31.dist-info → simplex_localmodels-0.1.0.dev32.dist-info}/licenses/localmodels/HERMES-LICENSE +0 -0
|
@@ -1,498 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
An auto-completion window for IDLE, used by the autocomplete extension
|
|
3
|
-
"""
|
|
4
|
-
import platform
|
|
5
|
-
|
|
6
|
-
from tkinter import *
|
|
7
|
-
from tkinter.ttk import Scrollbar
|
|
8
|
-
|
|
9
|
-
from idlelib.autocomplete import FILES, ATTRS
|
|
10
|
-
from idlelib.multicall import MC_SHIFT
|
|
11
|
-
|
|
12
|
-
HIDE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-hide>>"
|
|
13
|
-
HIDE_FOCUS_OUT_SEQUENCE = "<FocusOut>"
|
|
14
|
-
HIDE_SEQUENCES = (HIDE_FOCUS_OUT_SEQUENCE, "<ButtonPress>")
|
|
15
|
-
KEYPRESS_VIRTUAL_EVENT_NAME = "<<autocompletewindow-keypress>>"
|
|
16
|
-
# We need to bind event beyond <Key> so that the function will be called
|
|
17
|
-
# before the default specific IDLE function
|
|
18
|
-
KEYPRESS_SEQUENCES = ("<Key>", "<Key-BackSpace>", "<Key-Return>", "<Key-Tab>",
|
|
19
|
-
"<Key-Up>", "<Key-Down>", "<Key-Home>", "<Key-End>",
|
|
20
|
-
"<Key-Prior>", "<Key-Next>", "<Key-Escape>")
|
|
21
|
-
KEYRELEASE_VIRTUAL_EVENT_NAME = "<<autocompletewindow-keyrelease>>"
|
|
22
|
-
KEYRELEASE_SEQUENCE = "<KeyRelease>"
|
|
23
|
-
LISTUPDATE_SEQUENCE = "<B1-ButtonRelease>"
|
|
24
|
-
WINCONFIG_SEQUENCE = "<Configure>"
|
|
25
|
-
DOUBLECLICK_SEQUENCE = "<B1-Double-ButtonRelease>"
|
|
26
|
-
|
|
27
|
-
class AutoCompleteWindow:
|
|
28
|
-
|
|
29
|
-
def __init__(self, widget, tags):
|
|
30
|
-
# The widget (Text) on which we place the AutoCompleteWindow
|
|
31
|
-
self.widget = widget
|
|
32
|
-
# Tags to mark inserted text with
|
|
33
|
-
self.tags = tags
|
|
34
|
-
# The widgets we create
|
|
35
|
-
self.autocompletewindow = self.listbox = self.scrollbar = None
|
|
36
|
-
# The default foreground and background of a selection. Saved because
|
|
37
|
-
# they are changed to the regular colors of list items when the
|
|
38
|
-
# completion start is not a prefix of the selected completion
|
|
39
|
-
self.origselforeground = self.origselbackground = None
|
|
40
|
-
# The list of completions
|
|
41
|
-
self.completions = None
|
|
42
|
-
# A list with more completions, or None
|
|
43
|
-
self.morecompletions = None
|
|
44
|
-
# The completion mode, either autocomplete.ATTRS or .FILES.
|
|
45
|
-
self.mode = None
|
|
46
|
-
# The current completion start, on the text box (a string)
|
|
47
|
-
self.start = None
|
|
48
|
-
# The index of the start of the completion
|
|
49
|
-
self.startindex = None
|
|
50
|
-
# The last typed start, used so that when the selection changes,
|
|
51
|
-
# the new start will be as close as possible to the last typed one.
|
|
52
|
-
self.lasttypedstart = None
|
|
53
|
-
# Do we have an indication that the user wants the completion window
|
|
54
|
-
# (for example, he clicked the list)
|
|
55
|
-
self.userwantswindow = None
|
|
56
|
-
# event ids
|
|
57
|
-
self.hideid = self.keypressid = self.listupdateid = \
|
|
58
|
-
self.winconfigid = self.keyreleaseid = self.doubleclickid = None
|
|
59
|
-
# Flag set if last keypress was a tab
|
|
60
|
-
self.lastkey_was_tab = False
|
|
61
|
-
# Flag set to avoid recursive <Configure> callback invocations.
|
|
62
|
-
self.is_configuring = False
|
|
63
|
-
|
|
64
|
-
def _change_start(self, newstart):
|
|
65
|
-
min_len = min(len(self.start), len(newstart))
|
|
66
|
-
i = 0
|
|
67
|
-
while i < min_len and self.start[i] == newstart[i]:
|
|
68
|
-
i += 1
|
|
69
|
-
if i < len(self.start):
|
|
70
|
-
self.widget.delete("%s+%dc" % (self.startindex, i),
|
|
71
|
-
"%s+%dc" % (self.startindex, len(self.start)))
|
|
72
|
-
if i < len(newstart):
|
|
73
|
-
self.widget.insert("%s+%dc" % (self.startindex, i),
|
|
74
|
-
newstart[i:],
|
|
75
|
-
self.tags)
|
|
76
|
-
self.start = newstart
|
|
77
|
-
|
|
78
|
-
def _binary_search(self, s):
|
|
79
|
-
"""Find the first index in self.completions where completions[i] is
|
|
80
|
-
greater or equal to s, or the last index if there is no such.
|
|
81
|
-
"""
|
|
82
|
-
i = 0; j = len(self.completions)
|
|
83
|
-
while j > i:
|
|
84
|
-
m = (i + j) // 2
|
|
85
|
-
if self.completions[m] >= s:
|
|
86
|
-
j = m
|
|
87
|
-
else:
|
|
88
|
-
i = m + 1
|
|
89
|
-
return min(i, len(self.completions)-1)
|
|
90
|
-
|
|
91
|
-
def _complete_string(self, s):
|
|
92
|
-
"""Assuming that s is the prefix of a string in self.completions,
|
|
93
|
-
return the longest string which is a prefix of all the strings which
|
|
94
|
-
s is a prefix of them. If s is not a prefix of a string, return s.
|
|
95
|
-
"""
|
|
96
|
-
first = self._binary_search(s)
|
|
97
|
-
if self.completions[first][:len(s)] != s:
|
|
98
|
-
# There is not even one completion which s is a prefix of.
|
|
99
|
-
return s
|
|
100
|
-
# Find the end of the range of completions where s is a prefix of.
|
|
101
|
-
i = first + 1
|
|
102
|
-
j = len(self.completions)
|
|
103
|
-
while j > i:
|
|
104
|
-
m = (i + j) // 2
|
|
105
|
-
if self.completions[m][:len(s)] != s:
|
|
106
|
-
j = m
|
|
107
|
-
else:
|
|
108
|
-
i = m + 1
|
|
109
|
-
last = i-1
|
|
110
|
-
|
|
111
|
-
if first == last: # only one possible completion
|
|
112
|
-
return self.completions[first]
|
|
113
|
-
|
|
114
|
-
# We should return the maximum prefix of first and last
|
|
115
|
-
first_comp = self.completions[first]
|
|
116
|
-
last_comp = self.completions[last]
|
|
117
|
-
min_len = min(len(first_comp), len(last_comp))
|
|
118
|
-
i = len(s)
|
|
119
|
-
while i < min_len and first_comp[i] == last_comp[i]:
|
|
120
|
-
i += 1
|
|
121
|
-
return first_comp[:i]
|
|
122
|
-
|
|
123
|
-
def _selection_changed(self):
|
|
124
|
-
"""Call when the selection of the Listbox has changed.
|
|
125
|
-
|
|
126
|
-
Updates the Listbox display and calls _change_start.
|
|
127
|
-
"""
|
|
128
|
-
cursel = int(self.listbox.curselection()[0])
|
|
129
|
-
|
|
130
|
-
self.listbox.see(cursel)
|
|
131
|
-
|
|
132
|
-
lts = self.lasttypedstart
|
|
133
|
-
selstart = self.completions[cursel]
|
|
134
|
-
if self._binary_search(lts) == cursel:
|
|
135
|
-
newstart = lts
|
|
136
|
-
else:
|
|
137
|
-
min_len = min(len(lts), len(selstart))
|
|
138
|
-
i = 0
|
|
139
|
-
while i < min_len and lts[i] == selstart[i]:
|
|
140
|
-
i += 1
|
|
141
|
-
newstart = selstart[:i]
|
|
142
|
-
self._change_start(newstart)
|
|
143
|
-
|
|
144
|
-
if self.completions[cursel][:len(self.start)] == self.start:
|
|
145
|
-
# start is a prefix of the selected completion
|
|
146
|
-
self.listbox.configure(selectbackground=self.origselbackground,
|
|
147
|
-
selectforeground=self.origselforeground)
|
|
148
|
-
else:
|
|
149
|
-
self.listbox.configure(selectbackground=self.listbox.cget("bg"),
|
|
150
|
-
selectforeground=self.listbox.cget("fg"))
|
|
151
|
-
# If there are more completions, show them, and call me again.
|
|
152
|
-
if self.morecompletions:
|
|
153
|
-
self.completions = self.morecompletions
|
|
154
|
-
self.morecompletions = None
|
|
155
|
-
self.listbox.delete(0, END)
|
|
156
|
-
for item in self.completions:
|
|
157
|
-
self.listbox.insert(END, item)
|
|
158
|
-
self.listbox.select_set(self._binary_search(self.start))
|
|
159
|
-
self._selection_changed()
|
|
160
|
-
|
|
161
|
-
def show_window(self, comp_lists, index, complete, mode, userWantsWin):
|
|
162
|
-
"""Show the autocomplete list, bind events.
|
|
163
|
-
|
|
164
|
-
If complete is True, complete the text, and if there is exactly
|
|
165
|
-
one matching completion, don't open a list.
|
|
166
|
-
"""
|
|
167
|
-
# Handle the start we already have
|
|
168
|
-
self.completions, self.morecompletions = comp_lists
|
|
169
|
-
self.mode = mode
|
|
170
|
-
self.startindex = self.widget.index(index)
|
|
171
|
-
self.start = self.widget.get(self.startindex, "insert")
|
|
172
|
-
if complete:
|
|
173
|
-
completed = self._complete_string(self.start)
|
|
174
|
-
start = self.start
|
|
175
|
-
self._change_start(completed)
|
|
176
|
-
i = self._binary_search(completed)
|
|
177
|
-
if self.completions[i] == completed and \
|
|
178
|
-
(i == len(self.completions)-1 or
|
|
179
|
-
self.completions[i+1][:len(completed)] != completed):
|
|
180
|
-
# There is exactly one matching completion
|
|
181
|
-
return completed == start
|
|
182
|
-
self.userwantswindow = userWantsWin
|
|
183
|
-
self.lasttypedstart = self.start
|
|
184
|
-
|
|
185
|
-
self.autocompletewindow = acw = Toplevel(self.widget)
|
|
186
|
-
acw.withdraw()
|
|
187
|
-
acw.wm_overrideredirect(1)
|
|
188
|
-
try:
|
|
189
|
-
# Prevent grabbing focus on macOS.
|
|
190
|
-
acw.tk.call("::tk::unsupported::MacWindowStyle", "style", acw._w,
|
|
191
|
-
"help", "noActivates")
|
|
192
|
-
except TclError:
|
|
193
|
-
pass
|
|
194
|
-
self.scrollbar = scrollbar = Scrollbar(acw, orient=VERTICAL)
|
|
195
|
-
self.listbox = listbox = Listbox(acw, yscrollcommand=scrollbar.set,
|
|
196
|
-
exportselection=False)
|
|
197
|
-
for item in self.completions:
|
|
198
|
-
listbox.insert(END, item)
|
|
199
|
-
self.origselforeground = listbox.cget("selectforeground")
|
|
200
|
-
self.origselbackground = listbox.cget("selectbackground")
|
|
201
|
-
scrollbar.config(command=listbox.yview)
|
|
202
|
-
scrollbar.pack(side=RIGHT, fill=Y)
|
|
203
|
-
listbox.pack(side=LEFT, fill=BOTH, expand=True)
|
|
204
|
-
#acw.update_idletasks() # Need for tk8.6.8 on macOS: #40128.
|
|
205
|
-
acw.lift() # work around bug in Tk 8.5.18+ (issue #24570)
|
|
206
|
-
|
|
207
|
-
# Initialize the listbox selection
|
|
208
|
-
self.listbox.select_set(self._binary_search(self.start))
|
|
209
|
-
self._selection_changed()
|
|
210
|
-
|
|
211
|
-
# bind events
|
|
212
|
-
self.hideaid = acw.bind(HIDE_VIRTUAL_EVENT_NAME, self.hide_event)
|
|
213
|
-
self.hidewid = self.widget.bind(HIDE_VIRTUAL_EVENT_NAME, self.hide_event)
|
|
214
|
-
acw.event_add(HIDE_VIRTUAL_EVENT_NAME, HIDE_FOCUS_OUT_SEQUENCE)
|
|
215
|
-
for seq in HIDE_SEQUENCES:
|
|
216
|
-
self.widget.event_add(HIDE_VIRTUAL_EVENT_NAME, seq)
|
|
217
|
-
|
|
218
|
-
self.keypressid = self.widget.bind(KEYPRESS_VIRTUAL_EVENT_NAME,
|
|
219
|
-
self.keypress_event)
|
|
220
|
-
for seq in KEYPRESS_SEQUENCES:
|
|
221
|
-
self.widget.event_add(KEYPRESS_VIRTUAL_EVENT_NAME, seq)
|
|
222
|
-
self.keyreleaseid = self.widget.bind(KEYRELEASE_VIRTUAL_EVENT_NAME,
|
|
223
|
-
self.keyrelease_event)
|
|
224
|
-
self.widget.event_add(KEYRELEASE_VIRTUAL_EVENT_NAME,KEYRELEASE_SEQUENCE)
|
|
225
|
-
self.listupdateid = listbox.bind(LISTUPDATE_SEQUENCE,
|
|
226
|
-
self.listselect_event)
|
|
227
|
-
self.is_configuring = False
|
|
228
|
-
self.winconfigid = acw.bind(WINCONFIG_SEQUENCE, self.winconfig_event)
|
|
229
|
-
self.doubleclickid = listbox.bind(DOUBLECLICK_SEQUENCE,
|
|
230
|
-
self.doubleclick_event)
|
|
231
|
-
return None
|
|
232
|
-
|
|
233
|
-
def winconfig_event(self, event):
|
|
234
|
-
if self.is_configuring:
|
|
235
|
-
# Avoid running on recursive <Configure> callback invocations.
|
|
236
|
-
return
|
|
237
|
-
|
|
238
|
-
self.is_configuring = True
|
|
239
|
-
if not self.is_active():
|
|
240
|
-
return
|
|
241
|
-
|
|
242
|
-
# Since the <Configure> event may occur after the completion window is gone,
|
|
243
|
-
# catch potential TclError exceptions when accessing acw. See: bpo-41611.
|
|
244
|
-
try:
|
|
245
|
-
# Position the completion list window
|
|
246
|
-
text = self.widget
|
|
247
|
-
text.see(self.startindex)
|
|
248
|
-
x, y, cx, cy = text.bbox(self.startindex)
|
|
249
|
-
acw = self.autocompletewindow
|
|
250
|
-
if platform.system().startswith('Windows'):
|
|
251
|
-
# On Windows an update() call is needed for the completion
|
|
252
|
-
# list window to be created, so that we can fetch its width
|
|
253
|
-
# and height. However, this is not needed on other platforms
|
|
254
|
-
# (tested on Ubuntu and macOS) but at one point began
|
|
255
|
-
# causing freezes on macOS. See issues 37849 and 41611.
|
|
256
|
-
acw.update()
|
|
257
|
-
acw_width, acw_height = acw.winfo_width(), acw.winfo_height()
|
|
258
|
-
text_width, text_height = text.winfo_width(), text.winfo_height()
|
|
259
|
-
new_x = text.winfo_rootx() + min(x, max(0, text_width - acw_width))
|
|
260
|
-
new_y = text.winfo_rooty() + y
|
|
261
|
-
if (text_height - (y + cy) >= acw_height # enough height below
|
|
262
|
-
or y < acw_height): # not enough height above
|
|
263
|
-
# place acw below current line
|
|
264
|
-
new_y += cy
|
|
265
|
-
else:
|
|
266
|
-
# place acw above current line
|
|
267
|
-
new_y -= acw_height
|
|
268
|
-
acw.wm_geometry("+%d+%d" % (new_x, new_y))
|
|
269
|
-
acw.deiconify()
|
|
270
|
-
acw.update_idletasks()
|
|
271
|
-
except TclError:
|
|
272
|
-
pass
|
|
273
|
-
|
|
274
|
-
if platform.system().startswith('Windows'):
|
|
275
|
-
# See issue 15786. When on Windows platform, Tk will misbehave
|
|
276
|
-
# to call winconfig_event multiple times, we need to prevent this,
|
|
277
|
-
# otherwise mouse button double click will not be able to used.
|
|
278
|
-
try:
|
|
279
|
-
acw.unbind(WINCONFIG_SEQUENCE, self.winconfigid)
|
|
280
|
-
except TclError:
|
|
281
|
-
pass
|
|
282
|
-
self.winconfigid = None
|
|
283
|
-
|
|
284
|
-
self.is_configuring = False
|
|
285
|
-
|
|
286
|
-
def _hide_event_check(self):
|
|
287
|
-
if not self.autocompletewindow:
|
|
288
|
-
return
|
|
289
|
-
|
|
290
|
-
try:
|
|
291
|
-
if not self.autocompletewindow.focus_get():
|
|
292
|
-
self.hide_window()
|
|
293
|
-
except KeyError:
|
|
294
|
-
# See issue 734176, when user click on menu, acw.focus_get()
|
|
295
|
-
# will get KeyError.
|
|
296
|
-
self.hide_window()
|
|
297
|
-
|
|
298
|
-
def hide_event(self, event):
|
|
299
|
-
# Hide autocomplete list if it exists and does not have focus or
|
|
300
|
-
# mouse click on widget / text area.
|
|
301
|
-
if self.is_active():
|
|
302
|
-
if event.type == EventType.FocusOut:
|
|
303
|
-
# On Windows platform, it will need to delay the check for
|
|
304
|
-
# acw.focus_get() when click on acw, otherwise it will return
|
|
305
|
-
# None and close the window
|
|
306
|
-
self.widget.after(1, self._hide_event_check)
|
|
307
|
-
elif event.type == EventType.ButtonPress:
|
|
308
|
-
# ButtonPress event only bind to self.widget
|
|
309
|
-
self.hide_window()
|
|
310
|
-
|
|
311
|
-
def listselect_event(self, event):
|
|
312
|
-
if self.is_active():
|
|
313
|
-
self.userwantswindow = True
|
|
314
|
-
cursel = int(self.listbox.curselection()[0])
|
|
315
|
-
self._change_start(self.completions[cursel])
|
|
316
|
-
|
|
317
|
-
def doubleclick_event(self, event):
|
|
318
|
-
# Put the selected completion in the text, and close the list
|
|
319
|
-
cursel = int(self.listbox.curselection()[0])
|
|
320
|
-
self._change_start(self.completions[cursel])
|
|
321
|
-
self.hide_window()
|
|
322
|
-
|
|
323
|
-
def keypress_event(self, event):
|
|
324
|
-
if not self.is_active():
|
|
325
|
-
return None
|
|
326
|
-
keysym = event.keysym
|
|
327
|
-
if hasattr(event, "mc_state"):
|
|
328
|
-
state = event.mc_state
|
|
329
|
-
else:
|
|
330
|
-
state = 0
|
|
331
|
-
if keysym != "Tab":
|
|
332
|
-
self.lastkey_was_tab = False
|
|
333
|
-
if (len(keysym) == 1 or keysym in ("underscore", "BackSpace")
|
|
334
|
-
or (self.mode == FILES and keysym in
|
|
335
|
-
("period", "minus"))) \
|
|
336
|
-
and not (state & ~MC_SHIFT):
|
|
337
|
-
# Normal editing of text
|
|
338
|
-
if len(keysym) == 1:
|
|
339
|
-
self._change_start(self.start + keysym)
|
|
340
|
-
elif keysym == "underscore":
|
|
341
|
-
self._change_start(self.start + '_')
|
|
342
|
-
elif keysym == "period":
|
|
343
|
-
self._change_start(self.start + '.')
|
|
344
|
-
elif keysym == "minus":
|
|
345
|
-
self._change_start(self.start + '-')
|
|
346
|
-
else:
|
|
347
|
-
# keysym == "BackSpace"
|
|
348
|
-
if len(self.start) == 0:
|
|
349
|
-
self.hide_window()
|
|
350
|
-
return None
|
|
351
|
-
self._change_start(self.start[:-1])
|
|
352
|
-
self.lasttypedstart = self.start
|
|
353
|
-
self.listbox.select_clear(0, int(self.listbox.curselection()[0]))
|
|
354
|
-
self.listbox.select_set(self._binary_search(self.start))
|
|
355
|
-
self._selection_changed()
|
|
356
|
-
return "break"
|
|
357
|
-
|
|
358
|
-
elif keysym == "Return":
|
|
359
|
-
self.complete()
|
|
360
|
-
self.hide_window()
|
|
361
|
-
return 'break'
|
|
362
|
-
|
|
363
|
-
elif (self.mode == ATTRS and keysym in
|
|
364
|
-
("period", "space", "parenleft", "parenright", "bracketleft",
|
|
365
|
-
"bracketright")) or \
|
|
366
|
-
(self.mode == FILES and keysym in
|
|
367
|
-
("slash", "backslash", "quotedbl", "apostrophe")) \
|
|
368
|
-
and not (state & ~MC_SHIFT):
|
|
369
|
-
# If start is a prefix of the selection, but is not '' when
|
|
370
|
-
# completing file names, put the whole
|
|
371
|
-
# selected completion. Anyway, close the list.
|
|
372
|
-
cursel = int(self.listbox.curselection()[0])
|
|
373
|
-
if self.completions[cursel][:len(self.start)] == self.start \
|
|
374
|
-
and (self.mode == ATTRS or self.start):
|
|
375
|
-
self._change_start(self.completions[cursel])
|
|
376
|
-
self.hide_window()
|
|
377
|
-
return None
|
|
378
|
-
|
|
379
|
-
elif keysym in ("Home", "End", "Prior", "Next", "Up", "Down") and \
|
|
380
|
-
not state:
|
|
381
|
-
# Move the selection in the listbox
|
|
382
|
-
self.userwantswindow = True
|
|
383
|
-
cursel = int(self.listbox.curselection()[0])
|
|
384
|
-
if keysym == "Home":
|
|
385
|
-
newsel = 0
|
|
386
|
-
elif keysym == "End":
|
|
387
|
-
newsel = len(self.completions)-1
|
|
388
|
-
elif keysym in ("Prior", "Next"):
|
|
389
|
-
jump = self.listbox.nearest(self.listbox.winfo_height()) - \
|
|
390
|
-
self.listbox.nearest(0)
|
|
391
|
-
if keysym == "Prior":
|
|
392
|
-
newsel = max(0, cursel-jump)
|
|
393
|
-
else:
|
|
394
|
-
assert keysym == "Next"
|
|
395
|
-
newsel = min(len(self.completions)-1, cursel+jump)
|
|
396
|
-
elif keysym == "Up":
|
|
397
|
-
newsel = max(0, cursel-1)
|
|
398
|
-
else:
|
|
399
|
-
assert keysym == "Down"
|
|
400
|
-
newsel = min(len(self.completions)-1, cursel+1)
|
|
401
|
-
self.listbox.select_clear(cursel)
|
|
402
|
-
self.listbox.select_set(newsel)
|
|
403
|
-
self._selection_changed()
|
|
404
|
-
self._change_start(self.completions[newsel])
|
|
405
|
-
return "break"
|
|
406
|
-
|
|
407
|
-
elif (keysym == "Tab" and not state):
|
|
408
|
-
if self.lastkey_was_tab:
|
|
409
|
-
# two tabs in a row; insert current selection and close acw
|
|
410
|
-
cursel = int(self.listbox.curselection()[0])
|
|
411
|
-
self._change_start(self.completions[cursel])
|
|
412
|
-
self.hide_window()
|
|
413
|
-
return "break"
|
|
414
|
-
else:
|
|
415
|
-
# first tab; let AutoComplete handle the completion
|
|
416
|
-
self.userwantswindow = True
|
|
417
|
-
self.lastkey_was_tab = True
|
|
418
|
-
return None
|
|
419
|
-
|
|
420
|
-
elif any(s in keysym for s in ("Shift", "Control", "Alt",
|
|
421
|
-
"Meta", "Command", "Option")):
|
|
422
|
-
# A modifier key, so ignore
|
|
423
|
-
return None
|
|
424
|
-
|
|
425
|
-
elif event.char and event.char >= ' ':
|
|
426
|
-
# Regular character with a non-length-1 keycode
|
|
427
|
-
self._change_start(self.start + event.char)
|
|
428
|
-
self.lasttypedstart = self.start
|
|
429
|
-
self.listbox.select_clear(0, int(self.listbox.curselection()[0]))
|
|
430
|
-
self.listbox.select_set(self._binary_search(self.start))
|
|
431
|
-
self._selection_changed()
|
|
432
|
-
return "break"
|
|
433
|
-
|
|
434
|
-
else:
|
|
435
|
-
# Unknown event, close the window and let it through.
|
|
436
|
-
self.hide_window()
|
|
437
|
-
return None
|
|
438
|
-
|
|
439
|
-
def keyrelease_event(self, event):
|
|
440
|
-
if not self.is_active():
|
|
441
|
-
return
|
|
442
|
-
if self.widget.index("insert") != \
|
|
443
|
-
self.widget.index("%s+%dc" % (self.startindex, len(self.start))):
|
|
444
|
-
# If we didn't catch an event which moved the insert, close window
|
|
445
|
-
self.hide_window()
|
|
446
|
-
|
|
447
|
-
def is_active(self):
|
|
448
|
-
return self.autocompletewindow is not None
|
|
449
|
-
|
|
450
|
-
def complete(self):
|
|
451
|
-
self._change_start(self._complete_string(self.start))
|
|
452
|
-
# The selection doesn't change.
|
|
453
|
-
|
|
454
|
-
def hide_window(self):
|
|
455
|
-
if not self.is_active():
|
|
456
|
-
return
|
|
457
|
-
|
|
458
|
-
# unbind events
|
|
459
|
-
self.autocompletewindow.event_delete(HIDE_VIRTUAL_EVENT_NAME,
|
|
460
|
-
HIDE_FOCUS_OUT_SEQUENCE)
|
|
461
|
-
for seq in HIDE_SEQUENCES:
|
|
462
|
-
self.widget.event_delete(HIDE_VIRTUAL_EVENT_NAME, seq)
|
|
463
|
-
|
|
464
|
-
self.autocompletewindow.unbind(HIDE_VIRTUAL_EVENT_NAME, self.hideaid)
|
|
465
|
-
self.widget.unbind(HIDE_VIRTUAL_EVENT_NAME, self.hidewid)
|
|
466
|
-
self.hideaid = None
|
|
467
|
-
self.hidewid = None
|
|
468
|
-
for seq in KEYPRESS_SEQUENCES:
|
|
469
|
-
self.widget.event_delete(KEYPRESS_VIRTUAL_EVENT_NAME, seq)
|
|
470
|
-
self.widget.unbind(KEYPRESS_VIRTUAL_EVENT_NAME, self.keypressid)
|
|
471
|
-
self.keypressid = None
|
|
472
|
-
self.widget.event_delete(KEYRELEASE_VIRTUAL_EVENT_NAME,
|
|
473
|
-
KEYRELEASE_SEQUENCE)
|
|
474
|
-
self.widget.unbind(KEYRELEASE_VIRTUAL_EVENT_NAME, self.keyreleaseid)
|
|
475
|
-
self.keyreleaseid = None
|
|
476
|
-
self.listbox.unbind(LISTUPDATE_SEQUENCE, self.listupdateid)
|
|
477
|
-
self.listupdateid = None
|
|
478
|
-
if self.winconfigid:
|
|
479
|
-
self.autocompletewindow.unbind(WINCONFIG_SEQUENCE, self.winconfigid)
|
|
480
|
-
self.winconfigid = None
|
|
481
|
-
|
|
482
|
-
# Re-focusOn frame.text (See issue #15786)
|
|
483
|
-
self.widget.focus_set()
|
|
484
|
-
|
|
485
|
-
# destroy widgets
|
|
486
|
-
self.scrollbar.destroy()
|
|
487
|
-
self.scrollbar = None
|
|
488
|
-
self.listbox.destroy()
|
|
489
|
-
self.listbox = None
|
|
490
|
-
self.autocompletewindow.destroy()
|
|
491
|
-
self.autocompletewindow = None
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
if __name__ == '__main__':
|
|
495
|
-
from unittest import main
|
|
496
|
-
main('idlelib.idle_test.test_autocomplete_w', verbosity=2, exit=False)
|
|
497
|
-
|
|
498
|
-
# TODO: autocomplete/w htest here
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
'''Complete the current word before the cursor with words in the editor.
|
|
2
|
-
|
|
3
|
-
Each menu selection or shortcut key selection replaces the word with a
|
|
4
|
-
different word with the same prefix. The search for matches begins
|
|
5
|
-
before the target and moves toward the top of the editor. It then starts
|
|
6
|
-
after the cursor and moves down. It then returns to the original word and
|
|
7
|
-
the cycle starts again.
|
|
8
|
-
|
|
9
|
-
Changing the current text line or leaving the cursor in a different
|
|
10
|
-
place before requesting the next selection causes AutoExpand to reset
|
|
11
|
-
its state.
|
|
12
|
-
|
|
13
|
-
There is only one instance of Autoexpand.
|
|
14
|
-
'''
|
|
15
|
-
import re
|
|
16
|
-
import string
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class AutoExpand:
|
|
20
|
-
wordchars = string.ascii_letters + string.digits + "_"
|
|
21
|
-
|
|
22
|
-
def __init__(self, editwin):
|
|
23
|
-
self.text = editwin.text
|
|
24
|
-
self.bell = self.text.bell
|
|
25
|
-
self.state = None
|
|
26
|
-
|
|
27
|
-
def expand_word_event(self, event):
|
|
28
|
-
"Replace the current word with the next expansion."
|
|
29
|
-
curinsert = self.text.index("insert")
|
|
30
|
-
curline = self.text.get("insert linestart", "insert lineend")
|
|
31
|
-
if not self.state:
|
|
32
|
-
words = self.getwords()
|
|
33
|
-
index = 0
|
|
34
|
-
else:
|
|
35
|
-
words, index, insert, line = self.state
|
|
36
|
-
if insert != curinsert or line != curline:
|
|
37
|
-
words = self.getwords()
|
|
38
|
-
index = 0
|
|
39
|
-
if not words:
|
|
40
|
-
self.bell()
|
|
41
|
-
return "break"
|
|
42
|
-
word = self.getprevword()
|
|
43
|
-
self.text.delete("insert - %d chars" % len(word), "insert")
|
|
44
|
-
newword = words[index]
|
|
45
|
-
index = (index + 1) % len(words)
|
|
46
|
-
if index == 0:
|
|
47
|
-
self.bell() # Warn we cycled around
|
|
48
|
-
self.text.insert("insert", newword)
|
|
49
|
-
curinsert = self.text.index("insert")
|
|
50
|
-
curline = self.text.get("insert linestart", "insert lineend")
|
|
51
|
-
self.state = words, index, curinsert, curline
|
|
52
|
-
return "break"
|
|
53
|
-
|
|
54
|
-
def getwords(self):
|
|
55
|
-
"Return a list of words that match the prefix before the cursor."
|
|
56
|
-
word = self.getprevword()
|
|
57
|
-
if not word:
|
|
58
|
-
return []
|
|
59
|
-
before = self.text.get("1.0", "insert wordstart")
|
|
60
|
-
wbefore = re.findall(r"\b" + word + r"\w+\b", before)
|
|
61
|
-
del before
|
|
62
|
-
after = self.text.get("insert wordend", "end")
|
|
63
|
-
wafter = re.findall(r"\b" + word + r"\w+\b", after)
|
|
64
|
-
del after
|
|
65
|
-
if not wbefore and not wafter:
|
|
66
|
-
return []
|
|
67
|
-
words = []
|
|
68
|
-
dict = {}
|
|
69
|
-
# search backwards through words before
|
|
70
|
-
wbefore.reverse()
|
|
71
|
-
for w in wbefore:
|
|
72
|
-
if dict.get(w):
|
|
73
|
-
continue
|
|
74
|
-
words.append(w)
|
|
75
|
-
dict[w] = w
|
|
76
|
-
# search onwards through words after
|
|
77
|
-
for w in wafter:
|
|
78
|
-
if dict.get(w):
|
|
79
|
-
continue
|
|
80
|
-
words.append(w)
|
|
81
|
-
dict[w] = w
|
|
82
|
-
words.append(word)
|
|
83
|
-
return words
|
|
84
|
-
|
|
85
|
-
def getprevword(self):
|
|
86
|
-
"Return the word prefix before the cursor."
|
|
87
|
-
line = self.text.get("insert linestart", "insert")
|
|
88
|
-
i = len(line)
|
|
89
|
-
while i > 0 and line[i-1] in self.wordchars:
|
|
90
|
-
i = i-1
|
|
91
|
-
return line[i:]
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if __name__ == '__main__':
|
|
95
|
-
from unittest import main
|
|
96
|
-
main('idlelib.idle_test.test_autoexpand', verbosity=2)
|