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/Python/mysnprintf.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
4,259
113
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/fileutils.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
32,539
1,145
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/getversion.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,234
22
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/progname.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,143
28
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/flags.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,215
35
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/initstdio.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
10,591
332
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/importdl.h
#ifndef Py_IMPORTDL_H #define Py_IMPORTDL_H #include "third_party/python/Include/object.h" COSMOPOLITAN_C_START_ extern const char *_PyImport_DynLoadFiletab[]; extern PyObject *_PyImport_LoadDynamicModuleWithSpec(PyObject *spec, FILE *); /* Max length of module suffix searched for -- accommodates "module.slb" */ #de...
426
17
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/thread_pthread.inc
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
18,922
663
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/traceback.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
24,223
842
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/opcode_targets.inc
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
7,345
267
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/xedmodule.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
3,531
82
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/pylifecycle.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
16,023
507
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/wordcode_helpers.inc
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,155
54
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/flushstdfiles.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,201
61
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/initfsencoding.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
3,583
108
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/asdl.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,309
72
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/dynload_shlib.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
4,176
118
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/pystrhex.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
2,780
75
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/Python-ast.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
270,763
8,119
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/ceval.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
174,719
5,406
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/inittab.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,996
23
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/getopt.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
4,409
119
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/dynload_win.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
10,939
304
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/peephole.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
32,885
926
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/sigcheck.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,479
29
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/xtermmodule.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:2;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=2 sts=2 sw=2 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
4,116
96
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/finalize.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
8,641
247
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/initsigs.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,403
31
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/import.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
89,659
2,967
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/getargs.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
74,568
2,457
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/dtoa.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
81,659
2,892
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/marshal.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
53,664
1,892
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/importdl.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
8,458
252
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/getcompiler.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,203
27
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/initsite.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
1,508
34
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/clinic/import.inc
/* clang-format off */ /*[clinic input] preserve [clinic start generated code]*/ PyDoc_STRVAR(_imp_lock_held__doc__, "lock_held($module, /)\n" "--\n" "\n" "Return True if the import lock is currently held, else False.\n" "\n" "On platforms without threads, return False."); #define _IMP_LOCK_HELD_METHODDEF \ {"...
9,377
366
jart/cosmopolitan
false
cosmopolitan/third_party/python/Python/clinic/bltinmodule.inc
/* clang-format off */ /*[clinic input] preserve [clinic start generated code]*/ PyDoc_STRVAR(builtin_abs__doc__, "abs($module, x, /)\n" "--\n" "\n" "Return the absolute value of the argument."); #define BUILTIN_ABS_METHODDEF \ {"abs", (PyCFunction)builtin_abs, METH_O, builtin_abs__doc__}, PyDoc_STRVAR(builti...
19,284
681
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/dl_nt.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
5,530
130
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/testpy.py
import sys # This is a test module for Python. It looks in the standard # places for various *.py files. If these are moved, you must # change this module too. try: import os except: print("""Could not import the standard "os" module. Please check your PYTHONPATH environment variable.""") sys.exit(1) ...
831
31
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/frozen_dllmain.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
4,583
131
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/getpathp.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
30,941
955
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/launcher.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
52,122
1,580
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/winsound.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
7,466
257
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/winreg.c
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
62,702
1,978
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/invalid_parameter_handler.c
#ifdef _MSC_VER #if _MSC_VER >= 1900 /* pyconfig.h uses this function in the _Py_BEGIN/END_SUPPRESS_IPH * macros. It does not need to be defined when building using MSVC * earlier than 14.0 (_MSC_VER == 1900). */ static void __cdecl _silent_invalid_parameter_handler(wchar_t const* expression, ...
727
22
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/clinic/winsound.inc
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
3,955
118
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/clinic/winreg.inc
/*-*- mode:c;indent-tabs-mode:nil;c-basic-offset:4;tab-width:8;coding:utf-8 -*-│ │vi: set net ft=c ts=4 sts=4 sw=4 fenc=utf-8 :vi│ ╞═════════════════════════════════════════════════â•...
35,382
1,103
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/icons/python.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-white{fill:#fff}.icon-vso-bg{fill:#656565}.icon-visualstudio-online{fill:#007acc}.icon-vs-bg{fill:#424242}.icon-vs-green{fill:#393}.st0{fill:url(#path1948_1_)}.st1{fill:url(#path1950_1_)}</style><pat...
2,962
1
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/icons/pyc.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vso-bg{fill:#656565}.icon-vs-bg{fill:#424242}.icon-vs-green{fill:#393}.icon-white{fill:#fff}.st0{fill:url(#path1948_1_)}.st1{fill:url(#path1950_1_)}</style><path class="icon-canvas-transparent" d="M3...
2,878
1
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/icons/setup.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-visualstudio-online{fill:#007acc}.icon-disabled-grey{fill:#848484}.icon-white{fill:#fff}.st0{fill:#f0eff1}.st1{fill:#424242}.st2{fill:url(#path1948_1_)}.st3{fill:url(#path1950_1_)}</style><path class...
3,173
1
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/icons/py.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vso-bg{fill:#656565}.icon-vso-lightgrey{fill:#bfbfbf}.icon-white{fill:#fff}.st0{fill:url(#path1948_1_)}.st1{fill:url(#path1950_1_)}</style><path class="icon-canvas-transpare...
2,766
1
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/icons/pyd.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vso-bg{fill:#656565}.icon-vs-out{fill:#f6f6f6}.icon-f12-hover-bg{fill:#d9ebf7}.icon-f12-ltgrey-disabled{fill:#ababac}.icon-white{fill:#fff}.st0{fill:#9ca2a7}.st1{fill:url(#path1948_1_)}.st2{fill:url(...
7,604
1
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/icons/launcher.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-white{fill:#fff}.icon-vso-bg{fill:#656565}.icon-visualstudio-online{fill:#007acc}.graph-lightgrey{fill:#dfdfdf}.st0{fill:#0078d7}.st1{fill:#fff}.st2{fill:url(#path1948_1_)}....
4,476
1
jart/cosmopolitan
false
cosmopolitan/third_party/python/PC/icons/pythonw.svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-white{fill:#fff}.icon-visualstudio-online{fill:#007acc}.graph-lightgrey{fill:#dfdfdf}.st0{fill:#f6f6f6}.st1{fill:#656565}.st2{fill:#bfbfbf}.st3{fill:#fff}.st4{fill:url(#path1948_1_)}.st5{fill:url(#pa...
3,015
1
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/getpass.py
"""Utilities to get a password and/or the current user name. getpass(prompt[, stream]) - Prompt for a password, with echo turned off. getuser() - Get the user name from the environment or password database. GetPassWarning - This UserWarning is issued when getpass() cannot prevent echoing of the passw...
5,994
186
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/_compression.py
"""Internal classes used by the gzip, lzma and bz2 modules""" import io BUFFER_SIZE = io.DEFAULT_BUFFER_SIZE # Compressed data read chunk size class BaseStream(io.BufferedIOBase): """Mode-checking helper functions.""" def _check_not_closed(self): if self.closed: raise ValueError("I/O ...
5,340
153
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/selectors.py
"""Selectors module. This module allows high-level and efficient I/O multiplexing, built upon the `select` module primitives. """ from abc import ABCMeta, abstractmethod from collections import namedtuple from collections.abc import Mapping import math import select import sys # generic events, that must be mapped...
19,465
613
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/glob.py
"""Filename globbing utility.""" import os import re import fnmatch __all__ = ["glob", "iglob", "escape"] def glob(pathname, *, recursive=False): """Return a list of paths matching a pathname pattern. The pattern may contain simple shell-style wildcards a la fnmatch. However, unlike fnmatch, filenames s...
5,638
172
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/rlcompleter.py
"""Word completion for GNU readline. The completer completes keywords, built-ins and globals in a selectable namespace (which defaults to __main__); when completing NAME.NAME..., it evaluates (!) the expression up to the last dot and completes its attributes. It's very cool to do "import sys" type "sys.", hit the com...
7,097
206
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/decimal.py
try: from _decimal import * from _decimal import __version__ from _decimal import __libmpdec_version__ except ImportError: from _pydecimal import * from _pydecimal import __version__ from _pydecimal import __libmpdec_version__ try: from _decimal import __doc__ except ImportError: try: ...
1,228
58
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/linecache.py
"""Cache lines from Python source files. This is intended to read lines from modules imported -- hence if a filename is not found, it will look down the module search path for a file by that name. """ import functools import sys import os import tokenize __all__ = ["getline", "clearcache", "checkcache"] def getline...
5,312
178
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/stat.py
"""Constants/functions for interpreting results of os.stat() and os.lstat(). Suggested usage: from stat import * """ from _stat import * # Windows FILE_ATTRIBUTE constants for interpreting os.stat()'s # "st_file_attributes" member FILE_ATTRIBUTE_ARCHIVE = 32 FILE_ATTRIBUTE_COMPRESSED = 2048 FILE_ATTRIBUTE_DEVICE = ...
819
31
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/pstats.py
"""Class for printing reports on profiled python code.""" # Written by James Roskind # Based on prior profile module by Sjoerd Mullender... # which was hacked somewhat by: Guido van Rossum # Copyright Disney Enterprises, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement # # Licensed under t...
26,564
698
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/pty.py
"""Pseudo terminal utilities.""" # Bugs: No signal handling. Doesn't set slave termios and window size. # Only tested on Linux. # See: W. Richard Stevens. 1992. Advanced Programming in the # UNIX Environment. Chapter 19. # Author: Steen Lumholt -- with additions by Guido. from select import select imp...
4,763
171
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/symbol.py
#! /usr/bin/env python3 """Non-terminal symbols of Python grammar (from "graminit.h").""" # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # ./python Lib/symbol...
2,111
116
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/colorsys.py
"""Conversion functions between RGB and other color systems. This modules provides two functions for each color system ABC: rgb_to_abc(r, g, b) --> a, b, c abc_to_rgb(a, b, c) --> r, g, b All inputs and outputs are triples of floats in the range [0.0...1.0] (with the exception of I and Q, which covers a slightly...
4,064
165
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/sre_compile.py
# # Secret Labs' Regular Expression Engine # # convert template to internal format # # Copyright (c) 1997-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre""" import _sre import sre_parse from sre_constants import * ...
19,338
581
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/random.py
"""Random variable generators. integers -------- uniform within range sequences --------- pick random element pick random sample pick weighted random sample generate random permutation distributions on the real line: ---------------------...
27,441
773
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/dis.py
"""Disassembler of Python byte code into mnemonics.""" import sys import types import collections import io from opcode import * __all__ = ["code_info", "dis", "disassemble", "distb", "disco", "findlinestarts", "findlabels", "show_code", "get_instructions", "Instruction", "Bytecode", ...
18,262
492
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/ast.py
""" ast ~~~ The `ast` module helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each Python release; this module helps to find out programmatically what the current grammar looks like and allows modifications of it. ...
12,166
323
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/nntplib.py
"""An NNTP client class based on: - RFC 977: Network News Transfer Protocol - RFC 2980: Common NNTP Extensions - RFC 3977: Network News Transfer Protocol (version 2) Example: >>> from nntplib import NNTP >>> s = NNTP('news') >>> resp, count, first, last, name = s.group('comp.lang.python') >>> print('Group', name, 'ha...
43,078
1,148
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/py_compile.py
"""Routine to "compile" a .py file to a .pyc file. This module has intimate knowledge of the format of .pyc files. """ import importlib._bootstrap_external import importlib.machinery import importlib.util import os import os.path import sys import traceback __all__ = ["compile", "main", "PyCompileError"] class PyC...
7,181
187
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/modulefinder.py
"""Find modules used by a script, using introspection.""" import dis import importlib._bootstrap_external import importlib.machinery import marshal import os import sys import types import struct import warnings with warnings.catch_warnings(): warnings.simplefilter('ignore', DeprecationWarning) import imp LOA...
23,027
634
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/sysconfig.py
"""Access to Python's configuration information.""" import os import sys from os.path import pardir, realpath import _sysconfigdata_m_cosmo_x86_64_cosmo __all__ = [ 'get_config_h_filename', 'get_config_var', 'get_config_vars', 'get_makefile_filename', 'get_path', 'get_path_names', 'get_pat...
24,957
724
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/binhex.py
"""Macintosh binhex compression/decompression. easy interface: binhex(inputfilename, outputfilename) hexbin(inputfilename, outputfilename) """ # # Jack Jansen, CWI, August 1995. # # The module is supposed to be as compatible as possible. Especially the # easy interface should work "as expected" on any platform. # XXX...
13,954
480
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/site.py
"""Append module search paths for third-party packages to sys.path. **************************************************************** * This module is automatically imported during initialization. * **************************************************************** This will append site-specific paths to the module sear...
21,579
635
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/tokenize.py
"""Tokenization help for Python programs. tokenize(readline) is a generator that breaks a stream of bytes into Python tokens. It decodes the bytes according to PEP-0263 for determining source file encoding. It accepts a readline-like method which is called repeatedly to get the next line of input (or b"" for EOF). ...
30,043
803
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/asyncore.py
# -*- Mode: Python -*- # Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # ====================================================================== # Copyright 1996 by Sam Rushing # # All Rights Reserved # # Permission to use, copy, modify,...
20,159
646
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/shlex.py
"""A lexical analyzer class for simple shell-like syntaxes.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 # Input stacking and error message cleanup added by ESR, March 2000 # push_source() and pop_source() made explicit by ESR, January 2001. # Posix compliance, split(), string arguments, and # iterato...
12,956
336
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/string.py
"""A collection of string constants. Public module variables: whitespace -- a string containing all ASCII whitespace ascii_lowercase -- a string containing all ASCII lowercase letters ascii_uppercase -- a string containing all ASCII uppercase letters ascii_letters -- a string containing all ASCII letters digits -- a ...
11,795
310
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/numbers.py
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for numbers, according to PEP 3141. TODO: Fill out more detailed documentation on the operators.""" from abc import ABCMeta, abstractmethod __all__ = ["Number", "Complex", "Real", "Rat...
10,243
390
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/imghdr.py
"""Recognize image file formats based on their first few bytes.""" from os import PathLike __all__ = ["what"] #-------------------------# # Recognize image headers # #-------------------------# def what(file, h=None): f = None try: if h is None: if isinstance(file, (str, PathLike)): ...
3,795
169
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/mailcap.py
"""Mailcap file handling. See RFC 1524.""" import os import warnings __all__ = ["getcaps","findmatch"] def lineno_sort_key(entry): # Sort in ascending order, with unspecified entries at the end if 'lineno' in entry: return 0, entry['lineno'] else: return 1, 0 # Part 1: top-level inter...
8,104
276
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/runpy.py
"""runpy.py - locating and running Python code using the module namespace Provides support for locating and running Python scripts using the Python module namespace instead of the native filesystem. This allows Python code to play nicely with non-filesystem based PEP 302 importers when locating support scripts as wel...
11,959
295
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/gettext.py
"""Internationalization and localization support. This module provides internationalization (I18N) and localization (L10N) support for your Python programs by providing an interface to the GNU gettext message catalog library. I18N refers to the operation by which a program is made aware of multiple languages. L10N r...
21,530
638
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/_sitebuiltins.py
""" The objects used by the site module to add custom builtins. """ # Those objects are almost immortal and they keep a reference to their module # globals. Defining them in the site module would keep too many references # alive. # Note this means this module should also avoid keep things alive in its # globals. imp...
3,284
110
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/ftplib.py
"""An FTP client class and some helper functions. Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds Example: >>> from ftplib import FTP >>> ftp = FTP('ftp.python.org') # connect to host, default port >>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@ '230 Guest login ok, ac...
35,617
997
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/shutil.py
"""Utility functions for copying and archiving files and directory trees. XXX The functions here don't copy the resource fork or other metadata on Mac. """ import os import sys import stat import fnmatch import collections import errno try: import zlib del zlib _ZLIB_SUPPORTED = True except ImportError:...
40,024
1,156
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/plistlib.py
r"""plistlib.py -- a tool to generate and parse MacOSX .plist files. The property list (.plist) file format is a simple XML pickle supporting basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary. To write out a plist file, use the dump(value, file) function. ...
32,787
1,059
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/aifc.py
"""Stuff to parse AIFF-C and AIFF files. Unless explicitly stated otherwise, the description below is true both for AIFF-C files and AIFF files. An AIFF-C file has the following structure. +-----------------+ | FORM | +-----------------+ | <size> | +----+------------+ | | AIFC ...
32,454
945
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/traceback.py
"""Extract, format and print information about Python stack traces.""" import collections import itertools import linecache import sys __all__ = ['extract_stack', 'extract_tb', 'format_exception', 'format_exception_only', 'format_list', 'format_stack', 'format_tb', 'print_exc', 'format_exc', 'pr...
23,458
613
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/zipapp.py
import contextlib import os import pathlib import shutil import stat import sys import zipfile __all__ = ['ZipAppError', 'create_archive', 'get_interpreter'] # The __main__.py used if the users specifies "-m module:fn". # Note that this will always be written as UTF-8 (module and # function names can be non-ASCII in...
7,157
202
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/re.py
# # Secret Labs' Regular Expression Engine # # re-compatible interface for the sre matching engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@py...
15,845
396
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/platform.py
#!/usr/bin/env python3 """ This module tries to retrieve as much platform-identifying data as possible. It makes this information available via function APIs. If called from the command line, it prints the platform information concatenated as single string to stdout. The output format is useable as pa...
47,202
1,434
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/tarfile.py
#!/usr/bin/env python3 #------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, free of charge, to any pers...
93,304
2,553
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/secrets.py
"""Generate cryptographically strong pseudo-random numbers suitable for managing secrets such as account authentication, tokens, and similar. See PEP 506 for more information. https://www.python.org/dev/peps/pep-0506/ """ __all__ = ['choice', 'randbelow', 'randbits', 'SystemRandom', 'token_bytes', 'token_...
2,038
74
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/formatter.py
"""Generic output formatting. Formatter objects transform an abstract flow of formatting events into specific output events on writer objects. Formatters manage several stack structures to allow various properties of a writer object to be changed and restored; writers need not be able to handle relative changes nor an...
15,143
453
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/zipfile.py
""" Read and write ZIP files. XXX references to utf-8 need further investigation. """ import io import os import re import importlib.util import sys import time import stat import shutil import struct import binascii try: import threading except ImportError: import dummy_threading as threading try: impor...
76,282
2,061
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/_dummy_thread.py
"""Drop-in replacement for the thread module. Meant to be used as a brain-dead substitute so that threaded code does not need to be rewritten for when the thread module is not present. Suggested usage is:: try: import _thread except ImportError: import _dummy_thread as _thread """ # Exports ...
5,167
182
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/doctest.py
# Module doctest. # Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org). # Major enhancements and refactoring by: # Jim Fulton # Edward Loper # Provided as-is; use at your own risk; no warranty; no promises; enjoy! r"""Module doctest -- a framework for running examples in docstrings. In...
104,391
2,788
jart/cosmopolitan
false