path
stringlengths
14
112
content
stringlengths
0
6.32M
size
int64
0
6.32M
max_lines
int64
1
100k
repo_name
stringclasses
2 values
autogenerated
bool
1 class
cosmopolitan/third_party/python/Lib/email/contentmanager.py
import binascii import email.charset import email.message import email.errors from email import quoprimime class ContentManager: def __init__(self): self.get_handlers = {} self.set_handlers = {} def add_get_handler(self, key, handler): self.get_handlers[key] = handler def get_con...
10,672
251
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/errors.py
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """email package exception classes.""" class MessageError(Exception): """Base class for errors in the email package.""" class MessageParseError(MessageError): """Base class for message parsing errors...
3,647
111
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/base64mime.py
# Copyright (C) 2002-2007 Python Software Foundation # Author: Ben Gertzfield # Contact: email-sig@python.org """Base64 content transfer encoding per RFCs 2045-2047. This module handles the content transfer encoding method defined in RFC 2045 to encode arbitrary 8-bit data using the three 8-bit bytes in four 7-bit ch...
3,599
121
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/_encoded_words.py
""" Routines for manipulating RFC2047 encoded words. This is currently a package-private API, but will be considered for promotion to a public API if there is demand. """ # An ecoded word looks like this: # # =?charset[*lang]?cte?encoded_string?= # # for more information about charset see the charset module. ...
8,518
234
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/message.py
# Copyright (C) 2001-2007 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Basic message object for the email package object model.""" __all__ = ['Message', 'EmailMessage'] import re import uu import quopri from io import BytesIO, StringIO from encodings import ( base64_codec...
46,806
1,171
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/policy.py
"""This will be the home for the policy that hooks in the new code that adds all the email6 features. """ import re from email._policybase import Policy, Compat32, compat32, _extend_docstrings from email.utils import _has_surrogates from email.headerregistry import HeaderRegistry as HeaderRegistry from email.contentma...
10,373
224
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/parser.py
# Copyright (C) 2001-2007 Python Software Foundation # Author: Barry Warsaw, Thomas Wouters, Anthony Baxter # Contact: email-sig@python.org """A parser of RFC 2822 and MIME email messages.""" __all__ = ['Parser', 'HeaderParser', 'BytesParser', 'BytesHeaderParser', 'FeedParser', 'BytesFeedParser'] from io ...
5,041
132
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/charset.py
# Copyright (C) 2001-2007 Python Software Foundation # Author: Ben Gertzfield, Barry Warsaw # Contact: email-sig@python.org __all__ = [ 'Charset', 'add_alias', 'add_charset', 'add_codec', ] from functools import partial import email.base64mime import email.quoprimime from email import errors fro...
17,484
430
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/header.py
# Copyright (C) 2002-2007 Python Software Foundation # Author: Ben Gertzfield, Barry Warsaw # Contact: email-sig@python.org """Header encoding and decoding functionality.""" __all__ = [ 'Header', 'decode_header', 'make_header', ] import re import binascii import email.quoprimime import email.base64m...
24,102
579
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/_parseaddr.py
# Copyright (C) 2002-2007 Python Software Foundation # Contact: email-sig@python.org """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ __all__ = [ 'mktime_tz', 'parsedate', 'parsedate_tz', 'quote', ] import time, calendar SPACE = ' ' EMPTYS...
17,604
550
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/_header_value_parser.py
"""Header value parser implementing various email-related RFC parsing rules. The parsing methods defined in this module implement various email related parsing rules. Principal among them is RFC 5322, which is the followon to RFC 2822 and primarily a clarification of the former. It also implements RFC 2047 encoded w...
100,242
2,833
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/__init__.py
# Copyright (C) 2001-2007 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """A package for parsing, handling, and generating email messages.""" __all__ = [ 'base64mime', 'charset', 'encoders', 'errors', 'feedparser', 'generator', 'header', 'iterators',...
1,766
63
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/iterators.py
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Various types of useful iterators and generators.""" __all__ = [ 'body_line_iterator', 'typed_subpart_iterator', 'walk', # Do not include _structure() since it's part of the debugging API. ...
2,135
72
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/utils.py
# Copyright (C) 2001-2010 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Miscellaneous utilities.""" __all__ = [ 'collapse_rfc2231_value', 'decode_params', 'decode_rfc2231', 'encode_rfc2231', 'formataddr', 'formatdate', 'format_datetime', 'getaddre...
13,897
389
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/mime/multipart.py
# Copyright (C) 2002-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Base class for MIME multipart/* type messages.""" __all__ = ['MIMEMultipart'] from email.mime.base import MIMEBase class MIMEMultipart(MIMEBase): """Base class for MIME multipart/* type messages."""...
1,621
49
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/mime/audio.py
# Copyright (C) 2001-2007 Python Software Foundation # Author: Anthony Baxter # Contact: email-sig@python.org """Class representing audio/* type MIME documents.""" __all__ = ['MIMEAudio'] import sndhdr from io import BytesIO from email import encoders from email.mime.nonmultipart import MIMENonMultipart _sndhdr...
2,739
75
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/mime/application.py
# Copyright (C) 2001-2006 Python Software Foundation # Author: Keith Dart # Contact: email-sig@python.org """Class representing application/* type MIME documents.""" __all__ = ["MIMEApplication"] from email import encoders from email.mime.nonmultipart import MIMENonMultipart class MIMEApplication(MIMENonMultipart)...
1,321
38
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/mime/base.py
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Base class for MIME specializations.""" __all__ = ['MIMEBase'] import email.policy from email import message class MIMEBase(message.Message): """Base class for MIME specializations.""" def __i...
916
31
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/mime/nonmultipart.py
# Copyright (C) 2002-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Base class for MIME type messages that are not multipart.""" __all__ = ['MIMENonMultipart'] from email import errors from email.mime.base import MIMEBase class MIMENonMultipart(MIMEBase): """Base cl...
691
23
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/mime/text.py
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing text/* type MIME documents.""" __all__ = ['MIMEText'] from email.charset import Charset from email.mime.nonmultipart import MIMENonMultipart class MIMEText(MIMENonMultipart): """C...
1,437
43
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/mime/message.py
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing message/* MIME documents.""" __all__ = ['MIMEMessage'] from email import message from email.mime.nonmultipart import MIMENonMultipart class MIMEMessage(MIMENonMultipart): """Class...
1,317
35
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/mime/__init__.py
0
1
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/email/mime/image.py
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Class representing image/* type MIME documents.""" __all__ = ['MIMEImage'] import imghdr from email import encoders from email.mime.nonmultipart import MIMENonMultipart class MIMEImage(MIMENonMultipart...
1,829
48
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/site-packages/README.txt
This directory exists so that 3rd party packages can be installed here. Read the source for site.py for more details.
119
3
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/planet_and_moon.py
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_planets_and_moon.py Gravitational system simulation using the approximation method from Feynman-lectures, p.9-8, using turtlegraphics. Example: heavy central body, light planet, very light moon! Planet has a circular orbit, moon a stable orbit arou...
2,825
112
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/rosette.py
""" turtle-example-suite: tdemo_wikipedia3.py This example is inspired by the Wikipedia article on turtle graphics. (See example wikipedia1 for URLs) First we create (ne-1) (i.e. 35 in this example) copies of our first turtle p. Then we let them perform their steps in parallel. Followed by a complete...
1,347
66
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/sorting_animate.py
#!/usr/bin/env python3 """ sorting_animation.py A minimal sorting algorithm animation: Sorts a shelf of 10 blocks using insertion sort, selection sort and quicksort. Shelfs are implemented using builtin lists. Blocks are turtles with shape "square", but stretched to rectangles by shapesize() -------------...
5,052
205
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/two_canvases.py
"""turtledemo.two_canvases Use TurtleScreen and RawTurtle to draw on two distinct canvases in a separate windows. The new window must be separately closed in addition to pressing the STOP button. """ from turtle import TurtleScreen, RawTurtle, TK def main(): root = TK.Tk() cv1 = TK.Canvas(root, width=300, he...
1,120
55
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/yinyang.py
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_yinyang.py Another drawing suitable as a beginner's programming example. The small circles are drawn by the circle command. """ from turtle import * def yin(radius, color1, color2): width(3) color("black", color1) begin_fill() ...
821
50
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/paint.py
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_paint.py A simple event-driven paint program - left mouse button moves turtle - middle mouse button changes color - right mouse button toogles betweem pen up (no line drawn when the turtle moves) and pen down (line is drawn). If pen up follows...
1,291
55
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/chaos.py
# File: tdemo_chaos.py # Author: Gregor Lingl # Date: 2009-06-24 # A demonstration of chaos from turtle import * N = 80 def f(x): return 3.9*x*(1-x) def g(x): return 3.9*(x-x**2) def h(x): return 3.9*x-3.9*x*x def jumpto(x, y): penup(); goto(x,y) def line(x1, y1, x2, y2): jumpto(x1, y1) ...
951
60
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/lindenmayer.py
#!/usr/bin/env python3 """ turtle-example-suite: xtx_lindenmayer_indian.py Each morning women in Tamil Nadu, in southern India, place designs, created by using rice flour and known as kolam on the thresholds of their homes. These can be described by Lindenmayer systems, which can easily be implemented ...
2,434
120
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/nim.py
""" turtle-example-suite: tdemo_nim.py Play nim against the computer. The player who takes the last stick is the winner. Implements the model-view-controller design pattern. """ import turtle import random import time SCREENWIDTH = 640 SCREENHEIGHT = 480 MINSTICKS = 7 MAXSTICKS = 31 HUNIT = SCR...
6,513
227
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/bytedesign.py
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_bytedesign.py An example adapted from the example-suite of PythonCard's turtle graphics. It's based on an article in BYTE magazine Problem Solving with Logo: Using Turtle Graphics to Redraw a Design November 1982, p. 118 - 134 ---------------------...
4,232
162
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/tree.py
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_tree.py Displays a 'breadth-first-tree' - in contrast to the classical Logo tree drawing programs, which use a depth-first-algorithm. Uses: (1) a tree-generator, where the drawing is quasi the side-effect, whereas the generator always yields No...
1,385
63
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/__main__.py
#!/usr/bin/env python3 """ ---------------------------------------------- turtleDemo - Help ---------------------------------------------- This document has two sections: (1) How to use the demo viewer (2) How to add your own demos to the demo repository (1) How to use the demo viewer. Select ...
14,263
387
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/colormixer.py
# colormixer from turtle import Screen, Turtle, mainloop class ColorTurtle(Turtle): def __init__(self, x, y): Turtle.__init__(self) self.shape("turtle") self.resizemode("user") self.shapesize(3,3,5) self.pensize(10) self._color = [0,0,0] self.x = x ...
1,339
59
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/round_dance.py
""" turtle-example-suite: tdemo_round_dance.py (Needs version 1.1 of the turtle module that comes with Python 3.1) Dancing turtles have a compound shape consisting of a series of triangles of decreasing size. Turtles march along a circle while rotating pairwise in opposite direction, with one exceptio...
1,804
87
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/penrose.py
#!/usr/bin/env python3 """ xturtle-example-suite: xtx_kites_and_darts.py Constructs two aperiodic penrose-tilings, consisting of kites and darts, by the method of inflation in six steps. Starting points are the patterns "sun" consisting of five kites and "star" consisting of five darts. For more inf...
3,412
179
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/turtle.cfg
width = 800 height = 600 canvwidth = 1200 canvheight = 900 shape = arrow mode = standard resizemode = auto fillcolor = "" title = Python turtle graphics demo.
160
11
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/fractalcurves.py
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_fractalCurves.py This program draws two fractal-curve-designs: (1) A hilbert curve (in a box) (2) A combination of Koch-curves. The CurvesTurtle class and the fractal-curve- methods are taken from the PythonCard example scripts for turtle-graphics. ...
3,457
139
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/minimal_hanoi.py
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_minimal_hanoi.py A minimal 'Towers of Hanoi' animation: A tower of 6 discs is transferred from the left to the right peg. An imho quite elegant and concise implementation using a tower class, which is derived from the built-in type list. Discs ar...
2,051
80
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/forest.py
#!/usr/bin/env python3 """ turtlegraphics-example-suite: tdemo_forest.py Displays a 'forest' of 3 breadth-first-trees similar to the one in tree. For further remarks see tree.py This example is a 'breadth-first'-rewrite of a Logo program written by Erich Neuwirth. See http://homepage.univie.ac.at/er...
2,950
109
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/peace.py
#!/usr/bin/env python3 """ turtle-example-suite: tdemo_peace.py A simple drawing suitable as a beginner's programming example. Aside from the peacecolors assignment and the for loop, it only uses turtle commands. """ from turtle import * def main(): peacecolors = ("red3", "orange", "yellow"...
1,066
62
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/__init__.py
""" -------------------------------------- About this viewer -------------------------------------- Tiny demo viewer to view turtle graphics example scripts. Quickly and dirtyly assembled by Gregor Lingl. June, 2006 For more information see: turtledemo - Help Have fun! """
314
15
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/turtledemo/clock.py
#!/usr/bin/env python3 # -*- coding: cp1252 -*- """ turtle-example-suite: tdemo_clock.py Enhanced clock-program, showing date and time ------------------------------------ Press STOP to exit the program! ------------------------------------ """ from turtle import * from datetime import datet...
3,201
133
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/version.py
# # distutils/version.py # # Implements multiple version numbering conventions for the # Python Module Distribution Utilities. # # $Id$ # """Provides classes to represent module version numbers (one class for each style of version numbering). There are currently two such classes implemented: StrictVersion and LooseVe...
12,345
344
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/sysconfig.py
"""Provide access to Python's configuration information. The specific configuration variables available depend heavily on the platform and configuration. The values may be retrieved using get_config_var(name), and the list of variables is available via get_config_vars().keys(). Additional convenience functions are a...
20,061
533
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/msvccompiler.py
"""distutils.msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio. """ # Written by Perry Stoll # hacked by Robin Becker and Thomas Heller to do a better job of # finding DevStudio (through the registry) import sys, os from distutils.errors import \ ...
23,576
644
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/fancy_getopt.py
"""distutils.fancy_getopt Wrapper around the standard getopt module that provides the following additional features: * short and long options are tied together * options have help strings, so fancy_getopt could potentially create a complete usage summary * options set attributes of a passed-in object """ im...
17,784
458
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/dir_util.py
"""distutils.dir_util Utility functions for manipulating directories and directory trees.""" import os import errno from distutils.errors import DistutilsFileError, DistutilsInternalError from distutils import log # cache for by mkpath() -- in addition to cheapening redundant calls, # eliminates redundant "creating ...
7,778
211
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/ccompiler.py
"""distutils.ccompiler Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" import sys, os, re from distutils.errors import * from distutils.spawn import spawn from distutils.file_util import move_file from distutils.dir_util import mkpath from distuti...
47,415
1,116
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/README
This directory contains the Distutils package. There's a full documentation available at: http://docs.python.org/distutils/ The Distutils-SIG web page is also a good starting point: http://www.python.org/sigs/distutils-sig/ WARNING : Distutils must remain compatible with 2.3 $Id$
295
14
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/dist.py
"""distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. """ import sys import os import re from email import message_from_file try: import warnings except ImportError: warnings = None from distutils.errors import * from distutils.fancy_g...
49,690
1,237
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/errors.py
"""distutils.errors Provides exceptions used by the Distutils modules. Note that Distutils modules may raise standard exceptions; in particular, SystemExit is usually raised for errors that are obviously the end-user's fault (eg. bad command-line arguments). This module is safe to use in "from ... import *" mode; it...
3,577
98
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/_msvccompiler.py
"""distutils._msvccompiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for Microsoft Visual Studio 2015. The module is compatible with VS 2015 and later. You can find legacy support for older versions in distutils.msvc9compiler and distutils.msvccompiler. """ # Written by Perry Stoll # h...
21,579
575
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/filelist.py
"""distutils.filelist Provides the FileList class, used for poking about the filesystem and building lists of files. """ import os, re import fnmatch import functools from distutils.util import convert_path from distutils.errors import DistutilsTemplateError, DistutilsInternalError from distutils import log class Fi...
12,832
328
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/text_file.py
"""text_file provides the TextFile class, which gives an interface to text files that (optionally) takes care of stripping comments, ignoring blank lines, and joining lines with backslashes.""" import sys, io class TextFile: """Provides a file-like object that takes care of all the things you commonly wa...
12,483
287
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/archive_util.py
"""distutils.archive_util Utility functions for creating archive files (tarballs, zip files, that sort of thing).""" import os from warnings import warn import sys try: import zipfile except ImportError: zipfile = None from distutils.errors import DistutilsExecError from distutils.spawn import spawn from d...
8,518
257
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/unixccompiler.py
"""distutils.unixccompiler Contains the UnixCCompiler class, a subclass of CCompiler that handles the "typical" Unix-style command-line C compiler: * macros defined with -Dname[=value] * macros undefined with -Uname * include search directories specified with -Idir * libraries specified with -lllib * library...
14,484
323
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/cmd.py
"""distutils.cmd Provides the Command class, the base class for the command classes in the distutils.command package. """ import sys, os, re from distutils.errors import DistutilsOptionError from distutils import util, dir_util, file_util, archive_util, dep_util from distutils import log class Command: """Abstra...
19,129
435
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/debug.py
import os # If DISTUTILS_DEBUG is anything other than the empty string, we run in # debug mode. DEBUG = os.environ.get('DISTUTILS_DEBUG')
139
6
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/msvc9compiler.py
"""distutils.msvc9compiler Contains MSVCCompiler, an implementation of the abstract CCompiler class for the Microsoft Visual Studio 2008. The module is compatible with VS 2005 and VS 2008. You can find legacy support for older versions of VS in distutils.msvccompiler. """ # Written by Perry Stoll # hacked by Robin B...
30,612
792
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/cygwinccompiler.py
"""distutils.cygwinccompiler Provides the CygwinCCompiler class, a subclass of UnixCCompiler that handles the Cygwin port of the GNU C compiler to Windows. It also contains the Mingw32CCompiler class which handles the mingw32 port of GCC (same as cygwin in no-cygwin mode). """ # problems: # # * if you use a msvc com...
16,475
406
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/versionpredicate.py
"""Module for parsing and testing package version predicate strings. """ import re import distutils.version import operator re_validPackage = re.compile(r"(?i)^\s*([a-z_]\w*(?:\.[a-z_]\w*)*)(.*)", re.ASCII) # (package) (rest) re_paren = re.compile(r"^\s*\((.*)\)\s*$") # (list) inside of parentheses re_splitCompa...
5,133
167
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/file_util.py
"""distutils.file_util Utility functions for operating on single files. """ import os from distutils.errors import DistutilsFileError from distutils import log # for generating verbose output in 'copy_file()' _copy_action = { None: 'copying', 'hard': 'hard linking', 'sym': 'symbo...
8,148
239
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/extension.py
"""distutils.extension Provides the Extension class, used to describe C/C++ extension modules in setup scripts.""" import os import warnings # This class is really only used by the "build_ext" command, so it might # make sense to put it in distutils.command.build_ext. However, that # module is already big enough, a...
10,515
241
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/core.py
"""distutils.core The only module that needs to be imported to use the Distutils; provides the 'setup' function (which is to be called from the setup script). Also indirectly provides the Distribution and Command classes, although they are really defined in distutils.dist and distutils.cmd. """ import os import sys ...
8,876
235
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/util.py
"""distutils.util Miscellaneous utility functions -- anything that doesn't fit into one of the other *util.py modules. """ import os import re import importlib.util import string import sys from distutils.errors import DistutilsPlatformError from distutils.dep_util import newer from distutils.spawn import spawn from ...
20,840
561
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/bcppcompiler.py
"""distutils.bcppcompiler Contains BorlandCCompiler, an implementation of the abstract CCompiler class for the Borland C++ compiler. """ # This implementation by Lyle Johnson, based on the original msvccompiler.py # module and using the directions originally published by Gordon Williams. # XXX looks like there's a L...
14,935
394
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/config.py
"""distutils.pypirc Provides the PyPIRCCommand class, the base class for the command classes that uses .pypirc in the distutils.command package. """ import os from configparser import RawConfigParser from distutils.cmd import Command DEFAULT_PYPIRC = """\ [distutils] index-servers = pypi [pypi] username:%s pass...
4,880
132
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/log.py
"""A simple log mechanism styled after PEP 282.""" # The class here is styled after PEP 282 so that it could later be # replaced with a standard Python logging implementation. DEBUG = 1 INFO = 2 WARN = 3 ERROR = 4 FATAL = 5 import sys class Log: def __init__(self, threshold=WARN): self.threshold = thre...
1,969
78
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/spawn.py
"""distutils.spawn Provides the 'spawn()' function, a front-end to various platform- specific functions for launching another program in a sub-process. Also provides the 'find_executable()' to search the path for a given executable name. """ import sys import os from distutils.errors import DistutilsPlatformError, D...
7,427
193
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/__init__.py
"""distutils The main package for the Python Module Distribution Utilities. Normally used from a setup script as from distutils.core import setup setup (...) """ import sys __version__ = sys.version[:sys.version.index(' ')]
236
14
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/dep_util.py
"""distutils.dep_util Utility functions for simple, timestamp-based dependency of files and groups of files; also, function based entirely on such timestamp dependency analysis.""" import os from distutils.errors import DistutilsFileError def newer (source, target): """Return true if 'source' exists and is more...
3,491
93
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/clean.py
"""distutils.command.clean Implements the Distutils 'clean' command.""" # contributed by Bastian Kleineidam <calvin@cs.uni-sb.de>, added 2000-03-18 import os from distutils.core import Command from distutils.dir_util import remove_tree from distutils import log class clean(Command): description = "clean up tem...
2,776
77
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/upload.py
""" distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to a package index). """ import os import io import platform import hashlib from base64 import standard_b64encode from urllib.request import urlopen, Request, HTTPError from urllib.parse import urlparse from distutils.errors imp...
7,261
201
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/sdist.py
"""distutils.command.sdist Implements the Distutils 'sdist' command (create a source distribution).""" import os import sys from types import * from glob import glob from warnings import warn from distutils.core import Command from distutils import dir_util, dep_util, file_util, archive_util from distutils.text_file...
17,826
457
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/bdist_msi.py
# Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst """ Implements the bdist_msi command. """ import sys, os from distutils.core import Command from distutils.dir_util import remove_tree from distutils.sysconfig impor...
35,233
742
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/install_headers.py
"""distutils.command.install_headers Implements the Distutils 'install_headers' command, to install C/C++ header files to the Python include directory.""" from distutils.core import Command # XXX force is never used class install_headers(Command): description = "install C/C++ header files" user_options = ...
1,298
48
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/build_scripts.py
"""distutils.command.build_scripts Implements the Distutils 'build_scripts' command.""" import os, re from stat import ST_MODE from distutils import sysconfig from distutils.core import Command from distutils.dep_util import newer from distutils.util import convert_path, Mixin2to3 from distutils import log import tok...
6,232
161
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/install_lib.py
"""distutils.command.install_lib Implements the Distutils 'install_lib' command (install all Python modules).""" import os import importlib.util import sys from distutils.core import Command from distutils.errors import DistutilsOptionError # Extension for Python source files. PYTHON_SOURCE_EXTENSION = ".py" clas...
8,397
218
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/bdist_rpm.py
"""distutils.command.bdist_rpm Implements the Distutils 'bdist_rpm' command (create RPM source and binary distributions).""" import subprocess, sys, os from distutils.core import Command from distutils.debug import DEBUG from distutils.util import get_platform from distutils.file_util import write_file from distutils...
21,671
583
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/install_egg_info.py
"""distutils.command.install_egg_info Implements the Distutils 'install_egg_info' command, for installing a package's PKG-INFO metadata.""" from distutils.cmd import Command from distutils import log, dir_util import os, sys, re class install_egg_info(Command): """Install an .egg-info file for the package""" ...
2,603
78
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/bdist_wininst.py
"""distutils.command.bdist_wininst Implements the Distutils 'bdist_wininst' command: create a windows installer exe-program.""" import sys, os from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import create_tree, remove_tree from distutils.errors import * from distutil...
15,434
365
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/build_clib.py
"""distutils.command.build_clib Implements the Distutils 'build_clib' command, to build a C/C++ library that is included in the module distribution and needed by an extension module.""" # XXX this module has *lots* of code ripped-off quite transparently from # build_ext.py -- not surprisingly really, as the work req...
8,022
210
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/install.py
"""distutils.command.install Implements the Distutils 'install' command.""" import sys import os from distutils import log from distutils.core import Command from distutils.debug import DEBUG from distutils.sysconfig import get_config_vars from distutils.errors import DistutilsPlatformError from distutils.file_util ...
26,737
657
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/build_ext.py
"""distutils.command.build_ext Implements the Distutils 'build_ext' command, for building extension modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" import contextlib import os import re import sys from distutils.core import Command from distutils.errors import * from distutils....
31,486
756
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/bdist.py
"""distutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).""" import os from distutils.core import Command from distutils.errors import * from distutils.util import get_platform def show_formats(): """Print list of available formats (arguments to "--format" optio...
5,562
144
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/build.py
"""distutils.command.build Implements the Distutils 'build' command.""" import sys, os from distutils.core import Command from distutils.errors import DistutilsOptionError from distutils.util import get_platform def show_compilers(): from distutils.ccompiler import show_compilers show_compilers() class bu...
5,748
158
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/build_py.py
"""distutils.command.build_py Implements the Distutils 'build_py' command.""" import os import importlib.util import sys from glob import glob from distutils.core import Command from distutils.errors import * from distutils.util import convert_path, Mixin2to3 from distutils import log class build_py (Command): ...
17,164
417
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/register.py
"""distutils.command.register Implements the Distutils 'register' command (register with the repository). """ # created 2002/10/21, Richard Jones import getpass import io import urllib.parse, urllib.request from warnings import warn from distutils.core import PyPIRCCommand from distutils.errors import * from distut...
11,712
305
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/bdist_dumb.py
"""distutils.command.bdist_dumb Implements the Distutils 'bdist_dumb' command (create a "dumb" built distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" import os from distutils.core import Command from distutils.util import get_platform from distutils.dir_util import remove_tree, ...
4,913
124
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/check.py
"""distutils.command.check Implements the Distutils 'check' command. """ from distutils.core import Command from distutils.errors import DistutilsSetupError try: # docutils is installed from docutils.utils import Reporter from docutils.parsers.rst import Parser from docutils import frontend from d...
5,496
146
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/config.py
"""distutils.command.config Implements the Distutils 'config' command, a (mostly) empty command class that exists mainly to be sub-classed by specific module distributions and applications. The idea is that while every "config" command is different, at least they're all named the same, and users always see "config" i...
13,086
348
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/command_template
"""distutils.command.x Implements the Distutils 'x' command. """ # created 2000/mm/dd, John Doe __revision__ = "$Id$" from distutils.core import Command class x(Command): # Brief (40-50 characters) description of the command description = "" # List of option tuples: long name, short name (None if no...
633
34
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/install_data.py
"""distutils.command.install_data Implements the Distutils 'install_data' command, for installing platform-independent data files.""" # contributed by Bastian Kleineidam import os from distutils.core import Command from distutils.util import change_root, convert_path class install_data(Command): description = ...
2,822
80
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/install_scripts.py
"""distutils.command.install_scripts Implements the Distutils 'install_scripts' command, for installing Python scripts.""" # contributed by Bastian Kleineidam import os from distutils.core import Command from distutils import log from stat import ST_MODE class install_scripts(Command): description = "install ...
2,017
61
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/command/__init__.py
"""distutils.command Package containing implementation of all the standard Distutils commands.""" __all__ = ['build', 'build_py', 'build_ext', 'build_clib', 'build_scripts', 'clean', 'install', 'install_lib', 'install_headers', ...
799
32
jart/cosmopolitan
false
cosmopolitan/third_party/python/Lib/distutils/tests/test_sdist.py
"""Tests for distutils.command.sdist.""" import os import tarfile import unittest import warnings import zipfile from os.path import join from textwrap import dedent from test.support import captured_stdout, check_warnings, run_unittest try: import zlib ZLIB_SUPPORT = True except ImportError: ZLIB_SUPPORT ...
17,047
493
jart/cosmopolitan
false