index

welcome at the os_sys docs.

index:

first
getting started with os_sys
progress bars
discription
help(os_sys)
help(packages)
os_sys.mail
give a feedback
search

first

first there are somethings you need to know:
1. this docs are under devlopment.
2. if you want to add somethings to this docs go to os_sys github and post a what you want to add and i will ad it.
3. have fun with this package.


thanks for downloading os_sys. i hope you will enjoy using it this. this is a doc to help you getting started with os_sys. os_sys is my first big package. again i hope you will enjoy using it so. lets get started.
typ:
import os_sys
print(os_sys.msg) if the installation was a succes you wil se in the shell:
installation succes
else you will get a error. so now you have installed os_sys you are ready to use it

loading_bars: Easy progress reporting for Python

|pypi|

Bars

There are 7 progress bars to choose from:

To use them, just call next to advance and finish to finish:

.. code-block:: python

from os_sys.progress import bar

bar = Bar('Processing', max=20)
for i in range(20):
    # Do some work
    bar.next()
bar.finish()

or use any bar of this class as a context manager:

.. code-block:: python

from os_sys.progress import bar

with Bar('Processing', max=20) as bar:
    for i in range(20):
        # Do some work
        bar.next()

The result will be a bar like the following: ::

Processing |#############                   | 42/100

To simplify the common case where the work is done in an iterator, you can use the iter method:

.. code-block:: python

for i in Bar('Processing').iter(it):
    # Do some work

Progress bars are very customizable, you can change their width, their fill character, their suffix and more:

.. code-block:: python

bar = Bar('Loading', fill='@', suffix='%(percent)d%%')

This will produce a bar like the following: ::

Loading |@@@@@@@@@@@@@                   | 42%

You can use a number of template arguments in message and suffix:

========== ================================ Name Value ========== ================================ index current value max maximum value remaining max - index progress index / max percent progress * 100 avg simple moving average time per item (in seconds) elapsed elapsed time in seconds elapsed_td elapsed as a timedelta (useful for printing as a string) eta avg * remaining eta_td eta as a timedelta (useful for printing as a string) ========== ================================

Instead of passing all configuration options on instatiation, you can create your custom subclass:

.. code-block:: python

class FancyBar(Bar):
    message = 'Loading'
    fill = '*'
    suffix = '%(percent).1f%% - %(eta)ds'

You can also override any of the arguments or create your own:

.. code-block:: python

class SlowBar(Bar):
    suffix = '%(remaining_hours)d hours remaining'
    @property
    def remaining_hours(self):
        return self.eta // 3600

Spinners

For actions with an unknown number of steps you can use a spinner:

.. code-block:: python

from os_sys.progress import spinner

spinner = Spinner('Loading ')
while state != 'FINISHED':
    # Do some work
    spinner.next()

There are 5 predefined spinners:

include:

introduction


description                                                                                                                                                                    

license(at the end)
home
loading_bars

introduction:

to install os_sys you type: pip install os_sys                                                                                  
to upgrade os_sys you type: pip install --upgrade os_sys                                                                                  
so lets get start to install os_sys                                                                                  

discription:

os_sys is a extra package for python(3)                                                                                  
it's a extra to have a more easy use of the normal python libs                                                                                  
plz look sometimes to my packages becuse i am making more own libs(extra is not that own lib)                                                                                  
if i have more info i while show it here                                                                                   
plz read the license                                                                                  

license:

                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. 
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    os_sys python lib to use.
    Copyright (C) 2018  os_sys-devlopment-group

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see .

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    os_sys  Copyright (C) 2018  os_sys-devlopment-group
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
.

' Help on package os_sys:

NAME
os_sys

PACKAGE CONTENTS
_progress
commands (package)
discription
errors
fail
html_text (package)
modules
os_sys
programs (package)
progress_bars
py_install (package)
system
test (package)
upload
wifi

CLASSES
builtins.object
progress_types
threading.Thread(builtins.object)
progress_bar_loading
tqdm
tqdm._tqdm.tqdm(tqdm._utils.Comparable)
tqdm._tqdm_gui.tqdm_gui

gui_bar = class tqdm_gui(tqdm ._tqdm.tqdm)
| gui_bar(*args, **kwargs)
|
| Experimental GUI version of tqdm!
|
| Method resolution order: | tqdm_gui
| tqdm._tqdm.tqdm
| tqdm._utils.Comparable
| builtins.object
|
| Methods defined here:
|
| __init__(self, *args, **kwargs)
| Parameters
| ----------
| iterable : iter able, optional
| Iterable to decorate with a progressbar.
| Leave blank to manually manage the updates.
| desc : str, optional
| Prefix for the progressbar.
| total : int, optional
| The number of expected i terations. If unspecified,
| len(iterable) is used if possible. If float("inf") or as a last
| resort, only basic pr ogress statistics are displayed
| (no ETA, no progressbar).
| If `gui` is True and this parameter needs subsequent u pdating,
| specify an initial arbitrary large positive integer,
| e.g. int(9e9).
| leave : bool, optio nal
| If [default: True], keeps all traces of the progressbar
| upon termination of iteration.
| file : `io.TextIOWrapper` or `io.StringIO`, optional
| Specifies where to output the progress messages
| (default: sys.std err). Uses `file.write(str)` and `file.flush()`
| methods.
| ncols : int, optional
| The width of the entire output message. If specified,
| dynamically resizes the progressbar to stay within this bound.
| If unspecifi ed, attempts to use environment width. The
| fallback is a meter width of 10 and no limit for the counter and
| stat istics. If 0, will not print any meter (only stats).
| mininterval : float, optional
| Minimum progress display update interval [default: 0.1] seconds.
| maxinterval : float, optional
| Maximum progress display update interval [default: 1 0] seconds.
| Automatically adjusts `miniters` to correspond to `mininterval`
| after long display update lag. Only works if `dynamic_miniters`
| or monitor thread is enabled.
| miniters : int, optional
| Minimum progr ess display update interval, in iterations.
| If 0 and `dynamic_miniters`, will automatically adjust to equal
| `min interval` (more CPU efficient, good for tight loops).
| If > 0, will skip display of specified number of iterations.
| Tweak this and `mininterval` to get very efficient loops.
| If your progress is erratic with both fast and slow iterations
| (network, skipping items, etc) you should set miniters=1.
| ascii : bool, optional
| If unspecified or False, use unicod e (smooth blocks) to fill
| the meter. The fallback is to use ASCII characters `1-9 #`.
| disable : bool, optional
| Whether to disable the entire progressbar wrapper
| [default: False]. If set to None, disable on non-TTY.
| un it : str, optional
| String that will be used to define the unit of each iteration
| [default: it].
| u nit_scale : bool or int or float, optional
| If 1 or True, the number of iterations will be reduced/scaled
| a utomatically and a metric prefix following the
| International System of Units standard will be added
| (kilo, mega, etc.) [default: False]. If any other non-zero
| number, will scale `total` and `n`.
| dynamic_ncols : bool, optional
| If set, constantly alters `ncols` to the environment (allowing
| for window resizes) [default: False].
| smoothi ng : float, optional
| Exponential moving average smoothing factor for speed estimates
| (ignored in GUI mode). Range s from 0 (average speed) to 1
| (current/instantaneous speed) [default: 0.3].
| bar_format : str, optional
| Specify a custom bar string formatting. May impact performance.
| [default: \'{l_bar}{bar}{r_bar}\'], where
| l_bar=\' {desc}: {percentage:3.0f}%|\' and
| r_bar=\'| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, \'
| \'{rate_fmt}{postfix }]\'
| Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
| percentage, rate, rate_fmt, rate_noinv, rate_ noinv_fmt,
| rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix.
| Note that a trailing ": " is automatically removed after {desc}
| if the latter is empty.
| initial : int, optional
| The initial counter value. Usef ul when restarting a progress
| bar [default: 0].
| position : int, optional
| Specify the line offset to print this bar (starting from 0)
| Automatic if unspecified.
| Useful to manage multiple bars at once (eg, from threads) .
| postfix : dict or *, optional
| Specify additional stats to display at the end of the bar.
| Calls `se t_postfix(**postfix)` if possible (dict).
| unit_divisor : float, optional
| [default: 1000], ignored unless `unit_scale` i s True.
| gui : bool, optional
| WARNING: internal parameter - do not use.
| Use tqdm_gui(...) instead. I f set, will attempt to use
| matplotlib animations for a graphical output [default: False].
|
| Returns
| -------
| out : decorated iterator.
|
| __iter__(self)
| Backward-compatibility to use: for x in tqdm(iterabl e)
|
| close(self)
| Cleanup and (if leave=False) close the progressbar.
|
| update(self, n=1)
| Manually update the progress bar, useful for streams
| such as reading files.
| E.g.:
| >>> t = tqdm(total=filesize) # Initialise
| >>> for current_buffer in stream:
| ... ...
| ... t.update(len(current_buffer))
| > >> t.close()
| The last line is highly recommended, but possibly not necessary if
| `t.update()` will be called in such a way that `filesize` will be
| exactly reached and printed.
|
| Parameters
| ----------
| n : int, option al
| Increment to add to the internal counter of iterations
| [default: 1].
|
| -------------------------- --------------------------------------------
| Methods inherited from tqdm._tqdm.tqdm:
|
| __del__(self)
|
| __ent er__(self)
|
| __exit__(self, *exc)
|
| __hash__(self)
| Return hash(self).
|
| __len__(self)
|
| __repr__(self)
| Return repr(self).
|
| clear(self, nolock=False)
| Clear current bar displa y
|
| display(self, msg=None, pos=None)
| Use `self.sp` and to display `msg` in the specified `pos`.
|
| P arameters
| ----------
| msg : what to display (default: repr(self))
| pos : position to display in. (default: abs(s elf.pos))
|
| moveto(self, n)
|
| refresh(self, nolock=False)
| Force refresh the display of this bar
|
| set_description(self, desc=None, refresh=True)
| Set/modify description of the progress bar.
|
| Parameters
| desc : str, optional
| refresh : bool, optional
| Forces refresh [default: True].
| | set_description_str(self, desc=None, refresh=True)
| Set/modify description without \': \' appended.
|
| set_postfix(se lf, ordered_dict=None, refresh=True, **kwargs)
| Set/modify postfix (additional stats)
| with automatic formatting based on datatype .
|
| Parameters
| ----------
| ordered_dict : dict or OrderedDict, optional
| refresh : bool, o ptional
| Forces refresh [default: True].
| kwargs : dict, optional
|
| set_postfix_str(self, s=\'\', refresh= True)
| Postfix without dictionary expansion, similar to prefix handling.
|
| unpause(self)
| Restart tqdm timer fr om last print time.
|
| ----------------------------------------------------------------------
| Class methods inherited from tqdm._ tqdm.tqdm:
|
| external_write_mode(file=None, nolock=False) from builtins.type
| Disable tqdm within context and refresh tqdm whe n exits.
| Useful when writing to standard output stream
|
| get_lock() from builtins.type
| Get the global lock. Con struct it if it does not exist.
|
| pandas(*targs, **tkwargs) from builtins.type
| Registers the given `tqdm` class with
| pandas.core.
| ( frame.DataFrame
| | series.Series
| | groupby.DataFrameGroupBy
| | groupby. SeriesGroupBy
| ).progress_apply
|
| A new instance will be create every time `progress_apply` is called,
| a nd each instance will automatically close() upon completion.
|
| Parameters
| ----------
| targs, tkwargs : argum ents for the tqdm instance
|
| Examples
| --------
| >>> import pandas as pd
| >>> import numpy as np
| >>> from tqdm import tqdm, tqdm_gui
| >>>
| >>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
| >>> tqdm.pandas(ncols=50) # can use tqdm_gui, optional kwargs, etc
| >>> # Now you can use `progress_apply` instead of `apply`
| >>> df .groupby(0).progress_apply(lambda x: x**2)
|
| References
| ----------
| https://stackoverflow.com/questions/186032 70/
| progress-indicator-during-pandas-operations-python
|
| set_lock(lock) from builtins.type
| Set the global lock.
|
| write(s, file=None, end=\'
\', nolock=False) from builtins.type
| Print a message via tqdm (without overlap with bars)
| | ----------------------------------------------------------------------
| Static methods inherited from tqdm._tqdm.tqdm:
|
| __ne w__(cls, *args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ema(x, mu=None, alpha=0.3)
| Exponential moving average: smoothing to give progressively lower
| weights to older values.
|
| Parameters
| ----------
| x : float
| New value to include in EMA.
| mu : float, optional
| Previous EMA value.
| alpha : float, optional
| Smoothing factor in range [0, 1], [default: 0.3].
| Increase to give more weight to recent values.
| Ranges from 0 (yields mu) to 1 (yields x).
|
| format_interval(t)
| Formats a number of seconds as a clock time, [H:]MM:SS
|
| Parameters
| ----------
| t : int
| Number of seconds.
|
| Returns
| -------
| out : str
| [H:]MM:SS
|
| format_meter(n, total, elapsed, ncols=None, prefix=\'\', ascii=False, unit=\'it\', unit_scale=False, rate=None, bar_format=None, postfix=None, unit_divisor=1000, **extra_kwargs)
| Return a string-based progr ess bar given some parameters
|
| Parameters
| ----------
| n : int
| Number of finished iteration s.
| total : int
| The expected total number of iterations. If meaningless (), only
| basic progress statistics ar e displayed (no ETA).
| elapsed : float
| Number of seconds passed since start.
| ncols : int, optional
| The width of the entire output message. If specified,
| dynamically resizes the progress meter to stay within this bound
| [defau lt: None]. The fallback meter width is 10 for the progress
| bar + no limit for the iterations counter and statistics. If 0,
| w ill not print any meter (only stats).
| prefix : str, optional
| Prefix message (included in total width) [default: \'\'].
| Use as {desc} in bar_format string.
| ascii : bool, optional
| If not set, use unicode (smooth blocks) to fill the mete r
| [default: False]. The fallback is to use ASCII characters
| (1-9 #).
| unit : str, optional
| The iteration unit [default: \'it\'].
| unit_scale : bool or int or float, optional
| If 1 or True, the number of iterations will be printed with an
| appropriate SI metric prefix (k = 10^3, M = 10^6, etc.)
| [default: False]. If any other non-zero number, will scale
| `total` and `n`.
| rate : float, optional
| Manual override for iteration rate.
| If [default: None], uses n/elapsed.
| bar_format : str, optional
| Specify a custom bar string formatting. May impact performanc e.
| [default: \'{l_bar}{bar}{r_bar}\'], where
| l_bar=\'{desc}: {percentage:3.0f}%|\' and
| r_bar=\'| {n_fm t}/{total_fmt} [{elapsed}<{remaining}, \'
| \'{rate_fmt}{postfix}]\'
| Possible vars: l_bar, bar, r_bar, n, n_fmt, total, t otal_fmt,
| percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt,
| rate_inv, rate_inv_fmt, elapsed, remaining, desc, p ostfix.
| Note that a trailing ": " is automatically removed after {desc}
| if the latter is empty.
| postfix : *, optional
| Similar to `prefix`, but placed at the end
| (e.g. for additional stats).
| Note: postfix is u sually a string (not a dict) for this method,
| and will if possible be set to postfix = \', \' + postfix.
| However other ty pes are supported (#382).
| unit_divisor : float, optional
| [default: 1000], ignored unless `unit_scale` is True.
|
| Returns
| -------
| out : Formatted meter and stats, ready to display.
|
| format_num(n)
| Inte lligent scientific notation (.3g).
|
| Parameters
| ----------
| n : int or float or Numeric
| A Number.
|
| Returns
| -------
| out : str
| Formatted number.
|
| format_si zeof(num, suffix=\'\', divisor=1000)
| Formats a number (greater than unity) with SI Order of Magnitude
| prefixes.
|
| Parameters
| ----------
| num : float
| Number ( >= 1) to format.
| suffix : str, optional
| Post-postfix [default: \'\'].
| divisor : float, optionl
| Divisor between prefixes [default: 1000].
|
| Returns
| -------
| out : str
| Number with Order of Magnitude SI unit postfix.
|
| status_p rinter(file)
| Manage the printing and in-place updating of a line of characters.
| Note that if the string is longer than a line, the n in-place
| updating may not work (it will print a new line at each refresh).
|
| ----------------------------------------------- -----------------------
| Data descriptors inherited from tqdm._tqdm.tqdm:
|
| format_dict
| Public API for read-only mem ber access
|
| ----------------------------------------------------------------------
| Data and other attributes inherited from tqdm. _tqdm.tqdm:
|
| monitor = None
|
| monitor_interval = 10
|
| ------------------------------------------------ ----------------------
| Methods inherited from tqdm._utils.Comparable:
|
| __eq__(self, other)
| Return self==value.
|
| __ge__(self, other)
| Return self>=value.
|
| __gt__(self, other)
| Return self>value.
|
| __le__(self, other)
| Return self<=value.
|
| __lt__(self, other)
| Return self |
| __ne__ (self, other)
| Return self!=value.
|
| ----------------------------------------------------------------------
| Data des criptors inherited from tqdm._utils.Comparable:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

class progress_bar_loading(threading.Thread)
| progress_bar_lo ading(group=None, target=None, name=None, args=(), kwargs=None, *, daemon=None)
|
| A class that represents a thread of control.
|
| This class can be safely subclassed in a limited fashion. There are two ways
| to specify the activity: by passing a callable object to the construc tor, or
| by overriding the run() method in a subclass.
|
| Method resolution order:
| progress_bar_loading
| threading.Thread
| builtins.object
|
| Methods defined here:
|
| kill(self)
|
| run(self)
| Method representing the thread\'s activity.
|
| You may override this method in a subclass. The standard run() method
| invokes the callable object passed to the object\'s constructor as the
| target argument, if any, with sequential and keyword arguments taken
| from the args and kwargs arguments, respectively.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __all__ = [\'run\', \'kill\']
|
| ------------------------------------------------ ----------------------
| Methods inherited from threading.Thread:
|
| __init__(self, group=None, target=None, name=None, args=(), kwar gs=None, *, daemon=None)
| This constructor should always be called with keyword arguments. Arguments are:
|
| *group* should be None; reserved for future extension when a ThreadGroup
| class is implemented.
|
| *target* is the callable object to be in voked by the run()
| method. Defaults to None, meaning nothing is called.
|
| *name* is the thread name. By default, a unique name is constructed of
| the form "Thread-N" where N is a small decimal number.
|
| *args* is the argument tuple for the targe t invocation. Defaults to ().
|
| *kwargs* is a dictionary of keyword arguments for the target
| invocation. Defaults to {}. |
| If a subclass overrides the constructor, it must make sure to invoke
| the base class constructor (Thread.__init__()) befor e doing anything
| else to the thread.
|
| __repr__(self)
| Return repr(self).
|
| getName(self)
|
| isAlive = is_alive(self)
| Return whether the thread is alive.
|
| This method returns True just before the run() method starts until just
| after the run() method terminates. The module function enumerate()
| returns a list of all alive threads. |
| isDaemon(self)
|
| is_alive(self)
| Return whether the thread is alive.
|
| This method r eturns True just before the run() method starts until just
| after the run() method terminates. The module function enumerate()
| retu rns a list of all alive threads.
|
| join(self, timeout=None)
| Wait until the thread terminates.
|
| This bl ocks the calling thread until the thread whose join() method is
| called terminates -- either normally or through an unhandled exception
| or until the optional timeout occurs.
|
| When the timeout argument is present and not None, it should be a
| floating point n umber specifying a timeout for the operation in seconds
| (or fractions thereof). As join() always returns None, you must call
| isAli ve() after join() to decide whether a timeout happened -- if the
| thread is still alive, the join() call timed out.
|
| When the timeout argument is not present or None, the operation will
| block until the thread terminates.
|
| A thread can be join( )ed many times.
|
| join() raises a RuntimeError if an attempt is made to join the current
| thread as that would cause a dead lock. It is also an error to join() a
| thread before it has been started and attempts to do so raises the same
| exception.
|
| setDaemon(self, daemonic)
|
| setName(self, name)
|
| start(self)
| Start the thread\'s activity.
|
| It must be called at most once per thread object. It arranges for the
| object\'s run() method to be invoked in a separate thread of control.
|
| This method will raise a RuntimeError if called more than once on the
| same thread object.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from threading.Thread:
|
| __di ct__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if def ined)
|
| daemon
| A boolean value indicating whether this thread is a daemon thread.
|
| This must be set be fore start() is called, otherwise RuntimeError is
| raised. Its initial value is inherited from the creating thread; the
| main thread is not a daemon thread and therefore all threads created in
| the main thread default to daemon = False.
|
| The entire Python program exits when no alive non-daemon threads are
| left.
|
| ident
| Thread identifier of this thread or None if it has not been started.
|
| This is a nonzero integer. See the get_ident() function. Thread
| identifiers may be recycled when a thread exits and another thread is
| created. The identifier is available even after the thread has exited.
|
| name
| A string used for identification purposes only.
|
| It has no semantics. Multiple threads may be given the same name. The
| in itial name is set by the constructor.

class progress_types(builtins.object)
| Data descriptors defined here:
|
| __dict__ | dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)< br> |
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __all__ = [\'bar\', \'charging_bar\', \'filling_sqares_bar\', \'filling_circl...
|
| bar =
|
|< br> | charging_bar =
|
|
| countdown =
|
|
| counter =
|
|
| filling_circles_bar =
|
|
| filling_sqares_bar =
|
|
| incremental_bar =
|
|
| line_spinner =
|
|
| moon_spinner =
|
|
| pie =
|
|
| pie_spinner =
|
|
| pixel_bar =
|
|
| pixel_spinner =
|
|
| shady_bar =
|
|
| spinner =
|
|
| stack =

class tqdm(threading.Thread)
| tqdm(args )
|
| tqdm help
|
| Decorate an iterable object, returning an iterator which acts exactly
| like the origi nal iterable, but prints a dynamically updating
| progressbar every time a value is requested.
|
|
| def __init__(self, iterable=None, desc=None, total=None, leave=True,
| file=None, ncols=None, mininterval=0.1,
| maxinterval=10.0, miniters=None, ascii=None, disable=False,
| unit=\'it\', unit_scale=False, dynamic_ncols=False,
| smoothing=0.3, bar_format=None, initial=0, position=None,
| postfix=None, unit_divisor=1000 total=100):
|
| Method resoluti on order:
| tqdm
| threading.Thread
| builtins.object
|
| Methods defined here:
|
| __init_ _(self, args)
| This constructor should always be called with keyword arguments. Arguments are:
|
| *group* should be None; reserv ed for future extension when a ThreadGroup
| class is implemented.
|
| *target* is the callable object to be invoked by the run()< br> | method. Defaults to None, meaning nothing is called.
|
| *name* is the thread name. By default, a unique name is constructed of< br> | the form "Thread-N" where N is a small decimal number.
|
| *args* is the argument tuple for the target invocation. Defaults to ( ).
|
| *kwargs* is a dictionary of keyword arguments for the target
| invocation. Defaults to {}.
|
| If a su bclass overrides the constructor, it must make sure to invoke
| the base class constructor (Thread.__init__()) before doing anything
| els e to the thread.
|
| close()
|
| run(self, between)
| Method representing the thread\'s activity.
|
| You may override this method in a subclass. The standard run() method
| invokes the callable object passed to the object\'s constructor as the
| target argument, if any, with sequential and keyword arguments taken
| from the args and kwargs arguments, respectively.
|
| up date(self, n=1)
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __all__ = [\'run\']
|
| ----------------------------------------------------------------------
| Methods inherited from threa ding.Thread:
|
| __repr__(self)
| Return repr(self).
|
| getName(self)
|
| isAlive = is_alive(self) | Return whether the thread is alive.
|
| This method returns True just before the run() method starts until just
| aft er the run() method terminates. The module function enumerate()
| returns a list of all alive threads.
|
| isDaemon(self)
|
| is_alive(self)
| Return whether the thread is alive.
|
| This method returns True just before the run() method starts until just
| after the run() method terminates. The module function enumerate()
| returns a list of all alive threads.
|
| join(self , timeout=None)
| Wait until the thread terminates.
|
| This blocks the calling thread until the thread whose join() method is
| called terminates -- either normally or through an unhandled exception
| or until the optional timeout occurs.
|
| When the timeout argument is present and not None, it should be a
| floating point number specifying a timeout for the operation in seconds
| (or fr actions thereof). As join() always returns None, you must call
| isAlive() after join() to decide whether a timeout happened -- if the
| th read is still alive, the join() call timed out.
|
| When the timeout argument is not present or None, the operation will
| block un til the thread terminates.
|
| A thread can be join()ed many times.
|
| join() raises a RuntimeError if an attempt is made to join the current
| thread as that would cause a deadlock. It is also an error to join() a
| thread before it has been started and attemp ts to do so raises the same
| exception.
|
| setDaemon(self, daemonic)
|
| setName(self, name)
|
| st art(self)
| Start the thread\'s activity.
|
| It must be called at most once per thread object. It arranges for the
| object\'s run() method to be invoked in a separate thread of control.
|
| This method will raise a RuntimeError if called more than once on the< br> | same thread object.
|
| ----------------------------------------------------------------------
| Data descriptors inherited from threading.Thread:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| li st of weak references to the object (if defined)
|
| daemon
| A boolean value indicating whether this thread is a daemon thread.
|
| This must be set before start() is called, otherwise RuntimeError is
| raised. Its initial value is inherited from the creating thread; the
| main thread is not a daemon thread and therefore all threads created in
| the main thread default to daemon = False.
|
| The entire Python program exits when no alive non-daemon threads are
| left.
|
| ident
| Thread identifier of this thread or None if it has not been started.
|
| This is a nonzero integer. See the get_ident() function. Thread
| identifiers may be recycled when a thread exits and another thread is
| created. The identifier is available even after the thread has exited.
|
| name
| A string used for identification purposes only.
|
| It has no semantics. Multiple threads may be given the same name. The
| initial name is set by the constructor.

class tqdm_gui(tqdm._tqdm.tqdm)
| tqdm_gui(*args, **kwargs)
|
| Experimental GUI version of tqdm!
|
| Method resolution order:
| tqdm_gui
| tqdm._tqdm.tqdm
| tqdm._utils.Comparable
| bu iltins.object
|
| Methods defined here:
|
| __init__(self, *args, **kwargs)
| Parameters
| ----------
| iterable : iterable, optional
| Iterable to decorate with a progressbar.
| Leave blank to manually manage the updates.
| desc : str, optional
| Prefix for the progressbar.
| total : int, optional
| The number is expected iteration s. If unspecified,
| len(iterable) is used if possible. If float("inf") or as a last
| resort, only basic progress statistics are d isplayed
| (no ETA, no progressbar).
| If `gui` is True and this parameter needs subsequent updating,
| specify an initial arbitrary large positive integer,
| e.g. int(9e9).
| leave : bool, optional
| If [default: True], keeps all t races of the progressbar
| upon termination of iteration.
| file : `io.TextIOWrapper` or `io.StringIO`, optional
| Sp ecifies where to output the progress messages
| (default: sys.stderr). Uses `file.write(str)` and `file.flush()`
| methods.
| ncols : int, optional
| The width of the entire output message. If specified,
| dynamically resizes the progressbar to stay within this bound.
| If unspecified, attempts to use environment width. The
| fallback is a meter width of 10 and no limit for the counter and
| statistics. If 0, will not print any meter (only stats).
| mininterval : float, optional
| Minimum prog ress display update interval [default: 0.1] seconds.
| maxinterval : float, optional
| Maximum progress display update interval [defau lt: 10] seconds.
| Automatically adjusts `miniters` to correspond to `mininterval`
| after long display update lag. Only works if ` dynamic_miniters`
| or monitor thread is enabled.
| miniters : int, optional
| Minimum progress display update interv al, in iterations.
| If 0 and `dynamic_miniters`, will automatically adjust to equal
| `mininterval` (more CPU efficient, good for tight loops).
| If > 0, will skip display of specified number of iterations.
| Tweak this and `mininterval` to get very efficient l oops.
| If your progress is erratic with both fast and slow iterations
| (network, skipping items, etc) you should set miniters=1.< br> | ascii : bool, optional
| If unspecified or False, use unicode (smooth blocks) to fill
| the meter. The fallback is to use ASCII characters `1-9 #`.
| disable : bool, optional
| Whether to disable the entire progressbar wrapper
| [de fault: False]. If set to None, disable on non-TTY.
| unit : str, optional
| String that will be used to define the unit of each iterat ion
| [default: it].
| unit_scale : bool or int or float, optional
| If 1 or True, the number of iterations will be r educed/scaled
| automatically and a metric prefix following the
| International System of Units standard will be added
| (kilo, mega, etc.) [default: False]. If any other non-zero
| number, will scale `total` and `n`.
| dynamic_ncols : bool, optional
| If set, constantly alters `ncols` to the environment (allowing
| for window resizes) [default: False].
| smoothing : float, optional
| Exponential moving average smoothing factor for speed estimates
| (ignored in GUI mode). Ranges from 0 (average speed) t o 1
| (current/instantaneous speed) [default: 0.3].
| bar_format : str, optional
| Specify a custom bar string format ting. May impact performance.
| [default: \'{l_bar}{bar}{r_bar}\'], where
| l_bar=\'{desc}: {percentage:3.0f}%|\' and
| r_bar=\'| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, \'
| \'{rate_fmt}{postfix}]\'
| Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
| percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt,
| rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix.
| Note that a trailing ": " is automatically removed after {desc}
| if the latter is empty.
| initial : int, optional
| The initial counter value. Useful when restarting a progress
| bar [default: 0].
| position : int, optiona l
| Specify the line offset to print this bar (starting from 0)
| Automatic if unspecified.
| Useful to manage mul tiple bars at once (eg, from threads).
| postfix : dict or *, optional
| Specify additional stats to display at the end of the bar.
| Calls `set_postfix(**postfix)` if possible (dict).
| unit_divisor : float, optional
| [default: 1000], ignored unless `unit_scale` is True.
| gui : bool, optional
| WARNING: internal parameter - do not use.
| Use tqdm_gui(...) instead. If set, will attempt to use
| matplotlib animations for a graphical output [default: False].
|
| Returns
| -------
| out : decorated iterator.
|
| __iter__(self)
| Backward-compatibility to use: for x in tqdm(iterable)
|
| close(self)
| Cleanup and (if leave=False) close the progressbar.
|
| update(self, n=1)
| Manually update the progress bar, useful for streams
| such as reading files.
| E.g.:
| >>> t = tqdm(total=filesize) # Initialise
| >>> for cu rrent_buffer in stream:
| ... ...
| ... t.update(len(current_buffer))
| >>> t.close()
| The last line is hi ghly recommended, but possibly not necessary if
| `t.update()` will be called in such a way that `filesize` will be
| exactly reached and p rinted.
|
| Parameters
| ----------
| n : int, optional
| Increment to add to the internal counter o f iterations
| [default: 1].
|
| ----------------------------------------------------------------------
| Methods inherite d from tqdm._tqdm.tqdm:
|
| __del__(self)
|
| __enter__(self)
|
| __exit__(self, *exc)
|
| __hash __(self)
| Return hash(self).
|
| __len__(self)
|
| __repr__(self)
| Return repr(self).
|
| clear(self, nolock=False)
| Clear current bar display
|
| display(self, msg=None, pos=None)
| Use `self.sp` and to disp lay `msg` in the specified `pos`.
|
| Parameters
| ----------
| msg : what to display (default: repr(self))
| pos : position to display in. (default: abs(self.pos))
|
| moveto(self, n)
|
| refresh(self, nolock=False)
| Force re fresh the display of this bar
|
| set_description(self, desc=None, refresh=True)
| Set/modify description of the progress bar.
|
| Parameters
| ----------
| desc : str, optional
| refresh : bool, optional
| Forces refresh [default: True].
|
| set_description_str(self, desc=None, refresh=True)
| Set/modify description without \': \' appended.
|
| set_postfix(self, ordered_dict=None, refresh=True, **kwargs)
| Set/modify postfix (additional stats)
| with automatic formatting based o n datatype.
|
| Parameters
| ----------
| ordered_dict : dict or OrderedDict, optional
| refresh : bool , optional
| Forces refresh [default: True].
| kwargs : dict, optional
|
| set_postfix_str(self, s=\'\', refresh=True )
| Postfix without dictionary expansion, similar to prefix handling.
|
| unpause(self)
| Restart tqdm timer from last pri nt time.
|
| ----------------------------------------------------------------------
| Class methods inherited from tqdm._tqdm.tqdm:
|
| external_write_mode(file=None, nolock=False) from builtins.type
| Disable tqdm within context and refresh tqdm when exits.
| U seful when writing to standard output stream
|
| get_lock() from builtins.type
| Get the global lock. Construct it if it does not exist .
|
| pandas(*targs, **tkwargs) from builtins.type
| Registers the given `tqdm` class with
| pandas.core.
| ( frame.DataFrame
| | series.Series
| | groupby.DataFrameGroupBy
| | groupby.SeriesGroupBy
| ).pr ogress_apply
|
| A new instance will be create every time `progress_apply` is called,
| and each instance will automatically close( ) upon completion.
|
| Parameters
| ----------
| targs, tkwargs : arguments for the tqdm instance
|
| Examples
| --------
| >>> import pandas as pd
| >>> import numpy as np
| >>> from tqdm import tqdm, tqdm_gui
| >>>
| >>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
| >>> tqdm.pandas(ncols=50) # can use tqdm_gui, optional kwargs , etc
| >>> # Now you can use `progress_apply` instead of `apply`
| >>> df.groupby(0).progress_apply(lambda x: x**2)
|
| References
| ----------
| https://stackoverflow.com/questions/18603270/
| progress-indicator-during-pandas operations-python |
| set_lock(lock) from builtins.type
| Set the global lock.
|
| write(s, file=None, end=\'
\', nolock=False) from b uiltins.type
| Print a message via tqdm (without overlap with bars)
|
| --------------------------------------------------------------- -------
| Static methods inherited from tqdm._tqdm.tqdm:
|
| __new__(cls, *args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ema(x, mu=None, alpha=0.3)
| Exponential moving average: smoothing to give progressively low er
| weights to older values.
|
| Parameters
| ----------
| x : float
| New value to in clude in EMA.
| mu : float, optional
| Previous EMA value.
| alpha : float, optional
| Smoothing factor in range [0, 1], [default: 0.3].
| Increase to give more weight to recent values.
| Ranges from 0 (yields mu) to 1 (yields x).
|
| format_interval(t)
| Formats a number of seconds as a clock time, [H:]MM:SS
|
| Parameters
| ---------- | t : int
| Number of seconds.
|
| Returns
| -------
| out : str
| [H: ]MM:SS
|
| format_meter(n, total, elapsed, ncols=None, prefix=\'\', ascii=False, unit=\'it\', unit_scale=False, rate=None, bar_format=None, postfix= None, unit_divisor=1000, **extra_kwargs)
| Return a string-based progress bar given some parameters
|
| Parameters
| - ---------
| n : int
| Number of finished iterations.
| total : int
| The expected total number of itera tions. If meaningless (), only
| basic progress statistics are displayed (no ETA).
| elapsed : float
| Number of seco nds passed since start.
| ncols : int, optional
| The width of the entire output message. If specified,
| dynamically resizes the progress meter to stay within this bound
| [default: None]. The fallback meter width is 10 for the progress
| bar + no limit for the iterations counter and statistics. If 0,
| will not print any meter (only stats).
| prefix : str, optional
| Prefix message (included in total width) [default: \'\'].
| Use as {desc} in bar_format string.
| ascii : bool, optional
| If not set, use unicode (smooth blocks) to fill the meter
| [default: False]. The fallback is to use ASCII characters
| (1-9 #).
| unit : str, optional
| The iteration unit [default: \'it\'].
| unit_scale : bool or int or float, optional
| If 1 or True, the number of iterations will be printed with an
| appropriate SI metric prefix (k = 10^3, M = 10^6, etc.)
| [default : False]. If any other non-zero number, will scale
| `total` and `n`.
| rate : float, optional
| Manual override for iteration rate.
| If [default: None], uses n/elapsed.
| bar_format : str, optional
| Specify a custom bar string form atting. May impact performance.
| [default: \'{l_bar}{bar}{r_bar}\'], where
| l_bar=\'{desc}: {percentage:3.0f}%|\' and
| r_bar=\'| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, \'
| \'{rate_fmt}{postfix}]\'
| Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
| percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt,
| rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix.
| Note that a trailing ": " is automatically removed after {desc}
| if the latter is empty.
| postfix : *, o ptional
| Similar to `prefix`, but placed at the end
| (e.g. for additional stats).
| Note: postfix is usually a s tring (not a dict) for this method,
| and will if possible be set to postfix = \', \' + postfix.
| However other types are supporte d (#382).
| unit_divisor : float, optional
| [default: 1000], ignored unless `unit_scale` is True.
|
| Returns
| -------
| out : Formatted meter and stats, ready to display.
|
| format_num(n)
| Intelligent scientific nota tion (.3g).
|
| Parameters
| ----------
| n : int or float or Numeric
| A Number.
|
| Returns
| -------
| out : str
| Formatted number.
|
| format_sizeof(num, suffix=\'\', divisor=100 0)
| Formats a number (greater than unity) with SI Order of Magnitude
| prefixes.
|
| Parameters
| ------ ----
| num : float
| Number ( >= 1) to format.
| suffix : str, optional
| Post-postfix [default: \'\'].
| divisor : float, optionl
| Divisor between prefixes [default: 1000].
|
| Returns
| -------
| out : str
| Number with Order of Magnitude SI unit postfix.
|
| status_printer(file)
| Manage the printing and in-place updating of a line of characters.
| Note that if the string is longer than a line, then in-place
| updating may not work (it will print a new line at each refresh).
|
| ----------------------------------------------------------------------
| Data descriptors inherited from tqdm._tqdm.tqdm:
|
| format_dict
| Public API for read-only member access
|
| ----------------------------------- -----------------------------------
| Data and other attributes inherited from tqdm._tqdm.tqdm:
|
| monitor = None
|
| mon itor_interval = 10
|
| ----------------------------------------------------------------------
| Methods inherited from tqdm._utils.Comparab le:
|
| __eq__(self, other)
| Return self==value.
|
| __ge__(self, other)
| Return self>=value.
|
| __gt__(self, other)
| Return self>value.
|
| __le__(self, other)
| Return self<=value.
|
| __l t__(self, other)
| Return self |
| __ne__(self, other)
| Return self!=value.
|
| ------------------- ---------------------------------------------------
| Data descriptors inherited from tqdm._utils.Comparable:
|
| __dict__
| di ctionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

FUNCTIONS
_code(txt)

all_dict(dictory, exceptions=None, file_types=None, maps=True, files=False, print_data=False)

bar(rn, fill=\'.\')

download (url, file, path=None)

more_input()

obj_type = object_type(obj)

object_type(obj)

test()

update_progress(progres s)
# update_progress() : Displays or updates a console progress bar
## Accepts a float between 0 and 1. Any int will be converted to a float.
## A value under 0 represents a \'halt\'.
## A value at 1 or bigger represents 100%

DATA
__all__ = [\'os_sys\', \'fail\', \'modules\ ', \'system\', \'wifi\', \'programs\', ...
web =
' '


No Python documentation found for 'Bar'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'ChargingBar'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'Countdown'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'Counter'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'FillingCirclesBar'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'FillingSquaresBar'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'IncrementalBar'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'Infinite'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'LineSpinner'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'MoonSpinner'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'Pie'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'PieSpinner'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'PixelBar'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'PixelSpinner'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'Progress'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'ShadyBar'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'Spinner'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'Stack'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'Thread'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'WriteMixin'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'WritelnMixin'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for '__all__'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for '__builtins__'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for '__cached__'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

Help on str object:

__doc__ = class str(object)
| str(object='') -> str
| str(bytes_or_buffer[, encoding[, errors]]) -> str
|
| Create a new string object from the given object. If encoding or
| errors is specified, then the object must expose a data buffer
| that will be decoded using the given encoding and error handler.
| Otherwise, returns the result of object.__str__() (if defined)
| or repr(object).
| encoding defaults to sys.getdefaultencoding().
| errors defaults to 'strict'.
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return key in self.
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(self, format_spec, /)
| Return a formatted version of the string as described by format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self |
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| __str__(self, /)
| Return str(self).
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Use keyword.iskeyword() to test for reserved identifiers such as "def" and
| "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the words in the string, using sep as the delimiter string.
|
| sep
| The delimiter according which to split the string.
| None (the default value) means split according to any whitespace,
| and discard empty strings from the result.
| maxsplit
| Maximum number of splits to do.
| -1 (the default value) means no limit.
|
| Splits are done starting at the end of the string and working to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the words in the string, using sep as the delimiter string.
|
| sep
| The delimiter according which to split the string.
| None (the default value) means split according to any whitespace,
| and discard empty strings from the result.
| maxsplit
| Maximum number of splits to do.
| -1 (the default value) means no limit.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace remove.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
|



| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
| maketrans(x, y=None, z=None, /)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.

No Python documentation found for '__file__'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

Help on class BuiltinImporter in module importlib._bootstrap:

__loader__ = class BuiltinImporter(builtins.object)
| Meta path import for built-in modules.
|
| All methods are either class or static methods to avoid the need to
| instantiate the class.
|
| Class methods defined here:
|
| create_module(spec) from builtins.type
| Create a built-in module
|
| exec_module(module) from builtins.type
| Exec a built-in module
|
| find_module(fullname, path=None) from builtins.type
| Find the built-in module.
|
| If 'path' is ever specified then the search is considered a failure.
|
| This method is deprecated. Use find_spec() instead.
|
| find_spec(fullname, path=None, target=None) from builtins.type
|
| get_code(fullname) from builtins.type
| Return None as built-in modules do not have code objects.
|
| get_source(fullname) from builtins.type
| Return None as built-in modules do not have source code.
|
| is_package(fullname) from builtins.type
| Return False as built-in modules are never packages.
|
| load_module = _load_module_shim(fullname) from builtins.type
| Load the specified module into sys.modules and return it.
|
| This method is deprecated. Use loader.exec_module instead.
|
|

| Static methods defined here:
|
| module_repr(module)
| Return repr for the module.
|
| The method is deprecated. The import machinery does the job itself.
|
|

| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

Help on str object:

__name__ = class str(object)
| str(object='') -> str
| str(bytes_or_buffer[, encoding[, errors]]) -> str
|
| Create a new string object from the given object. If encoding or
| errors is specified, then the object must expose a data buffer
| that will be decoded using the given encoding and error handler.
| Otherwise, returns the result of object.__str__() (if defined)
| or repr(object).
| encoding defaults to sys.getdefaultencoding().
| errors defaults to 'strict'.
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return key in self.
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(self, format_spec, /)
| Return a formatted version of the string as described by format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self |
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| __str__(self, /)
| Return str(self).
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Use keyword.iskeyword() to test for reserved identifiers such as "def" and
| "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the words in the string, using sep as the delimiter string.
|
| sep
| The delimiter according which to split the string.
| None (the default value) means split according to any whitespace,
| and discard empty strings from the result.
| maxsplit
| Maximum number of splits to do.
| -1 (the default value) means no limit.
|
| Splits are done starting at the end of the string and working to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the words in the string, using sep as the delimiter string.
|
| sep
| The delimiter according which to split the string.
| None (the default value) means split according to any whitespace,
| and discard empty strings from the result.
| maxsplit
| Maximum number of splits to do.
| -1 (the default value) means no limit.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace remove.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
| maketrans(x, y=None, z=None, /)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.

Help on str object:

__package__ = class str(object)
| str(object='') -> str
| str(bytes_or_buffer[, encoding[, errors]]) -> str
|
| Create a new string object from the given object. If encoding or
| errors is specified, then the object must expose a data buffer
| that will be decoded using the given encoding and error handler.
| Otherwise, returns the result of object.__str__() (if defined)
| or repr(object).
| encoding defaults to sys.getdefaultencoding().
| errors defaults to 'strict'.
|
| Methods defined here:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return key in self.
|
| __eq__(self, value, /)
| Return self==value.
|
| __format__(self, format_spec, /)
| Return a formatted version of the string as described by format_spec.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(...)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self |
| __mod__(self, value, /)
| Return self%value.
|
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __repr__(self, /)
| Return repr(self).
|
| __rmod__(self, value, /)
| Return value%self.
|
| __rmul__(self, value, /)
| Return value*self.
|
| __sizeof__(self, /)
| Return the size of the string in memory, in bytes.
|
| __str__(self, /)
| Return str(self).
|
| capitalize(self, /)
| Return a capitalized version of the string.
|
| More specifically, make the first character have upper case and the rest lower
| case.
|
| casefold(self, /)
| Return a version of the string suitable for caseless comparisons.
|
| center(self, width, fillchar=' ', /)
| Return a centered string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| count(...)
| S.count(sub[, start[, end]]) -> int
|
| Return the number of non-overlapping occurrences of substring sub in
| string S[start:end]. Optional arguments start and end are
| interpreted as in slice notation.
|
| encode(self, /, encoding='utf-8', errors='strict')
| Encode the string using the codec registered for encoding.
|
| encoding
| The encoding in which to encode the string.
| errors
| The error handling scheme to use for encoding errors.
| The default is 'strict' meaning that encoding errors raise a
| UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
| 'xmlcharrefreplace' as well as any other name registered with
| codecs.register_error that can handle UnicodeEncodeErrors.
|
| endswith(...)
| S.endswith(suffix[, start[, end]]) -> bool
|
| Return True if S ends with the specified suffix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| suffix can also be a tuple of strings to try.
|
| expandtabs(self, /, tabsize=8)
| Return a copy where all tab characters are expanded using spaces.
|
| If tabsize is not given, a tab size of 8 characters is assumed.
|
| find(...)
| S.find(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| format(...)
| S.format(*args, **kwargs) -> str
|
| Return a formatted version of S, using substitutions from args and kwargs.
| The substitutions are identified by braces ('{' and '}').
|
| format_map(...)
| S.format_map(mapping) -> str
|
| Return a formatted version of S, using substitutions from mapping.
| The substitutions are identified by braces ('{' and '}').
|
| index(...)
| S.index(sub[, start[, end]]) -> int
|
| Return the lowest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| isalnum(self, /)
| Return True if the string is an alpha-numeric string, False otherwise.
|
| A string is alpha-numeric if all characters in the string are alpha-numeric and
| there is at least one character in the string.
|
| isalpha(self, /)
| Return True if the string is an alphabetic string, False otherwise.
|
| A string is alphabetic if all characters in the string are alphabetic and there
| is at least one character in the string.
|
| isascii(self, /)
| Return True if all characters in the string are ASCII, False otherwise.
|
| ASCII characters have code points in the range U+0000-U+007F.
| Empty string is ASCII too.
|
| isdecimal(self, /)
| Return True if the string is a decimal string, False otherwise.
|
| A string is a decimal string if all characters in the string are decimal and
| there is at least one character in the string.
|
| isdigit(self, /)
| Return True if the string is a digit string, False otherwise.
|
| A string is a digit string if all characters in the string are digits and there
| is at least one character in the string.
|
| isidentifier(self, /)
| Return True if the string is a valid Python identifier, False otherwise.
|
| Use keyword.iskeyword() to test for reserved identifiers such as "def" and
| "class".
|
| islower(self, /)
| Return True if the string is a lowercase string, False otherwise.
|
| A string is lowercase if all cased characters in the string are lowercase and
| there is at least one cased character in the string.
|
| isnumeric(self, /)
| Return True if the string is a numeric string, False otherwise.
|
| A string is numeric if all characters in the string are numeric and there is at
| least one character in the string.
|
| isprintable(self, /)
| Return True if the string is printable, False otherwise.
|
| A string is printable if all of its characters are considered printable in
| repr() or if it is empty.
|
| isspace(self, /)
| Return True if the string is a whitespace string, False otherwise.
|
| A string is whitespace if all characters in the string are whitespace and there
| is at least one character in the string.
|
| istitle(self, /)
| Return True if the string is a title-cased string, False otherwise.
|
| In a title-cased string, upper- and title-case characters may only
| follow uncased characters and lowercase characters only cased ones.
|
| isupper(self, /)
| Return True if the string is an uppercase string, False otherwise.
|
| A string is uppercase if all cased characters in the string are uppercase and
| there is at least one cased character in the string.
|
| join(self, iterable, /)
| Concatenate any number of strings.
|
| The string whose method is called is inserted in between each given string.
| The result is returned as a new string.
|
| Example: '.'.join(['ab', 'pq', 'rs']) -> 'ab.pq.rs'
|
| ljust(self, width, fillchar=' ', /)
| Return a left-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| lower(self, /)
| Return a copy of the string converted to lowercase.
|
| lstrip(self, chars=None, /)
| Return a copy of the string with leading whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| partition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string. If the separator is found,
| returns a 3-tuple containing the part before the separator, the separator
| itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing the original string
| and two empty strings.
|
| replace(self, old, new, count=-1, /)
| Return a copy with all occurrences of substring old replaced by new.
|
| count
| Maximum number of occurrences to replace.
| -1 (the default value) means replace all occurrences.
|
| If the optional argument count is given, only the first count occurrences are
| replaced.
|
| rfind(...)
| S.rfind(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Return -1 on failure.
|
| rindex(...)
| S.rindex(sub[, start[, end]]) -> int
|
| Return the highest index in S where substring sub is found,
| such that sub is contained within S[start:end]. Optional
| arguments start and end are interpreted as in slice notation.
|
| Raises ValueError when the substring is not found.
|
| rjust(self, width, fillchar=' ', /)
| Return a right-justified string of length width.
|
| Padding is done using the specified fill character (default is a space).
|
| rpartition(self, sep, /)
| Partition the string into three parts using the given separator.
|
| This will search for the separator in the string, starting at the end. If
| the separator is found, returns a 3-tuple containing the part before the
| separator, the separator itself, and the part after it.
|
| If the separator is not found, returns a 3-tuple containing two empty strings
| and the original string.
|
| rsplit(self, /, sep=None, maxsplit=-1)
| Return a list of the words in the string, using sep as the delimiter string.
|
| sep
| The delimiter according which to split the string.
| None (the default value) means split according to any whitespace,
| and discard empty strings from the result.
| maxsplit
| Maximum number of splits to do.
| -1 (the default value) means no limit.
|
| Splits are done starting at the end of the string and working to the front.
|
| rstrip(self, chars=None, /)
| Return a copy of the string with trailing whitespace removed.
|
| If chars is given and not None, remove characters in chars instead.
|
| split(self, /, sep=None, maxsplit=-1)
| Return a list of the words in the string, using sep as the delimiter string.
|
| sep
| The delimiter according which to split the string.
| None (the default value) means split according to any whitespace,
| and discard empty strings from the result.
| maxsplit
| Maximum number of splits to do.
| -1 (the default value) means no limit.
|
| splitlines(self, /, keepends=False)
| Return a list of the lines in the string, breaking at line boundaries.
|
| Line breaks are not included in the resulting list unless keepends is given and
| true.
|
| startswith(...)
| S.startswith(prefix[, start[, end]]) -> bool
|
| Return True if S starts with the specified prefix, False otherwise.
| With optional start, test S beginning at that position.
| With optional end, stop comparing S at that position.
| prefix can also be a tuple of strings to try.
|
| strip(self, chars=None, /)
| Return a copy of the string with leading and trailing whitespace remove.
|
| If chars is given and not None, remove characters in chars instead.
|
| swapcase(self, /)
| Convert uppercase characters to lowercase and lowercase characters to uppercase.
|
| title(self, /)
| Return a version of the string where each word is titlecased.
|
| More specifically, words start with uppercased characters and all remaining
| cased characters have lower case.
|
| translate(self, table, /)
| Replace each character in the string using the given translation table.
|
| table
| Translation table, which must be a mapping of Unicode ordinals to
| Unicode ordinals, strings, or None.
|
| The table must implement lookup/indexing via __getitem__, for instance a
| dictionary or list. If this operation raises LookupError, the character is
| left untouched. Characters mapped to None are deleted.
|
| upper(self, /)
| Return a copy of the string converted to uppercase.
|
| zfill(self, width, /)
| Pad a numeric string with zeros on the left, to fill a field of the given width.
|
| The string is never truncated.
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
| maketrans(x, y=None, z=None, /)
| Return a translation table usable for str.translate().
|
| If there is only one argument, it must be a dictionary mapping Unicode
| ordinals (integers) or characters to Unicode ordinals, strings or None.
| Character keys will be then converted to ordinals.
| If there are two arguments, they must be strings of equal length, and
| in the resulting dictionary, each character in x will be mapped to the
| character at the same position in y. If there is a third argument, it
| must be a string, whose characters will be mapped to None in the result.

No Python documentation found for '__path__'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

Help on ModuleSpec in module importlib._bootstrap object:

__spec__ = class ModuleSpec(builtins.object)
| __spec__(name, loader, *, origin=None, loader_state=None, is_package=None)
|
| The specification for a module, used for loading.
|
| A module's spec is the source for information about the module. For
| data associated with the module, including source, use the spec's
| loader.
|
| `name` is the absolute name of the module. `loader` is the loader
| to use when loading the module. `parent` is the name of the
| package the module is in. The parent is derived from the name.
|
| `is_package` determines if the module is considered a package or
| not. On modules this is reflected by the `__path__` attribute.
|
| `origin` is the specific location used by the loader from which to
| load the module, if that information is available. When filename is
| set, origin will match.
|
| `has_location` indicates that a spec's "origin" reflects a location.
| When this is True, `__file__` attribute of the module is set.
|
| `cached` is the location of the cached bytecode file, if any. It
| corresponds to the `__cached__` attribute.
|
| `submodule_search_locations` is the sequence of path entries to
| search when importing submodules. If set, is_package should be
| True--and False otherwise.
|
| Packages are simply modules that (may) have submodules. If a spec
| has a non-None value in `submodule_search_locations`, the import
| system will consider modules loaded from the spec as packages.
|
| Only finders (see importlib.abc.MetaPathFinder and
| importlib.abc.PathEntryFinder) should modify ModuleSpec instances.
|
| Methods defined here:
|
| __eq__(self, other)
| Return self==value.
|
| __init__(self, name, loader, *, origin=None, loader_state=None, is_package=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
|

| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| cached
|
| has_location
|
| parent
| The name of the module's parent.
|
|

| Data and other attributes defined here:
|
| __hash__ = None

No Python documentation found for '_code'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for '_download'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for '_g'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for '_ins'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for '_m'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for '_t_q_d_m_'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'all_dict'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'bar'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'c_list'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'cmd_parser'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

Help on package docs:

NAME
docs

PACKAGE CONTENTS


FILE
(built-in)


Help on package download:

NAME
download - A tiny module to make downloading with python super easy.

PACKAGE CONTENTS
download
tests (package)

VERSION
0.3.3

FILE
c:\users\matthijs\appdata\local\programs\python\python37\lib\site-packages\download\__init__.py


No Python documentation found for 'get_newest_version'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'gpl'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'gui_bar'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'kill'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'make_text'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'more_input'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'msg'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'my_module'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'obj_type'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'object_type'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

Help on module os:

NAME
os - OS routines for NT or Posix depending on what system we're on.

DESCRIPTION
This exports:
- all functions from posix or nt, e.g. unlink, stat, etc.
- os.path is either posixpath or ntpath
- os.name is either 'posix' or 'nt'
- os.curdir is a string representing the current directory (always '.')
- os.pardir is a string representing the parent directory (always '..')
- os.sep is the (or a most common) pathname separator ('/' or '\\')
- os.extsep is the extension separator (always '.')
- os.altsep is the alternate pathname separator (None or '/')
- os.pathsep is the component separator used in $PATH etc
- os.linesep is the line separator in text files ('\r' or '\n' or '\r\n')
- os.defpath is the default search path for executables
- os.devnull is the file path of the null device ('/dev/null', etc.)

Programs that import and use 'os' stand a better chance of being
portable between different platforms. Of course, they must then
only use functions that are defined by all platforms (e.g., unlink
and opendir), and leave all pathname manipulation to os.path
(e.g., split and join).

CLASSES
builtins.Exception(builtins.BaseException)
builtins.OSError
builtins.object
nt.DirEntry
builtins.tuple(builtins.object)
nt.times_result
nt.uname_result
stat_result
statvfs_result
terminal_size

class DirEntry(builtins.object)
| Methods defined here:
|
| __fspath__(self, /)
| Returns the path for the entry.
|
| __repr__(self, /)
| Return repr(self).
|
| inode(self, /)
| Return inode of the entry; cached per entry.
|
| is_dir(self, /, *, follow_symlinks=True)
| Return True if the entry is a directory; cached per entry.
|
| is_file(self, /, *, follow_symlinks=True)
| Return True if the entry is a file; cached per entry.
|
| is_symlink(self, /)
| Return True if the entry is a symbolic link; cached per entry.
|
| stat(self, /, *, follow_symlinks=True)
| Return stat_result object for the entry; cached per entry.
|
|

| Data descriptors defined here:
|
| name
| the entry's base filename, relative to scandir() "path" argument
|
| path
| the entry's full path name; equivalent to os.path.join(scandir_path, entry.name)

error = class OSError(Exception)
| Base class for I/O related errors.
|
| Method resolution order:
| OSError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __reduce__(...)
| Helper for pickle.
|
| __str__(self, /)
| Return str(self).
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Data descriptors defined here:
|
| characters_written
|
| errno
| POSIX exception code
|
| filename
| exception filename
|
| filename2
| second exception filename
|
| strerror
| exception strerror
|
| winerror
| Win32 exception code
|
|

| Methods inherited from BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class stat_result(builtins.tuple)
| stat_result(iterable=(), /)
|
| stat_result: Result from stat, fstat, or lstat.
|
| This object may be accessed either as a tuple of
| (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime)
| or via the attributes st_mode, st_ino, st_dev, st_nlink, st_uid, and so on.
|
| Posix/windows: If your platform supports st_blksize, st_blocks, st_rdev,
| or st_flags, they are available as attributes only.
|
| See os.stat for more information.
|
| Method resolution order:
| stat_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Data descriptors defined here:
|
| st_atime
| time of last access
|
| st_atime_ns
| time of last access in nanoseconds
|
| st_ctime
| time of last change
|
| st_ctime_ns
| time of last change in nanoseconds
|
| st_dev
| device
|
| st_file_attributes
| Windows file attribute bits
|
| st_gid
| group ID of owner
|
| st_ino
| inode
|
| st_mode
| protection bits
|
| st_mtime
| time of last modification
|
| st_mtime_ns
| time of last modification in nanoseconds
|
| st_nlink
| number of hard links
|
| st_size
| total size, in bytes
|
| st_uid
| user ID of owner
|
|

| Data and other attributes defined here:
|
| n_fields = 17
|
| n_sequence_fields = 10
|
| n_unnamed_fields = 3
|
|

| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return key in self.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self |
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.

class statvfs_result(builtins.tuple)
| statvfs_result(iterable=(), /)
|
| statvfs_result: Result from statvfs or fstatvfs.
|
| This object may be accessed either as a tuple of
| (bsize, frsize, blocks, bfree, bavail, files, ffree, favail, flag, namemax),
| or via the attributes f_bsize, f_frsize, f_blocks, f_bfree, and so on.
|
| See os.statvfs for more information.
|
| Method resolution order:
| statvfs_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Data descriptors defined here:
|
| f_bavail
|
| f_bfree
|
| f_blocks
|
| f_bsize
|
| f_favail
|
| f_ffree
|
| f_files
|
| f_flag
|
| f_frsize
|
| f_fsid
|
| f_namemax
|
|

| Data and other attributes defined here:
|
| n_fields = 11
|
| n_sequence_fields = 10
|
| n_unnamed_fields = 0
|
|

| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return key in self.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self |
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.

class terminal_size(builtins.tuple)
| terminal_size(iterable=(), /)
|
| A tuple of (columns, lines) for holding terminal window size
|
| Method resolution order:
| terminal_size
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Data descriptors defined here:
|
| columns
| width of the terminal window in characters
|
| lines
| height of the terminal window in characters
|
|

| Data and other attributes defined here:
|
| n_fields = 2
|
| n_sequence_fields = 2
|
| n_unnamed_fields = 0
|
|

| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return key in self.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self |
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.

class times_result(builtins.tuple)
| times_result(iterable=(), /)
|
| times_result: Result from os.times().
|
| This object may be accessed either as a tuple of
| (user, system, children_user, children_system, elapsed),
| or via the attributes user, system, children_user, children_system,
| and elapsed.
|
| See os.times for more information.
|
| Method resolution order:
| times_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Data descriptors defined here:
|
| children_system
| system time of children
|
| children_user
| user time of children
|
| elapsed
| elapsed time since an arbitrary point in the past
|
| system
| system time
|
| user
| user time
|
|

| Data and other attributes defined here:
|
| n_fields = 5
|
| n_sequence_fields = 5
|
| n_unnamed_fields = 0
|
|

| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return key in self.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self |
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.

class uname_result(builtins.tuple)
| uname_result(iterable=(), /)
|
| uname_result: Result from os.uname().
|
| This object may be accessed either as a tuple of
| (sysname, nodename, release, version, machine),
| or via the attributes sysname, nodename, release, version, and machine.
|
| See os.uname for more information.
|
| Method resolution order:
| uname_result
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Data descriptors defined here:
|
| machine
| hardware identifier
|
| nodename
| name of machine on network (implementation-defined)
|
| release
| operating system release
|
| sysname
| operating system name
|
| version
| operating system version
|
|

| Data and other attributes defined here:
|
| n_fields = 5
|
| n_sequence_fields = 5
|
| n_unnamed_fields = 0
|
|

| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return key in self.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self |
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.

FUNCTIONS
_exit(status)
Exit to the system with specified status, without normal exit processing.

abort()
Abort the interpreter immediately.

This function 'dumps core' or otherwise fails in the hardest way possible
on the hosting operating system. This function never returns.

access(path, mode, *, dir_fd=None, effective_ids=False, follow_symlinks=True)
Use the real uid/gid to test for access to a path.

path
Path to be tested; can be string or bytes
mode
Operating-system mode bitfield. Can be F_OK to test existence,
or the inclusive-OR of R_OK, W_OK, and X_OK.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
effective_ids
If True, access will use the effective uid/gid instead of
the real uid/gid.
follow_symlinks
If False, and the last element of the path is a symbolic link,
access will examine the symbolic link itself instead of the file
the link points to.

dir_fd, effective_ids, and follow_symlinks may not be implemented
on your platform. If they are unavailable, using them will raise a
NotImplementedError.

Note that most operations will use the effective uid/gid, therefore this
routine can be used in a suid/sgid environment to test if the invoking user
has the specified access to the path.

chdir(path)
Change the current working directory to the specified path.

path may always be specified as a string.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.

chmod(path, mode, *, dir_fd=None, follow_symlinks=True)
Change the access permissions of a file.

path
Path to be modified. May always be specified as a str or bytes.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.
mode
Operating-system mode bitfield.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that
directory.
follow_symlinks
If False, and the last element of the path is a symbolic link,
chmod will modify the symbolic link itself instead of the file
the link points to.

It is an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.
dir_fd and follow_symlinks may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.

close(fd)
Close a file descriptor.

closerange(fd_low, fd_high, /)
Closes all file descriptors in [fd_low, fd_high), ignoring errors.

cpu_count()
Return the number of CPUs in the system; return None if indeterminable.

This number is not equivalent to the number of CPUs the current process can
use. The number of usable CPUs can be obtained with
``len(os.sched_getaffinity(0))``

device_encoding(fd)
Return a string describing the encoding of a terminal's file descriptor.

The file descriptor must be attached to a terminal.
If the device is not a terminal, return None.

dup(fd, /)
Return a duplicate of a file descriptor.

dup2(fd, fd2, inheritable=True)
Duplicate file descriptor.

execl(file, *args)
execl(file, *args)

Execute the executable file with argument list args, replacing the
current process.

execle(file, *args)
execle(file, *args, env)

Execute the executable file with argument list args and
environment env, replacing the current process.

execlp(file, *args)
execlp(file, *args)

Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.

execlpe(file, *args)
execlpe(file, *args, env)

Execute the executable file (which is searched for along $PATH)
with argument list args and environment env, replacing the current
process.

execv(path, argv, /)
Execute an executable path with arguments, replacing current process.

path
Path of executable file.
argv
Tuple or list of strings.

execve(path, argv, env)
Execute an executable path with arguments, replacing current process.

path
Path of executable file.
argv
Tuple or list of strings.
env
Dictionary of strings mapping to strings.

execvp(file, args)
execvp(file, args)

Execute the executable file (which is searched for along $PATH)
with argument list args, replacing the current process.
args may be a list or tuple of strings.

execvpe(file, args, env)
execvpe(file, args, env)

Execute the executable file (which is searched for along $PATH)
with argument list args and environment env , replacing the
current process.
args may be a list or tuple of strings.

fdopen(fd, *args, **kwargs)
# Supply os.fdopen()

fsdecode(filename)
Decode filename (an os.PathLike, bytes, or str) from the filesystem
encoding with 'surrogateescape' error handler, return str unchanged. On
Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).

fsencode(filename)
Encode filename (an os.PathLike, bytes, or str) to the filesystem
encoding with 'surrogateescape' error handler, return bytes unchanged.
On Windows, use 'strict' error handler if the file system encoding is
'mbcs' (which is the default encoding).

fspath(path)
Return the file system path representation of the object.

If the object is str or bytes, then allow it to pass through as-is. If the
object defines __fspath__(), then return the result of that method. All other
types raise a TypeError.

fstat(fd)
Perform a stat system call on the given file descriptor.

Like stat(), but for an open file descriptor.
Equivalent to os.stat(fd).

fsync(fd)
Force write of fd to disk.

ftruncate(fd, length, /)
Truncate a file, specified by file descriptor, to a specific length.

get_exec_path(env=None)
Returns the sequence of directories that will be searched for the
named executable (similar to a shell) when launching a process.

*env* must be an environment variable dict or None. If *env* is None,
os.environ will be used.

get_handle_inheritable(handle, /)
Get the close-on-exe flag of the specified file descriptor.

get_inheritable(fd, /)
Get the close-on-exe flag of the specified file descriptor.

get_terminal_size(...)
Return the size of the terminal window as (columns, lines).

The optional argument fd (default standard output) specifies
which file descriptor should be queried.

If the file descriptor is not connected to a terminal, an OSError
is thrown.

This function will only be defined if an implementation is
available for this system.

shutil.get_terminal_size is the high-level function which should
normally be used, os.get_terminal_size is the low-level implementation.

getcwd()
Return a unicode string representing the current working directory.

getcwdb()
Return a bytes string representing the current working directory.

getenv(key, default=None)
Get an environment variable, return None if it doesn't exist.
The optional second argument can specify an alternate default.
key, default and the result are str.

getlogin()
Return the actual login name.

getpid()
Return the current process id.

getppid()
Return the parent's process id.

If the parent process has already exited, Windows machines will still
return its id; others systems will return the id of the 'init' process (1).

isatty(fd, /)
Return True if the fd is connected to a terminal.

Return True if the file descriptor is an open file descriptor
connected to the slave end of a terminal.

kill(pid, signal, /)
Kill a process with a signal.

link(src, dst, *, src_dir_fd=None, dst_dir_fd=None, follow_symlinks=True)
Create a hard link to a file.

If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
If follow_symlinks is False, and the last element of src is a symbolic
link, link will create a link to the symbolic link itself instead of the
file the link points to.
src_dir_fd, dst_dir_fd, and follow_symlinks may not be implemented on your
platform. If they are unavailable, using them will raise a
NotImplementedError.

listdir(path=None)
Return a list containing the names of the files in the directory.

path can be specified as either str or bytes. If path is bytes,
the filenames returned will also be bytes; in all other circumstances
the filenames returned will be str.
If path is None, uses the path='.'.
On some platforms, path may also be specified as an open file descriptor;\
the file descriptor must refer to a directory.
If this functionality is unavailable, using it raises NotImplementedError.

The list is in arbitrary order. It does not include the special
entries '.' and '..' even if they are present in the directory.

lseek(fd, position, how, /)
Set the position of a file descriptor. Return the new position.

Return the new cursor position in number of bytes
relative to the beginning of the file.

lstat(path, *, dir_fd=None)
Perform a stat system call on the given path, without following symbolic links.

Like stat(), but do not follow symbolic links.
Equivalent to stat(path, follow_symlinks=False).

makedirs(name, mode=511, exist_ok=False)
makedirs(name [, mode=0o777][, exist_ok=False])

Super-mkdir; create a leaf directory and all intermediate ones. Works like
mkdir, except that any intermediate path segment (not just the rightmost)
will be created if it does not exist. If the target directory already
exists, raise an OSError if exist_ok is False. Otherwise no exception is
raised. This is recursive.

mkdir(path, mode=511, *, dir_fd=None)
Create a directory.

If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.

The mode argument is ignored on Windows.

open(path, flags, mode=511, *, dir_fd=None)
Open a file for low level IO. Returns a file descriptor (integer).

If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.

pipe()
Create a pipe.

Returns a tuple of two file descriptors:
(read_fd, write_fd)

popen(cmd, mode='r', buffering=-1)
# Supply os.popen()

putenv(name, value, /)
Change or add an environment variable.

read(fd, length, /)
Read from a file descriptor. Returns a bytes object.

readlink(...)
readlink(path, *, dir_fd=None) -> path

Return a string representing the path to which the symbolic link points.

If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.

remove(path, *, dir_fd=None)
Remove a file (same as unlink()).

If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.

removedirs(name)
removedirs(name)

Super-rmdir; remove a leaf directory and all empty intermediate
ones. Works like rmdir except that, if the leaf directory is
successfully removed, directories corresponding to rightmost path
segments will be pruned away until either the whole path is
consumed or an error occurs. Errors during this latter phase are
ignored -- they generally mean that a directory was not empty.

rename(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename a file or directory.

If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
src_dir_fd and dst_dir_fd, may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError.

renames(old, new)
renames(old, new)

Super-rename; create directories as necessary and delete any left
empty. Works like rename, except creation of any intermediate
directories needed to make the new pathname good is attempted
first. After the rename, directories corresponding to rightmost
path segments of the old name will be pruned until either the
whole path is consumed or a nonempty directory is found.

Note: this function can fail with the new directory structure made
if you lack permissions needed to unlink the leaf directory or
file.

replace(src, dst, *, src_dir_fd=None, dst_dir_fd=None)
Rename a file or directory, overwriting the destination.

If either src_dir_fd or dst_dir_fd is not None, it should be a file
descriptor open to a directory, and the respective path string (src or dst)
should be relative; the path will then be relative to that directory.
src_dir_fd and dst_dir_fd, may not be implemented on your platform.
If they are unavailable, using them will raise a NotImplementedError."

rmdir(path, *, dir_fd=None)
Remove a directory.

If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.

scandir(path=None)
Return an iterator of DirEntry objects for given path.

path can be specified as either str, bytes or path-like object. If path
is bytes, the names of yielded DirEntry objects will also be bytes; in
all other circumstances they will be str.

If path is None, uses the path='.'.

set_handle_inheritable(handle, inheritable, /)
Set the inheritable flag of the specified handle.

set_inheritable(fd, inheritable, /)
Set the inheritable flag of the specified file descriptor.

spawnl(mode, file, *args)
spawnl(mode, file, *args) -> integer

Execute file with arguments from args in a subprocess.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it.

spawnle(mode, file, *args)
spawnle(mode, file, *args, env) -> integer

Execute file with arguments from args in a subprocess with the
supplied environment.
If mode == P_NOWAIT return the pid of the process.
If mode == P_WAIT return the process's exit code if it exits normally;
otherwise return -SIG, where SIG is the signal that killed it.

spawnv(mode, path, argv, /)
Execute the program specified by path in a new process.

mode
Mode of process creation.
path
Path of executable file.
argv
Tuple or list of strings.

spawnve(mode, path, argv, env, /)
Execute the program specified by path in a new process.

mode
Mode of process creation.
path
Path of executable file.
argv
Tuple or list of strings.
env
Dictionary of strings mapping to strings.

startfile(filepath, operation=None)
startfile(filepath [, operation])

Start a file with its associated application.

When "operation" is not specified or "open", this acts like
double-clicking the file in Explorer, or giving the file name as an
argument to the DOS "start" command: the file is opened with whatever
application (if any) its extension is associated.
When another "operation" is given, it specifies what should be done with
the file. A typical operation is "print".

startfile returns as soon as the associated application is launched.
There is no option to wait for the application to close, and no way
to retrieve the application's exit status.

The filepath is relative to the current directory. If you want to use
an absolute path, make sure the first character is not a slash ("/");
the underlying Win32 ShellExecute function doesn't work if it is.

stat(path, *, dir_fd=None, follow_symlinks=True)
Perform a stat system call on the given path.

path
Path to be examined; can be string, bytes, path-like object or
open-file-descriptor int.
dir_fd
If not None, it should be a file descriptor open to a directory,
and path should be a relative string; path will then be relative to
that directory.
follow_symlinks
If False, and the last element of the path is a symbolic link,
stat will examine the symbolic link itself instead of the file
the link points to.

dir_fd and follow_symlinks may not be implemented
on your platform. If they are unavailable, using them will raise a
NotImplementedError.

It's an error to use dir_fd or follow_symlinks when specifying path as
an open file descriptor.

strerror(code, /)
Translate an error code to a message string.

symlink(src, dst, target_is_directory=False, *, dir_fd=None)
Create a symbolic link pointing to src named dst.

target_is_directory is required on Windows if the target is to be
interpreted as a directory. (On Windows, symlink requires
Windows 6.0 or greater, and raises a NotImplementedError otherwise.)
target_is_directory is ignored on non-Windows platforms.

If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.

system(command)
Execute the command in a subshell.

times()
Return a collection containing process timing information.

The object returned behaves like a named tuple with these fields:
(utime, stime, cutime, cstime, elapsed_time)
All fields are floating point numbers.

truncate(path, length)
Truncate a file, specified by path, to a specific length.

On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.

umask(mask, /)
Set the current numeric umask and return the previous umask.

unlink(path, *, dir_fd=None)
Remove a file (same as remove()).

If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
dir_fd may not be implemented on your platform.
If it is unavailable, using it will raise a NotImplementedError.

urandom(size, /)
Return a bytes object containing random bytes suitable for cryptographic use.

utime(path, times=None, *, ns=None, dir_fd=None, follow_symlinks=True)
Set the access and modified time of path.

path may always be specified as a string.
On some platforms, path may also be specified as an open file descriptor.
If this functionality is unavailable, using it raises an exception.

If times is not None, it must be a tuple (atime, mtime);
atime and mtime should be expressed as float seconds since the epoch.
If ns is specified, it must be a tuple (atime_ns, mtime_ns);
atime_ns and mtime_ns should be expressed as integer nanoseconds
since the epoch.
If times is None and ns is unspecified, utime uses the current time.
Specifying tuples for both times and ns is an error.

If dir_fd is not None, it should be a file descriptor open to a directory,
and path should be relative; path will then be relative to that directory.
If follow_symlinks is False, and the last element of the path is a symbolic
link, utime will modify the symbolic link itself instead of the file the
link points to.
It is an error to use dir_fd or follow_symlinks when specifying path
as an open file descriptor.
dir_fd and follow_symlinks may not be available on your platform.
If they are unavailable, using them will raise a NotImplementedError.

waitpid(pid, options, /)
Wait for completion of a given process.

Returns a tuple of information regarding the process:
(pid, status << 8)

The options argument is ignored on Windows.

walk(top, topdown=True, onerror=None, followlinks=False)
Directory tree generator.

For each directory in the directory tree rooted at top (including top
itself, but excluding '.' and '..'), yields a 3-tuple

dirpath, dirnames, filenames

dirpath is a string, the path to the directory. dirnames is a list of
the names of the subdirectories in dirpath (excluding '.' and '..').
filenames is a list of the names of the non-directory files in dirpath.
Note that the names in the lists are just names, with no path components.
To get a full path (which begins with top) to a file or directory in
dirpath, do os.path.join(dirpath, name).

If optional arg 'topdown' is true or not specified, the triple for a
directory is generated before the triples for any of its subdirectories
(directories are generated top down). If topdown is false, the triple
for a directory is generated after the triples for all of its
subdirectories (directories are generated bottom up).

When topdown is true, the caller can modify the dirnames list in-place
(e.g., via del or slice assignment), and walk will only recurse into the
subdirectories whose names remain in dirnames; this can be used to prune the
search, or to impose a specific order of visiting. Modifying dirnames when
topdown is false is ineffective, since the directories in dirnames have
already been generated by the time dirnames itself is generated. No matter
the value of topdown, the list of subdirectories is retrieved before the
tuples for the directory and its subdirectories are generated.

By default errors from the os.scandir() call are ignored. If
optional arg 'onerror' is specified, it should be a function; it
will be called with one argument, an OSError instance. It can
report the error to continue with the walk, or raise the exception
to abort the walk. Note that the filename is available as the
filename attribute of the exception object.

By default, os.walk does not follow symbolic links to subdirectories on
systems that support them. In order to get this functionality, set the
optional argument 'followlinks' to true.

Caution: if you pass a relative pathname for top, don't change the
current working directory between resumptions of walk. walk never
changes the current directory, and assumes that the client doesn't
either.

Example:

import os
from os.path import join, getsize
for root, dirs, files in os.walk('python/Lib/email'):
print(root, "consumes", end="")
print(sum([getsize(join(root, name)) for name in files]), end="")
print("bytes in", len(files), "non-directory files")
if 'CVS' in dirs:
dirs.remove('CVS') # don't visit CVS directories

write(fd, data, /)
Write a bytes object to a file descriptor.

DATA
F_OK = 0
O_APPEND = 8
O_BINARY = 32768
O_CREAT = 256
O_EXCL = 1024
O_NOINHERIT = 128
O_RANDOM = 16
O_RDONLY = 0
O_RDWR = 2
O_SEQUENTIAL = 32
O_SHORT_LIVED = 4096
O_TEMPORARY = 64
O_TEXT = 16384
O_TRUNC = 512
O_WRONLY = 1
P_DETACH = 4
P_NOWAIT = 1
P_NOWAITO = 3
P_OVERLAY = 2
P_WAIT = 0
R_OK = 4
SEEK_CUR = 1
SEEK_END = 2
SEEK_SET = 0
TMP_MAX = 2147483647
W_OK = 2
X_OK = 1
__all__ = ['altsep', 'curdir', 'pardir', 'sep', 'pathsep', 'linesep', ...
altsep = '/'
curdir = '.'
defpath = r'.;C:\bin'
devnull = 'nul'
environ = environ({'ALLUSERSPROFILE': 'C:\\ProgramData', '... 'C:\\Use...
extsep = '.'
linesep = '\r\n'
name = 'nt'
pardir = '..'
pathsep = ';'
sep = r'\'
supports_bytes_environ = False

FILE
c:\users\matthijs\appdata\local\programs\python\python37\lib\os.py


No Python documentation found for 'os_sys_lib'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'osm'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'path'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'print_all_dirs'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'progres_types'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'progress_bar_loading'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'progress_types'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

Help on package requests:

NAME
requests

DESCRIPTION
Requests HTTP Library
~~~~~~~~~~~~~~~~~~~~~

Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:

>>> import requests
>>> r = requests.get('https://www.python.org')
>>> r.status_code
200
>>> 'Python is a programming language' in r.content
True

... or POST:

>>> payload = dict(key1='value1', key2='value2')
>>> r = requests.post('https://httpbin.org/post', data=payload)
>>> print(r.text)
{
...
"form": {
"key2": "value2",
"key1": "value1"
},
...
}

The other HTTP methods are supported - see `requests.api`. Full documentation
is at .

:copyright: (c) 2017 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.

PACKAGE CONTENTS
__version__
_internal_utils
adapters
api
auth
certs
compat
cookies
exceptions
help
hooks
models
packages
sessions
status_codes
structures
utils

FUNCTIONS
check_compatibility(urllib3_version, chardet_version)

DATA
__author_email__ = 'me@kennethreitz.org'
__build__ = 139520
__cake__ = '\u2728 \U0001f370 \u2728'
__copyright__ = 'Copyright 2018 Kenneth Reitz'
__description__ = 'Python HTTP for Humans.'
__license__ = 'Apache 2.0'
__title__ = 'requests'
__url__ = 'http://python-requests.org'
codes =

VERSION
2.21.0

AUTHOR
Kenneth Reitz

FILE
c:\users\matthijs\appdata\roaming\python\python37\site-packages\requests\__init__.py


No Python documentation found for 'run_apart'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'run_background'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'run_cmds'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'run_cmds_'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'show_progres'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'stop'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

Help on module subprocess:

NAME
subprocess - Subprocesses with accessible I/O streams

DESCRIPTION
This module allows you to spawn processes, connect to their
input/output/error pipes, and obtain their return codes.

For a complete description of this module see the Python documentation.

Main API
========
run(...): Runs a command, waits for it to complete, then returns a
CompletedProcess instance.
Popen(...): A class for flexibly executing a command in a new process

Constants
---------
DEVNULL: Special value that indicates that os.devnull should be used
PIPE: Special value that indicates a pipe should be created
STDOUT: Special value that indicates that stderr should go to stdout


Older API
=========
call(...): Runs a command, waits for it to complete, then returns
the return code.
check_call(...): Same as call() but raises CalledProcessError()
if return code is not 0
check_output(...): Same as check_call() but returns the contents of
stdout instead of a return code
getoutput(...): Runs a command in the shell, waits for it to complete,
then returns the output
getstatusoutput(...): Runs a command in the shell, waits for it to complete,
then returns a (exitcode, output) tuple

CLASSES
builtins.Exception(builtins.BaseException)
SubprocessError
CalledProcessError
TimeoutExpired
builtins.object
CompletedProcess
Popen
STARTUPINFO

class CalledProcessError(SubprocessError)
| CalledProcessError(returncode, cmd, output=None, stderr=None)
|
| Raised when run() is called with check=True and the process
| returns a non-zero exit status.
|
| Attributes:
| cmd, returncode, stdout, stderr, output
|
| Method resolution order:
| CalledProcessError
| SubprocessError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, returncode, cmd, output=None, stderr=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self)
| Return str(self).
|
|

| Data descriptors defined here:
|
| stdout
| Alias for output attribute, to match stderr
|
|

| Data descriptors inherited from SubprocessError:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class CompletedProcess(builtins.object)
| CompletedProcess(args, returncode, stdout=None, stderr=None)
|
| A process that has finished running.
|
| This is returned by run().
|
| Attributes:
| args: The list or str args passed to run().
| returncode: The exit code of the process, negative for signals.
| stdout: The standard output (None if not captured).
| stderr: The standard error (None if not captured).
|
| Methods defined here:
|
| __init__(self, args, returncode, stdout=None, stderr=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| check_returncode(self)
| Raise CalledProcessError if the exit code is non-zero.
|
|

| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

class Popen(builtins.object)
| Popen(args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None)
|
| Execute a child program in a new process.
|
| For a complete description of the arguments see the Python documentation.
|
| Arguments:
| args: A string, or a sequence of program arguments.
|
| bufsize: supplied as the buffering argument to the open() function when
| creating the stdin/stdout/stderr pipe file objects
|
| executable: A replacement program to execute.
|
| stdin, stdout and stderr: These specify the executed programs' standard
| input, standard output and standard error file handles, respectively.
|
| preexec_fn: (POSIX only) An object to be called in the child process
| just before the child is executed.
|
| close_fds: Controls closing or inheriting of file descriptors.
|
| shell: If true, the command will be executed through the shell.
|
| cwd: Sets the current directory before the child is executed.
|
| env: Defines the environment variables for the new process.
|
| text: If true, decode stdin, stdout and stderr using the given encoding
| (if set) or the system default otherwise.
|
| universal_newlines: Alias of text, provided for backwards compatibility.
|
| startupinfo and creationflags (Windows only)
|
| restore_signals (POSIX only)
|
| start_new_session (POSIX only)
|
| pass_fds (POSIX only)
|
| encoding and errors: Text mode encoding and error handling to use for
| file objects stdin, stdout and stderr.
|
| Attributes:
| stdin, stdout, stderr, pid, returncode
|
| Methods defined here:
|
| __del__(self, _maxsize=9223372036854775807, _warn=)
|
| __enter__(self)
|
| __exit__(self, exc_type, value, traceback)
|
| __init__(self, args, bufsize=-1, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=True, shell=False, cwd=None, env=None, universal_newlines=None, startupinfo=None, creationflags=0, restore_signals=True, start_new_session=False, pass_fds=(), *, encoding=None, errors=None, text=None)
| Create new Popen instance.
|
| communicate(self, input=None, timeout=None)
| Interact with process: Send data to stdin and close it.
| Read data from stdout and stderr, until end-of-file is
| reached. Wait for process to terminate.
|
| The optional "input" argument should be data to be sent to the
| child process, or None, if no data should be sent to the child.
| communicate() returns a tuple (stdout, stderr).
|
| By default, all communication is in bytes, and therefore any
| "input" should be bytes, and the (stdout, stderr) will be bytes.
| If in text mode (indicated by self.text_mode), any "input" should
| be a string, and (stdout, stderr) will be strings decoded
| according to locale encoding, or by "encoding" if set. Text mode
| is triggered by setting any of text, encoding, errors or
| universal_newlines.
|
| kill = terminate(self)
|
| poll(self)
| Check if child process has terminated. Set and return returncode
| attribute.
|
| send_signal(self, sig)
| Send a signal to the process.
|
| terminate(self)
| Terminates the process.
|
| wait(self, timeout=None)
| Wait for child process to terminate; returns self.returncode.
|
|

| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| universal_newlines

class STARTUPINFO(builtins.object)
| STARTUPINFO(*, dwFlags=0, hStdInput=None, hStdOutput=None, hStdError=None, wShowWindow=0, lpAttributeList=None)
|
| Methods defined here:
|
| __init__(self, *, dwFlags=0, hStdInput=None, hStdOutput=None, hStdError=None, wShowWindow=0, lpAttributeList=None)
| Initialize self. See help(type(self)) for accurate signature.
|
|

| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

class SubprocessError(builtins.Exception)
| Common base class for all non-exit exceptions.
|
| Method resolution order:
| SubprocessError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Methods inherited from builtins.Exception:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
|

| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class TimeoutExpired(SubprocessError)
| TimeoutExpired(cmd, timeout, output=None, stderr=None)
|
| This exception is raised when the timeout expires while waiting for a
| child process.
|
| Attributes:
| cmd, output, stdout, stderr, timeout
|
| Method resolution order:
| TimeoutExpired
| SubprocessError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, cmd, timeout, output=None, stderr=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self)
| Return str(self).
|
|

| Data descriptors defined here:
|
| stdout
|
|

| Data descriptors inherited from SubprocessError:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Static methods inherited from builtins.Exception:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

FUNCTIONS
call(*popenargs, timeout=None, **kwargs)
Run command with arguments. Wait for command to complete or
timeout, then return the returncode attribute.

The arguments are the same as for the Popen constructor. Example:

retcode = call(["ls", "-l"])

check_call(*popenargs, **kwargs)
Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.

The arguments are the same as for the call function. Example:

check_call(["ls", "-l"])

check_output(*popenargs, timeout=None, **kwargs)
Run command with arguments and return its output.

If the exit code was non-zero it raises a CalledProcessError. The
CalledProcessError object will have the return code in the returncode
attribute and output in the output attribute.

The arguments are the same as for the Popen constructor. Example:

>>> check_output(["ls", "-l", "/dev/null"])
b'crw-rw-rw- 1 root root 1, 3 Oct 18 2007 /dev/null\n'

The stdout argument is not allowed as it is used internally.
To capture standard error in the result, use stderr=STDOUT.

>>> check_output(["/bin/sh", "-c",
... "ls -l non_existent_file ; exit 0"],
... stderr=STDOUT)
b'ls: non_existent_file: No such file or directory\n'

There is an additional optional argument, "input", allowing you to
pass a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it too will be used internally. Example:

>>> check_output(["sed", "-e", "s/foo/bar/"],
... input=b"when in the course of fooman events\n")
b'when in the course of barman events\n'

By default, all communication is in bytes, and therefore any "input"
should be bytes, and the return value wil be bytes. If in text mode,
any "input" should be a string, and the return value will be a string
decoded according to locale encoding, or by "encoding" if set. Text mode
is triggered by setting any of text, encoding, errors or universal_newlines.

getoutput(cmd)
Return output (stdout or stderr) of executing cmd in a shell.

Like getstatusoutput(), except the exit status is ignored and the return
value is a string containing the command's output. Example:

>>> import subprocess
>>> subprocess.getoutput('ls /bin/ls')
'/bin/ls'

getstatusoutput(cmd)
Return (exitcode, output) of executing cmd in a shell.

Execute the string 'cmd' in a shell with 'check_output' and
return a 2-tuple (status, output). The locale encoding is used
to decode the output and process newlines.

A trailing newline is stripped from the output.
The exit status for the command can be interpreted
according to the rules for the function 'wait'. Example:

>>> import subprocess
>>> subprocess.getstatusoutput('ls /bin/ls')
(0, '/bin/ls')
>>> subprocess.getstatusoutput('cat /bin/junk')
(1, 'cat: /bin/junk: No such file or directory')
>>> subprocess.getstatusoutput('/bin/junk')
(127, 'sh: /bin/junk: not found')
>>> subprocess.getstatusoutput('/bin/kill $$')
(-15, '')

run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs)
Run command with arguments and return a CompletedProcess instance.

The returned instance will have attributes args, returncode, stdout and
stderr. By default, stdout and stderr are not captured, and those attributes
will be None. Pass stdout=PIPE and/or stderr=PIPE in order to capture them.

If check is True and the exit code was non-zero, it raises a
CalledProcessError. The CalledProcessError object will have the return code
in the returncode attribute, and output & stderr attributes if those streams
were captured.

If timeout is given, and the process takes too long, a TimeoutExpired
exception will be raised.

There is an optional argument "input", allowing you to
pass bytes or a string to the subprocess's stdin. If you use this argument
you may not also use the Popen constructor's "stdin" argument, as
it will be used internally.

By default, all communication is in bytes, and therefore any "input" should
be bytes, and the stdout and stderr will be bytes. If in text mode, any
"input" should be a string, and stdout and stderr will be strings decoded
according to locale encoding, or by "encoding" if set. Text mode is
triggered by setting any of text, encoding, errors or universal_newlines.

The other arguments are the same as for the Popen constructor.

DATA
ABOVE_NORMAL_PRIORITY_CLASS = 32768
BELOW_NORMAL_PRIORITY_CLASS = 16384
CREATE_BREAKAWAY_FROM_JOB = 16777216
CREATE_DEFAULT_ERROR_MODE = 67108864
CREATE_NEW_CONSOLE = 16
CREATE_NEW_PROCESS_GROUP = 512
CREATE_NO_WINDOW = 134217728
DETACHED_PROCESS = 8
DEVNULL = -3
HIGH_PRIORITY_CLASS = 128
IDLE_PRIORITY_CLASS = 64
NORMAL_PRIORITY_CLASS = 32
PIPE = -1
REALTIME_PRIORITY_CLASS = 256
STARTF_USESHOWWINDOW = 1
STARTF_USESTDHANDLES = 256
STDOUT = -2
STD_ERROR_HANDLE = 4294967284
STD_INPUT_HANDLE = 4294967286
STD_OUTPUT_HANDLE = 4294967285
SW_HIDE = 0
__all__ = ['Popen', 'PIPE', 'STDOUT', 'call', 'check_call', 'getstatus...

FILE
c:\users\matthijs\appdata\local\programs\python\python37\lib\subprocess.py


Help on built-in module sys:

NAME
sys

MODULE REFERENCE
https://docs.python.org/3.7/library/sys

The following documentation is automatically generated from the Python
source files. It may be incomplete, incorrect or include features that
are considered implementation detail and may vary between Python
implementations. When in doubt, consult the module reference at the
location listed above.

DESCRIPTION
This module provides access to some objects used or maintained by the
interpreter and to functions that interact strongly with the interpreter.

Dynamic objects:

argv -- command line arguments; argv[0] is the script pathname if known
path -- module search path; path[0] is the script directory, else ''
modules -- dictionary of loaded modules

displayhook -- called to show results in an interactive session
excepthook -- called to handle any uncaught exception other than SystemExit
To customize printing in an interactive session or to install a custom
top-level exception handler, assign other functions to replace these.

stdin -- standard input file object; used by input()
stdout -- standard output file object; used by print()
stderr -- standard error object; used for error messages
By assigning other file objects (or objects that behave like files)
to these, it is possible to redirect all of the interpreter's I/O.

last_type -- type of last uncaught exception
last_value -- value of last uncaught exception
last_traceback -- traceback of last uncaught exception
These three are only available in an interactive session after a
traceback has been printed.

Static objects:

builtin_module_names -- tuple of module names built into this interpreter
copyright -- copyright notice pertaining to this interpreter
exec_prefix -- prefix used to find the machine-specific Python library
executable -- absolute path of the executable binary of the Python interpreter
float_info -- a struct sequence with information about the float implementation.
float_repr_style -- string indicating the style of repr() output for floats
hash_info -- a struct sequence with information about the hash algorithm.
hexversion -- version information encoded as a single integer
implementation -- Python implementation information.
int_info -- a struct sequence with information about the int implementation.
maxsize -- the largest supported length of containers.
maxunicode -- the value of the largest Unicode code point
platform -- platform identifier
prefix -- prefix used to find the Python library
thread_info -- a struct sequence with information about the thread implementation.
version -- the version of this interpreter as a string
version_info -- version information as a named tuple
dllhandle -- [Windows only] integer handle of the Python DLL
winver -- [Windows only] version number of the Python DLL
_enablelegacywindowsfsencoding -- [Windows only]
__stdin__ -- the original stdin; don't touch!
__stdout__ -- the original stdout; don't touch!
__stderr__ -- the original stderr; don't touch!
__displayhook__ -- the original displayhook; don't touch!
__excepthook__ -- the original excepthook; don't touch!

Functions:

displayhook() -- print an object to the screen, and save it in builtins._
excepthook() -- print an exception and its traceback to sys.stderr
exc_info() -- return thread-safe information about the current exception
exit() -- exit the interpreter by raising SystemExit
getdlopenflags() -- returns flags to be used for dlopen() calls
getprofile() -- get the global profiling function
getrefcount() -- return the reference count for an object (plus one :-)
getrecursionlimit() -- return the max recursion depth for the interpreter
getsizeof() -- return the size of an object in bytes
gettrace() -- get the global debug tracing function
setcheckinterval() -- control how often the interpreter checks for events
setdlopenflags() -- set the flags to be used for dlopen() calls
setprofile() -- set the global profiling function
setrecursionlimit() -- set the max recursion depth for the interpreter
settrace() -- set the global debug tracing function

FUNCTIONS
__breakpointhook__ = breakpointhook(...)
breakpointhook(*args, **kws)

This hook function is called by built-in breakpoint().

__displayhook__ = displayhook(...)
displayhook(object) -> None

Print an object to sys.stdout and also save it in builtins._

__excepthook__ = excepthook(...)
excepthook(exctype, value, traceback) -> None

Handle an exception by displaying it with a traceback on sys.stderr.

breakpointhook(...)
breakpointhook(*args, **kws)

This hook function is called by built-in breakpoint().

call_tracing(...)
call_tracing(func, args) -> object

Call func(*args), while tracing is enabled. The tracing state is
saved, and restored afterwards. This is intended to be called from
a debugger from a checkpoint, to recursively debug some other code.

callstats(...)
callstats() -> tuple of integers

Return a tuple of function call statistics, if CALL_PROFILE was defined
when Python was built. Otherwise, return None.

When enabled, this function returns detailed, implementation-specific
details about the number of function calls executed. The return value is
a 11-tuple where the entries in the tuple are counts of:
0. all function calls
1. calls to PyFunction_Type objects
2. PyFunction calls that do not create an argument tuple
3. PyFunction calls that do not create an argument tuple
and bypass PyEval_EvalCodeEx()
4. PyMethod calls
5. PyMethod calls on bound methods
6. PyType calls
7. PyCFunction calls
8. generator calls
9. All other calls
10. Number of stack pops performed by call_function()

exc_info(...)
exc_info() -> (type, value, traceback)

Return information about the most recent exception caught by an except
clause in the current stack frame or in an older stack frame.

excepthook(...)
excepthook(exctype, value, traceback) -> None

Handle an exception by displaying it with a traceback on sys.stderr.

exit(...)
exit([status])

Exit the interpreter by raising SystemExit(status).
If the status is omitted or None, it defaults to zero (i.e., success).
If the status is an integer, it will be used as the system exit status.
If it is another kind of object, it will be printed and the system
exit status will be one (i.e., failure).

get_asyncgen_hooks(...)
get_asyncgen_hooks()

Return a namedtuple of installed asynchronous generators hooks (firstiter, finalizer).

get_coroutine_origin_tracking_depth()
Check status of origin tracking for coroutine objects in this thread.

get_coroutine_wrapper(...)
get_coroutine_wrapper()

Return the wrapper for coroutine objects set by sys.set_coroutine_wrapper.

getallocatedblocks(...)
getallocatedblocks() -> integer

Return the number of memory blocks currently allocated, regardless of their
size.

getcheckinterval(...)
getcheckinterval() -> current check interval; see setcheckinterval().

getdefaultencoding(...)
getdefaultencoding() -> string

Return the current default string encoding used by the Unicode
implementation.

getfilesystemencodeerrors(...)
getfilesystemencodeerrors() -> string

Return the error mode used to convert Unicode filenames in
operating system filenames.

getfilesystemencoding(...)
getfilesystemencoding() -> string

Return the encoding used to convert Unicode filenames in
operating system filenames.

getprofile(...)
getprofile()

Return the profiling function set with sys.setprofile.
See the profiler chapter in the library manual.

getrecursionlimit(...)
getrecursionlimit()

Return the current value of the recursion limit, the maximum depth
of the Python interpreter stack. This limit prevents infinite
recursion from causing an overflow of the C stack and crashing Python.

getrefcount(...)
getrefcount(object) -> integer

Return the reference count of object. The count returned is generally
one higher than you might expect, because it includes the (temporary)
reference as an argument to getrefcount().

getsizeof(...)
getsizeof(object, default) -> int

Return the size of object in bytes.

getswitchinterval(...)
getswitchinterval() -> current thread switch interval; see setswitchinterval().

gettrace(...)
gettrace()

Return the global debug tracing function set with sys.settrace.
See the debugger chapter in the library manual.

getwindowsversion(...)
getwindowsversion()

Return information about the running version of Windows as a named tuple.
The members are named: major, minor, build, platform, service_pack,
service_pack_major, service_pack_minor, suite_mask, and product_type. For
backward compatibility, only the first 5 items are available by indexing.
All elements are numbers, except service_pack and platform_type which are
strings, and platform_version which is a 3-tuple. Platform is always 2.
Product_type may be 1 for a workstation, 2 for a domain controller, 3 for a
server. Platform_version is a 3-tuple containing a version number that is
intended for identifying the OS rather than feature detection.

intern(...)
intern(string) -> string

``Intern'' the given string. This enters the string in the (global)
table of interned strings whose purpose is to speed up dictionary lookups.
Return the string itself or the previously interned string object with the
same value.

is_finalizing(...)
is_finalizing()
Return True if Python is exiting.

set_asyncgen_hooks(...)
set_asyncgen_hooks(*, firstiter=None, finalizer=None)

Set a finalizer for async generators objects.

set_coroutine_origin_tracking_depth(depth)
Enable or disable origin tracking for coroutine objects in this thread.

Coroutine objects will track 'depth' frames of traceback information about
where they came from, available in their cr_origin attribute. Set depth of 0
to disable.

set_coroutine_wrapper(...)
set_coroutine_wrapper(wrapper)

Set a wrapper for coroutine objects.

setcheckinterval(...)
setcheckinterval(n)

Tell the Python interpreter to check for asynchronous events every
n instructions. This also affects how often thread switches occur.

setprofile(...)
setprofile(function)

Set the profiling function. It will be called on each function call
and return. See the profiler chapter in the library manual.

setrecursionlimit(...)
setrecursionlimit(n)

Set the maximum depth of the Python interpreter stack to n. This
limit prevents infinite recursion from causing an overflow of the C
stack and crashing Python. The highest possible limit is platform-
dependent.

setswitchinterval(...)
setswitchinterval(n)

Set the ideal thread switching delay inside the Python interpreter
The actual frequency of switching threads can be lower if the
interpreter executes long sequences of uninterruptible code
(this is implementation-specific and workload-dependent).

The parameter must represent the desired switching delay in seconds
A typical value is 0.005 (5 milliseconds).

settrace(...)
settrace(function)

Set the global debug tracing function. It will be called on each
function call. See the debugger chapter in the library manual.

DATA
__stderr__ = None
__stdin__ = None
__stdout__ = None
api_version = 1013
argv = ['C:/mattie/own lib/own lib/os_sys/frameworks/python_frameworks...
base_exec_prefix = r'C:\Users\matthijs\AppData\Local\Programs\Python\P...
base_prefix = r'C:\Users\matthijs\AppData\Local\Programs\Python\Python...
builtin_module_names = ('_abc', '_ast', '_bisect', '_blake2', '_codecs...
byteorder = 'little'
copyright = 'Copyright (c) 2001-2018 Python Software Foundati...ematis...
dllhandle = 140731667709952
dont_write_bytecode = False
exec_prefix = r'C:\Users\matthijs\AppData\Local\Programs\Python\Python...
executable = r'C:\Users\matthijs\AppData\Local\Programs\Python\Python3...
flags = sys.flags(debug=0, inspect=0, interactive=0, opt...ation=1, is...
float_info = sys.float_info(max=1.7976931348623157e+308, max_...epsilo...
float_repr_style = 'short'
hash_info = sys.hash_info(width=64, modulus=2305843009213693...iphash2...
hexversion = 50790640
implementation = namespace(cache_tag='cpython-37', hexversion=507...in...
int_info = sys.int_info(bits_per_digit=30, sizeof_digit=4)
last_value = AttributeError("module 'os_sys' has no attribute 'i'")
maxsize = 9223372036854775807
maxunicode = 1114111
meta_path = [, modules = {'__builtins__': {'ArithmeticError': path = ['C:/mattie/own lib/own lib/os_sys/frameworks', r'C:\Users\matt...
path_hooks = [, path_importer_cache = {'C:/mattie/own lib/own lib/os_sys/frameworks': ...
platform = 'win32'
prefix = r'C:\Users\matthijs\AppData\Local\Programs\Python\Python37'
stderr =
stdin =
stdout =
thread_info = sys.thread_info(name='nt', lock=None, version=None)
version = '3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.191...
version_info = sys.version_info(major=3, minor=7, micro=0, releaseleve...
warnoptions = []
winver = '3.7'

FILE
(built-in)


Help on package test:

NAME
test - # Dummy file to make this directory a package.

PACKAGE CONTENTS
__main__
_test_multiprocessing
ann_module
ann_module2
ann_module3
audiotests
autotest
bad_coding
bad_coding2
bad_getattr
bad_getattr2
bad_getattr3
badsyntax_3131
badsyntax_future10
badsyntax_future3
badsyntax_future4
badsyntax_future5
badsyntax_future6
badsyntax_future7
badsyntax_future8
badsyntax_future9
badsyntax_pep3120
bisect
bytecode_helper
coding20731
curses_tests
dataclass_module_1
dataclass_module_1_str
dataclass_module_2
dataclass_module_2_str
datetimetester
dis_module
doctest_aliases
double_const
encoded_modules (package)
final_a
final_b
fork_wait
future_test1
future_test2
gdb_sample
good_getattr
imp_dummy
inspect_fodder
inspect_fodder2
leakers (package)
libregrtest (package)
list_tests
lock_tests
make_ssl_certs
mapping_tests
memory_watchdog
mock_socket
mod_generics_cache
mp_fork_bomb
mp_preload
multibytecodec_support
outstanding_bugs
pickletester
profilee
pyclbr_input
pydoc_mod
pydocfodder
pythoninfo
re_tests
regrtest
relimport
reperf
sample_doctest
sample_doctest_no_docstrings
sample_doctest_no_doctests
seq_tests
signalinterproctester
sortperf
ssl_servers
ssltests
string_tests
support (package)
test___all__
test___future__
test__locale
test__opcode
test__osx_support
test_abc
test_abstract_numbers
test_aifc
test_argparse
test_array
test_asdl_parser
test_ast
test_asyncgen
test_asynchat
test_asyncio (package)
test_asyncore
test_atexit
test_audioop
test_augassign
test_base64
test_baseexception
test_bdb
test_bigaddrspace
test_bigmem
test_binascii
test_binhex
test_binop
test_bisect
test_bool
test_buffer
test_bufio
test_builtin
test_bytes
test_bz2
test_c_locale_coercion
test_calendar
test_call
test_capi
test_cgi
test_cgitb
test_charmapcodec
test_class
test_cmath
test_cmd
test_cmd_line
test_cmd_line_script
test_code
test_code_module
test_codeccallbacks
test_codecencodings_cn
test_codecencodings_hk
test_codecencodings_iso2022
test_codecencodings_jp
test_codecencodings_kr
test_codecencodings_tw
test_codecmaps_cn
test_codecmaps_hk
test_codecmaps_jp
test_codecmaps_kr
test_codecmaps_tw
test_codecs
test_codeop
test_collections
test_colorsys
test_compare
test_compile
test_compileall
test_complex
test_concurrent_futures
test_configparser
test_contains
test_context
test_contextlib
test_contextlib_async
test_copy
test_copyreg
test_coroutines
test_cprofile
test_crashers
test_crypt
test_csv
test_ctypes
test_curses
test_dataclasses
test_datetime
test_dbm
test_dbm_dumb
test_dbm_gnu
test_dbm_ndbm
test_decimal
test_decorators
test_defaultdict
test_deque
test_descr
test_descrtut
test_devpoll
test_dict
test_dict_version
test_dictcomps
test_dictviews
test_difflib
test_dis
test_distutils
test_doctest
test_doctest2
test_docxmlrpc
test_dtrace
test_dummy_thread
test_dummy_threading
test_dynamic
test_dynamicclassattribute
test_eintr
test_email (package)
test_embed
test_ensurepip
test_enum
test_enumerate
test_eof
test_epoll
test_errno
test_exception_hierarchy
test_exception_variations
test_exceptions
test_extcall
test_faulthandler
test_fcntl
test_file
test_file_eintr
test_filecmp
test_fileinput
test_fileio
test_finalization
test_float
test_flufl
test_fnmatch
test_fork1
test_format
test_fractions
test_frame
test_frozen
test_fstring
test_ftplib
test_funcattrs
test_functools
test_future
test_future3
test_future4
test_future5
test_gc
test_gdb
test_generator_stop
test_generators
test_genericclass
test_genericpath
test_genexps
test_getargs2
test_getopt
test_getpass
test_gettext
test_glob
test_global
test_grammar
test_grp
test_gzip
test_hash
test_hashlib
test_heapq
test_hmac
test_html
test_htmlparser
test_http_cookiejar
test_http_cookies
test_httplib
test_httpservers
test_idle
test_imaplib
test_imghdr
test_imp
test_import (package)
test_importlib (package)
test_index
test_inspect
test_int
test_int_literal
test_io
test_ioctl
test_ipaddress
test_isinstance
test_iter
test_iterlen
test_itertools
test_json (package)
test_keyword
test_keywordonlyarg
test_kqueue
test_largefile
test_lib2to3
test_linecache
test_list
test_listcomps
test_locale
test_logging
test_long
test_longexp
test_lzma
test_macpath
test_mailbox
test_mailcap
test_marshal
test_math
test_memoryio
test_memoryview
test_metaclass
test_mimetypes
test_minidom
test_mmap
test_module
test_modulefinder
test_msilib
test_multibytecodec
test_multiprocessing_fork
test_multiprocessing_forkserver
test_multiprocessing_main_handling
test_multiprocessing_spawn
test_netrc
test_nis
test_nntplib
test_normalization
test_ntpath
test_numeric_tower
test_opcodes
test_openpty
test_operator
test_optparse
test_ordered_dict
test_os
test_ossaudiodev
test_osx_env
test_parser
test_pathlib
test_pdb
test_peepholer
test_pickle
test_pickletools
test_pipes
test_pkg
test_pkgimport
test_pkgutil
test_platform
test_plistlib
test_poll
test_popen
test_poplib
test_posix
test_posixpath
test_pow
test_pprint
test_print
test_profile
test_property
test_pstats
test_pty
test_pulldom
test_pwd
test_py_compile
test_pyclbr
test_pydoc
test_pyexpat
test_queue
test_quopri
test_raise
test_random
test_range
test_re
test_readline
test_regrtest
test_repl
test_reprlib
test_resource
test_richcmp
test_rlcompleter
test_robotparser
test_runpy
test_sax
test_sched
test_scope
test_script_helper
test_secrets
test_select
test_selectors
test_set
test_setcomps
test_shelve
test_shlex
test_shutil
test_signal
test_site
test_slice
test_smtpd
test_smtplib
test_smtpnet
test_sndhdr
test_socket
test_socketserver
test_sort
test_source_encoding
test_spwd
test_sqlite
test_ssl
test_startfile
test_stat
test_statistics
test_strftime
test_string
test_string_literals
test_stringprep
test_strptime
test_strtod
test_struct
test_structmembers
test_structseq
test_subclassinit
test_subprocess
test_sunau
test_sundry
test_super
test_support
test_symbol
test_symtable
test_syntax
test_sys
test_sys_setprofile
test_sys_settrace
test_sysconfig
test_syslog
test_tarfile
test_tcl
test_telnetlib
test_tempfile
test_textwrap
test_thread
test_threaded_import
test_threadedtempfile
test_threading
test_threading_local
test_threadsignals
test_time
test_timeit
test_timeout
test_tix
test_tk
test_tokenize
test_tools (package)
test_trace
test_traceback
test_tracemalloc
test_ttk_guionly
test_ttk_textonly
test_tuple
test_turtle
test_typechecks
test_types
test_typing
test_ucn
test_unary
test_unicode
test_unicode_file
test_unicode_file_functions
test_unicode_identifiers
test_unicodedata
test_unittest
test_univnewlines
test_unpack
test_unpack_ex
test_urllib
test_urllib2
test_urllib2_localnet
test_urllib2net
test_urllib_response
test_urllibnet
test_urlparse
test_userdict
test_userlist
test_userstring
test_utf8_mode
test_utf8source
test_uu
test_uuid
test_venv
test_wait3
test_wait4
test_warnings (package)
test_wave
test_weakref
test_weakset
test_webbrowser
test_winconsoleio
test_winreg
test_winsound
test_with
test_wsgiref
test_xdrlib
test_xml_dom_minicompat
test_xml_etree
test_xml_etree_c
test_xmlrpc
test_xmlrpc_net
test_xxtestfuzz
test_yield_from
test_zipapp
test_zipfile
test_zipfile64
test_zipimport
test_zipimport_support
test_zlib
testcodec
tf_inherit_check
threaded_import_hangers
time_hashlib
tracedmodules (package)
win_console_handler
xmltests

FILE
c:\users\matthijs\appdata\local\programs\python\python37\lib\test\__init__.py


Help on module threading:

NAME
threading - Thread module emulating a subset of Java's threading model.

CLASSES
builtins.Exception(builtins.BaseException)
builtins.RuntimeError
BrokenBarrierError
builtins.object
_thread._local
Barrier
Condition
Event
Semaphore
BoundedSemaphore
Thread
Timer

class Barrier(builtins.object)
| Barrier(parties, action=None, timeout=None)
|
| Implements a Barrier.
|
| Useful for synchronizing a fixed number of threads at known synchronization
| points. Threads block on 'wait()' and are simultaneously once they have all
| made that call.
|
| Methods defined here:
|
| __init__(self, parties, action=None, timeout=None)
| Create a barrier, initialised to 'parties' threads.
|
| 'action' is a callable which, when supplied, will be called by one of
| the threads after they have all entered the barrier and just prior to
| releasing them all. If a 'timeout' is provided, it is uses as the
| default for all subsequent 'wait()' calls.
|
| abort(self)
| Place the barrier into a 'broken' state.
|
| Useful in case of error. Any currently waiting threads and threads
| attempting to 'wait()' will have BrokenBarrierError raised.
|
| reset(self)
| Reset the barrier to the initial state.
|
| Any threads currently waiting will get the BrokenBarrier exception
| raised.
|
| wait(self, timeout=None)
| Wait for the barrier.
|
| When the specified number of threads have started waiting, they are all
| simultaneously awoken. If an 'action' was provided for the barrier, one
| of the threads will have executed that callback prior to returning.
| Returns an individual index number from 0 to 'parties-1'.
|
|

| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| broken
| Return True if the barrier is in a broken state.
|
| n_waiting
| Return the number of threads currently waiting at the barrier.
|
| parties
| Return the number of threads required to trip the barrier.

class BoundedSemaphore(Semaphore)
| BoundedSemaphore(value=1)
|
| Implements a bounded semaphore.
|
| A bounded semaphore checks to make sure its current value doesn't exceed its
| initial value. If it does, ValueError is raised. In most situations
| semaphores are used to guard resources with limited capacity.
|
| If the semaphore is released too many times it's a sign of a bug. If not
| given, value defaults to 1.
|
| Like regular semaphores, bounded semaphores manage a counter representing
| the number of release() calls minus the number of acquire() calls, plus an
| initial value. The acquire() method blocks if necessary until it can return
| without making the counter negative. If not given, value defaults to 1.
|
| Method resolution order:
| BoundedSemaphore
| Semaphore
| builtins.object
|
| Methods defined here:
|
| __init__(self, value=1)
| Initialize self. See help(type(self)) for accurate signature.
|
| release(self)
| Release a semaphore, incrementing the internal counter by one.
|
| When the counter is zero on entry and another thread is waiting for it
| to become larger than zero again, wake up that thread.
|
| If the number of releases exceeds the number of acquires,
| raise a ValueError.
|
|

| Methods inherited from Semaphore:
|
| __enter__ = acquire(self, blocking=True, timeout=None)
| Acquire a semaphore, decrementing the internal counter by one.
|
| When invoked without arguments: if the internal counter is larger than
| zero on entry, decrement it by one and return immediately. If it is zero
| on entry, block, waiting until some other thread has called release() to
| make it larger than zero. This is done with proper interlocking so that
| if multiple acquire() calls are blocked, release() will wake exactly one
| of them up. The implementation may pick one at random, so the order in
| which blocked threads are awakened should not be relied on. There is no
| return value in this case.
|
| When invoked with blocking set to true, do the same thing as when called
| without arguments, and return true.
|
| When invoked with blocking set to false, do not block. If a call without
| an argument would block, return false immediately; otherwise, do the
| same thing as when called without arguments, and return true.
|
| When invoked with a timeout other than None, it will block for at
| most timeout seconds. If acquire does not complete successfully in
| that interval, return false. Return true otherwise.
|
| __exit__(self, t, v, tb)
|
| acquire(self, blocking=True, timeout=None)
| Acquire a semaphore, decrementing the internal counter by one.
|
| When invoked without arguments: if the internal counter is larger than
| zero on entry, decrement it by one and return immediately. If it is zero
| on entry, block, waiting until some other thread has called release() to
| make it larger than zero. This is done with proper interlocking so that
| if multiple acquire() calls are blocked, release() will wake exactly one
| of them up. The implementation may pick one at random, so the order in
| which blocked threads are awakened should not be relied on. There is no
| return value in this case.
|
| When invoked with blocking set to true, do the same thing as when called
| without arguments, and return true.
|
| When invoked with blocking set to false, do not block. If a call without
| an argument would block, return false immediately; otherwise, do the
| same thing as when called without arguments, and return true.
|
| When invoked with a timeout other than None, it will block for at
| most timeout seconds. If acquire does not complete successfully in
| that interval, return false. Return true otherwise.
|
|

| Data descriptors inherited from Semaphore:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

class BrokenBarrierError(builtins.RuntimeError)
| Unspecified run-time error.
|
| Method resolution order:
| BrokenBarrierError
| builtins.RuntimeError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Methods inherited from builtins.RuntimeError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
|

| Static methods inherited from builtins.RuntimeError:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class Condition(builtins.object)
| Condition(lock=None)
|
| Class that implements a condition variable.
|
| A condition variable allows one or more threads to wait until they are
| notified by another thread.
|
| If the lock argument is given and not None, it must be a Lock or RLock
| object, and it is used as the underlying lock. Otherwise, a new RLock object
| is created and used as the underlying lock.
|
| Methods defined here:
|
| __enter__(self)
|
| __exit__(self, *args)
|
| __init__(self, lock=None)
| Initialize self. See help(type(self)) for accurate signature.
|
| __repr__(self)
| Return repr(self).
|
| notify(self, n=1)
| Wake up one or more threads waiting on this condition, if any.
|
| If the calling thread has not acquired the lock when this method is
| called, a RuntimeError is raised.
|
| This method wakes up at most n of the threads waiting for the condition
| variable; it is a no-op if no threads are waiting.
|
| notifyAll = notify_all(self)
|
| notify_all(self)
| Wake up all threads waiting on this condition.
|
| If the calling thread has not acquired the lock when this method
| is called, a RuntimeError is raised.
|
| wait(self, timeout=None)
| Wait until notified or until a timeout occurs.
|
| If the calling thread has not acquired the lock when this method is
| called, a RuntimeError is raised.
|
| This method releases the underlying lock, and then blocks until it is
| awakened by a notify() or notify_all() call for the same condition
| variable in another thread, or until the optional timeout occurs. Once
| awakened or timed out, it re-acquires the lock and returns.
|
| When the timeout argument is present and not None, it should be a
| floating point number specifying a timeout for the operation in seconds
| (or fractions thereof).
|
| When the underlying lock is an RLock, it is not released using its
| release() method, since this may not actually unlock the lock when it
| was acquired multiple times recursively. Instead, an internal interface
| of the RLock class is used, which really unlocks it even when it has
| been recursively acquired several times. Another internal interface is
| then used to restore the recursion level when the lock is reacquired.
|
| wait_for(self, predicate, timeout=None)
| Wait until a condition evaluates to True.
|
| predicate should be a callable which result will be interpreted as a
| boolean value. A timeout may be provided giving the maximum time to
| wait.
|
|

| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

class Event(builtins.object)
| Class implementing event objects.
|
| Events manage a flag that can be set to true with the set() method and reset
| to false with the clear() method. The wait() method blocks until the flag is
| true. The flag is initially false.
|
| Methods defined here:
|
| __init__(self)
| Initialize self. See help(type(self)) for accurate signature.
|
| clear(self)
| Reset the internal flag to false.
|
| Subsequently, threads calling wait() will block until set() is called to
| set the internal flag to true again.
|
| isSet = is_set(self)
|
| is_set(self)
| Return true if and only if the internal flag is true.
|
| set(self)
| Set the internal flag to true.
|
| All threads waiting for it to become true are awakened. Threads
| that call wait() once the flag is true will not block at all.
|
| wait(self, timeout=None)
| Block until the internal flag is true.
|
| If the internal flag is true on entry, return immediately. Otherwise,
| block until another thread calls set() to set the flag to true, or until
| the optional timeout occurs.
|
| When the timeout argument is present and not None, it should be a
| floating point number specifying a timeout for the operation in seconds
| (or fractions thereof).
|
| This method returns the internal flag on exit, so it will always return
| True except if a timeout is given and the operation times out.
|
|

| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

class Semaphore(builtins.object)
| Semaphore(value=1)
|
| This class implements semaphore objects.
|
| Semaphores manage a counter representing the number of release() calls minus
| the number of acquire() calls, plus an initial value. The acquire() method
| blocks if necessary until it can return without making the counter
| negative. If not given, value defaults to 1.
|
| Methods defined here:
|
| __enter__ = acquire(self, blocking=True, timeout=None)
|
| __exit__(self, t, v, tb)
|
| __init__(self, value=1)
| Initialize self. See help(type(self)) for accurate signature.
|
| acquire(self, blocking=True, timeout=None)
| Acquire a semaphore, decrementing the internal counter by one.
|
| When invoked without arguments: if the internal counter is larger than
| zero on entry, decrement it by one and return immediately. If it is zero
| on entry, block, waiting until some other thread has called release() to
| make it larger than zero. This is done with proper interlocking so that
| if multiple acquire() calls are blocked, release() will wake exactly one
| of them up. The implementation may pick one at random, so the order in
| which blocked threads are awakened should not be relied on. There is no
| return value in this case.
|
| When invoked with blocking set to true, do the same thing as when called
| without arguments, and return true.
|
| When invoked with blocking set to false, do not block. If a call without
| an argument would block, return false immediately; otherwise, do the
| same thing as when called without arguments, and return true.
|
| When invoked with a timeout other than None, it will block for at
| most timeout seconds. If acquire does not complete successfully in
| that interval, return false. Return true otherwise.
|
| release(self)
| Release a semaphore, incrementing the internal counter by one.
|
| When the counter is zero on entry and another thread is waiting for it
| to become larger than zero again, wake up that thread.
|
|

| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

class Thread(builtins.object)
| Thread(group=None, target=None, name=None, args=(), kwargs=None, *, daemon=None)
|
| A class that represents a thread of control.
|
| This class can be safely subclassed in a limited fashion. There are two ways
| to specify the activity: by passing a callable object to the constructor, or
| by overriding the run() method in a subclass.
|
| Methods defined here:
|
| __init__(self, group=None, target=None, name=None, args=(), kwargs=None, *, daemon=None)
| This constructor should always be called with keyword arguments. Arguments are:
|
| *group* should be None; reserved for future extension when a ThreadGroup
| class is implemented.
|
| *target* is the callable object to be invoked by the run()
| method. Defaults to None, meaning nothing is called.
|
| *name* is the thread name. By default, a unique name is constructed of
| the form "Thread-N" where N is a small decimal number.
|
| *args* is the argument tuple for the target invocation. Defaults to ().
|
| *kwargs* is a dictionary of keyword arguments for the target
| invocation. Defaults to {}.
|
| If a subclass overrides the constructor, it must make sure to invoke
| the base class constructor (Thread.__init__()) before doing anything
| else to the thread.
|
| __repr__(self)
| Return repr(self).
|
| getName(self)
|
| isAlive = is_alive(self)
|
| isDaemon(self)
|
| is_alive(self)
| Return whether the thread is alive.
|
| This method returns True just before the run() method starts until just
| after the run() method terminates. The module function enumerate()
| returns a list of all alive threads.
|
| join(self, timeout=None)
| Wait until the thread terminates.
|
| This blocks the calling thread until the thread whose join() method is
| called terminates -- either normally or through an unhandled exception
| or until the optional timeout occurs.
|
| When the timeout argument is present and not None, it should be a
| floating point number specifying a timeout for the operation in seconds
| (or fractions thereof). As join() always returns None, you must call
| isAlive() after join() to decide whether a timeout happened -- if the
| thread is still alive, the join() call timed out.
|
| When the timeout argument is not present or None, the operation will
| block until the thread terminates.
|
| A thread can be join()ed many times.
|
| join() raises a RuntimeError if an attempt is made to join the current
| thread as that would cause a deadlock. It is also an error to join() a
| thread before it has been started and attempts to do so raises the same
| exception.
|
| run(self)
| Method representing the thread's activity.
|
| You may override this method in a subclass. The standard run() method
| invokes the callable object passed to the object's constructor as the
| target argument, if any, with sequential and keyword arguments taken
| from the args and kwargs arguments, respectively.
|
| setDaemon(self, daemonic)
|
| setName(self, name)
|
| start(self)
| Start the thread's activity.
|
| It must be called at most once per thread object. It arranges for the
| object's run() method to be invoked in a separate thread of control.
|
| This method will raise a RuntimeError if called more than once on the
| same thread object.
|
|

| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| daemon
| A boolean value indicating whether this thread is a daemon thread.
|
| This must be set before start() is called, otherwise RuntimeError is
| raised. Its initial value is inherited from the creating thread; the
| main thread is not a daemon thread and therefore all threads created in
| the main thread default to daemon = False.
|
| The entire Python program exits when no alive non-daemon threads are
| left.
|
| ident
| Thread identifier of this thread or None if it has not been started.
|
| This is a nonzero integer. See the get_ident() function. Thread
| identifiers may be recycled when a thread exits and another thread is
| created. The identifier is available even after the thread has exited.
|
| name
| A string used for identification purposes only.
|
| It has no semantics. Multiple threads may be given the same name. The
| initial name is set by the constructor.

ThreadError = class RuntimeError(Exception)
| Unspecified run-time error.
|
| Method resolution order:
| RuntimeError
| Exception
| BaseException
| object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class Timer(Thread)
| Timer(interval, function, args=None, kwargs=None)
|
| Call a function after a specified number of seconds:
|
| t = Timer(30.0, f, args=None, kwargs=None)
| t.start()
| t.cancel() # stop the timer's action if it's still waiting
|
| Method resolution order:
| Timer
| Thread
| builtins.object
|
| Methods defined here:
|
| __init__(self, interval, function, args=None, kwargs=None)
| This constructor should always be called with keyword arguments. Arguments are:
|
| *group* should be None; reserved for future extension when a ThreadGroup
| class is implemented.
|
| *target* is the callable object to be invoked by the run()
| method. Defaults to None, meaning nothing is called.
|
| *name* is the thread name. By default, a unique name is constructed of
| the form "Thread-N" where N is a small decimal number.
|
| *args* is the argument tuple for the target invocation. Defaults to ().
|
| *kwargs* is a dictionary of keyword arguments for the target
| invocation. Defaults to {}.
|
| If a subclass overrides the constructor, it must make sure to invoke
| the base class constructor (Thread.__init__()) before doing anything
| else to the thread.
|
| cancel(self)
| Stop the timer if it hasn't finished yet.
|
| run(self)
| Method representing the thread's activity.
|
| You may override this method in a subclass. The standard run() method
| invokes the callable object passed to the object's constructor as the
| target argument, if any, with sequential and keyword arguments taken
| from the args and kwargs arguments, respectively.
|
|

| Methods inherited from Thread:
|
| __repr__(self)
| Return repr(self).
|
| getName(self)
|
| isAlive = is_alive(self)
| Return whether the thread is alive.
|
| This method returns True just before the run() method starts until just
| after the run() method terminates. The module function enumerate()
| returns a list of all alive threads.
|
| isDaemon(self)
|
| is_alive(self)
| Return whether the thread is alive.
|
| This method returns True just before the run() method starts until just
| after the run() method terminates. The module function enumerate()
| returns a list of all alive threads.
|
| join(self, timeout=None)
| Wait until the thread terminates.
|
| This blocks the calling thread until the thread whose join() method is
| called terminates -- either normally or through an unhandled exception
| or until the optional timeout occurs.
|
| When the timeout argument is present and not None, it should be a
| floating point number specifying a timeout for the operation in seconds
| (or fractions thereof). As join() always returns None, you must call
| isAlive() after join() to decide whether a timeout happened -- if the
| thread is still alive, the join() call timed out.
|
| When the timeout argument is not present or None, the operation will
| block until the thread terminates.
|
| A thread can be join()ed many times.
|
| join() raises a RuntimeError if an attempt is made to join the current
| thread as that would cause a deadlock. It is also an error to join() a
| thread before it has been started and attempts to do so raises the same
| exception.
|
| setDaemon(self, daemonic)
|
| setName(self, name)
|
| start(self)
| Start the thread's activity.
|
| It must be called at most once per thread object. It arranges for the
| object's run() method to be invoked in a separate thread of control.
|
| This method will raise a RuntimeError if called more than once on the
| same thread object.
|
|

| Data descriptors inherited from Thread:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| daemon
| A boolean value indicating whether this thread is a daemon thread.
|
| This must be set before start() is called, otherwise RuntimeError is
| raised. Its initial value is inherited from the creating thread; the
| main thread is not a daemon thread and therefore all threads created in
| the main thread default to daemon = False.
|
| The entire Python program exits when no alive non-daemon threads are
| left.
|
| ident
| Thread identifier of this thread or None if it has not been started.
|
| This is a nonzero integer. See the get_ident() function. Thread
| identifiers may be recycled when a thread exits and another thread is
| created. The identifier is available even after the thread has exited.
|
| name
| A string used for identification purposes only.
|
| It has no semantics. Multiple threads may be given the same name. The
| initial name is set by the constructor.

local = class _local(builtins.object)
| Thread-local data
|
| Methods defined here:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.

FUNCTIONS
Lock = allocate_lock(...)
allocate_lock() -> lock object
(allocate() is an obsolete synonym)

Create a new lock object. See help(type(threading.Lock())) for
information about locks.

RLock(*args, **kwargs)
Factory function that returns a new reentrant lock.

A reentrant lock must be released by the thread that acquired it. Once a
thread has acquired a reentrant lock, the same thread may acquire it again
without blocking; the thread must release it once for each time it has
acquired it.

active_count()
Return the number of Thread objects currently alive.

The returned count is equal to the length of the list returned by
enumerate().

current_thread()
Return the current Thread object, corresponding to the caller's thread of control.

If the caller's thread of control was not created through the threading
module, a dummy thread object with limited functionality is returned.

enumerate()
Return a list of all Thread objects currently alive.

The list includes daemonic threads, dummy thread objects created by
current_thread(), and the main thread. It excludes terminated threads and
threads that have not yet been started.

get_ident(...)
get_ident() -> integer

Return a non-zero integer that uniquely identifies the current thread
amongst other threads that exist simultaneously.
This may be used to identify per-thread resources.
Even though on some platforms threads identities may appear to be
allocated consecutive numbers starting at 1, this behavior should not
be relied upon, and the number should be seen purely as a magic cookie.
A thread's identity may be reused for another thread after it exits.

main_thread()
Return the main thread object.

In normal conditions, the main thread is the thread from which the
Python interpreter was started.

setprofile(func)
Set a profile function for all threads started from the threading module.

The func will be passed to sys.setprofile() for each thread, before its
run() method is called.

settrace(func)
Set a trace function for all threads started from the threading module.

The func will be passed to sys.settrace() for each thread, before its run()
method is called.

stack_size(...)
stack_size([size]) -> size

Return the thread stack size used when creating new threads. The
optional size argument specifies the stack size (in bytes) to be used
for subsequently created threads, and must be 0 (use platform or
configured default) or a positive integer value of at least 32,768 (32k).
If changing the thread stack size is unsupported, a ThreadError
exception is raised. If the specified size is invalid, a ValueError
exception is raised, and the stack size is unmodified. 32k bytes
currently the minimum supported stack size value to guarantee
sufficient stack space for the interpreter itself.

Note that some platforms may have particular restrictions on values for
the stack size, such as requiring a minimum stack size larger than 32 KiB or
requiring allocation in multiples of the system memory page size
- platform documentation should be referred to for more information
(4 KiB pages are common; using multiples of 4096 for the stack size is
the suggested approach in the absence of more specific information).

DATA
TIMEOUT_MAX = 4294967.0
__all__ = ['get_ident', 'active_count', 'Condition', 'current_thread',...

FILE
c:\users\matthijs\appdata\local\programs\python\python37\lib\threading.py


Help on built-in module time:

NAME
time - This module provides various functions to manipulate time values.

DESCRIPTION
There are two standard representations of time. One is the number
of seconds since the Epoch, in UTC (a.k.a. GMT). It may be an integer
or a floating point number (to represent fractions of seconds).
The Epoch is system-defined; on Unix, it is generally January 1st, 1970.
The actual value can be retrieved by calling gmtime(0).

The other representation is a tuple of 9 integers giving local time.
The tuple items are:
year (including century, e.g. 1998)
month (1-12)
day (1-31)
hours (0-23)
minutes (0-59)
seconds (0-59)
weekday (0-6, Monday is 0)
Julian day (day in the year, 1-366)
DST (Daylight Savings Time) flag (-1, 0 or 1)
If the DST flag is 0, the time is given in the regular time zone;
if it is 1, the time is given in the DST time zone;
if it is -1, mktime() should guess based on the date and time.

CLASSES
builtins.tuple(builtins.object)
struct_time

class struct_time(builtins.tuple)
| struct_time(iterable=(), /)
|
| The time value as returned by gmtime(), localtime(), and strptime(), and
| accepted by asctime(), mktime() and strftime(). May be considered as a
| sequence of 9 integers.
|
| Note that several fields' values are not the same as those defined by
| the C language standard for struct tm. For example, the value of the
| field tm_year is the actual year, not year - 1900. See individual
| fields' descriptions for details.
|
| Method resolution order:
| struct_time
| builtins.tuple
| builtins.object
|
| Methods defined here:
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
|

| Static methods defined here:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Data descriptors defined here:
|
| tm_gmtoff
| offset from UTC in seconds
|
| tm_hour
| hours, range [0, 23]
|
| tm_isdst
| 1 if summer time is in effect, 0 if not, and -1 if unknown
|
| tm_mday
| day of month, range [1, 31]
|
| tm_min
| minutes, range [0, 59]
|
| tm_mon
| month of year, range [1, 12]
|
| tm_sec
| seconds, range [0, 61])
|
| tm_wday
| day of week, range [0, 6], Monday is 0
|
| tm_yday
| day of year, range [1, 366]
|
| tm_year
| year, for example, 1993
|
| tm_zone
| abbreviation of timezone name
|
|

| Data and other attributes defined here:
|
| n_fields = 11
|
| n_sequence_fields = 9
|
| n_unnamed_fields = 0
|
|

| Methods inherited from builtins.tuple:
|
| __add__(self, value, /)
| Return self+value.
|
| __contains__(self, key, /)
| Return key in self.
|
| __eq__(self, value, /)
| Return self==value.
|
| __ge__(self, value, /)
| Return self>=value.
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __getitem__(self, key, /)
| Return self[key].
|
| __getnewargs__(self, /)
|
| __gt__(self, value, /)
| Return self>value.
|
| __hash__(self, /)
| Return hash(self).
|
| __iter__(self, /)
| Implement iter(self).
|
| __le__(self, value, /)
| Return self<=value.
|
| __len__(self, /)
| Return len(self).
|
| __lt__(self, value, /)
| Return self |
| __mul__(self, value, /)
| Return self*value.
|
| __ne__(self, value, /)
| Return self!=value.
|
| __rmul__(self, value, /)
| Return value*self.
|
| count(self, value, /)
| Return number of occurrences of value.
|
| index(self, value, start=0, stop=9223372036854775807, /)
| Return first index of value.
|
| Raises ValueError if the value is not present.

FUNCTIONS
asctime(...)
asctime([tuple]) -> string

Convert a time tuple to a string, e.g. 'Sat Jun 06 16:26:11 1998'.
When the time tuple is not present, current time as returned by localtime()
is used.

clock(...)
clock() -> floating point number

Return the CPU time or real time since the start of the process or since
the first call to clock(). This has as much precision as the system
records.

ctime(...)
ctime(seconds) -> string

Convert a time in seconds since the Epoch to a string in local time.
This is equivalent to asctime(localtime(seconds)). When the time tuple is
not present, current time as returned by localtime() is used.

get_clock_info(...)
get_clock_info(name: str) -> dict

Get information of the specified clock.

gmtime(...)
gmtime([seconds]) -> (tm_year, tm_mon, tm_mday, tm_hour, tm_min,
tm_sec, tm_wday, tm_yday, tm_isdst)

Convert seconds since the Epoch to a time tuple expressing UTC (a.k.a.
GMT). When 'seconds' is not passed in, convert the current time instead.

If the platform supports the tm_gmtoff and tm_zone, they are available as
attributes only.

localtime(...)
localtime([seconds]) -> (tm_year,tm_mon,tm_mday,tm_hour,tm_min,
tm_sec,tm_wday,tm_yday,tm_isdst)

Convert seconds since the Epoch to a time tuple expressing local time.
When 'seconds' is not passed in, convert the current time instead.

mktime(...)
mktime(tuple) -> floating point number

Convert a time tuple in local time to seconds since the Epoch.
Note that mktime(gmtime(0)) will not generally return zero for most
time zones; instead the returned value will either be equal to that
of the timezone or altzone attributes on the time module.

monotonic(...)
monotonic() -> float

Monotonic clock, cannot go backward.

monotonic_ns(...)
monotonic_ns() -> int

Monotonic clock, cannot go backward, as nanoseconds.

perf_counter(...)
perf_counter() -> float

Performance counter for benchmarking.

perf_counter_ns(...)
perf_counter_ns() -> int

Performance counter for benchmarking as nanoseconds.

process_time(...)
process_time() -> float

Process time for profiling: sum of the kernel and user-space CPU time.

process_time_ns(...)
process_time() -> int

Process time for profiling as nanoseconds:
sum of the kernel and user-space CPU time.

sleep(...)
sleep(seconds)

Delay execution for a given number of seconds. The argument may be
a floating point number for subsecond precision.

strftime(...)
strftime(format[, tuple]) -> string

Convert a time tuple to a string according to a format specification.
See the library reference manual for formatting codes. When the time tuple
is not present, current time as returned by localtime() is used.

Commonly used format codes:

%Y Year with century as a decimal number.
%m Month as a decimal number [01,12].
%d Day of the month as a decimal number [01,31].
%H Hour (24-hour clock) as a decimal number [00,23].
%M Minute as a decimal number [00,59].
%S Second as a decimal number [00,61].
%z Time zone offset from UTC.
%a Locale's abbreviated weekday name.
%A Locale's full weekday name.
%b Locale's abbreviated month name.
%B Locale's full month name.
%c Locale's appropriate date and time representation.
%I Hour (12-hour clock) as a decimal number [01,12].
%p Locale's equivalent of either AM or PM.

Other codes may be available on your platform. See documentation for
the C library strftime function.

strptime(...)
strptime(string, format) -> struct_time

Parse a string to a time tuple according to a format specification.
See the library reference manual for formatting codes (same as
strftime()).

Commonly used format codes:

%Y Year with century as a decimal number.
%m Month as a decimal number [01,12].
%d Day of the month as a decimal number [01,31].
%H Hour (24-hour clock) as a decimal number [00,23].
%M Minute as a decimal number [00,59].
%S Second as a decimal number [00,61].
%z Time zone offset from UTC.
%a Locale's abbreviated weekday name.
%A Locale's full weekday name.
%b Locale's abbreviated month name.
%B Locale's full month name.
%c Locale's appropriate date and time representation.
%I Hour (12-hour clock) as a decimal number [01,12].
%p Locale's equivalent of either AM or PM.

Other codes may be available on your platform. See documentation for
the C library strftime function.

thread_time(...)
thread_time() -> float

Thread time for profiling: sum of the kernel and user-space CPU time.

thread_time_ns(...)
thread_time() -> int

Thread time for profiling as nanoseconds:
sum of the kernel and user-space CPU time.

time(...)
time() -> floating point number

Return the current time in seconds since the Epoch.
Fractions of a second may be present if the system clock provides them.

time_ns(...)
time_ns() -> int

Return the current time in nanoseconds since the Epoch.

DATA
altzone = -7200
daylight = 1
timezone = -3600
tzname = ('West-Europa (standaardtijd)', 'West-Europa (zomertijd)')

FILE
(built-in)


Help on package tqdm:

NAME
tqdm

PACKAGE CONTENTS
__main__
_main
_monitor
_tqdm
_tqdm_gui
_tqdm_notebook
_tqdm_pandas
_utils
_version
auto (package)
autonotebook (package)

CLASSES
builtins.KeyError(builtins.LookupError)
tqdm._tqdm.TqdmKeyError
builtins.RuntimeWarning(builtins.Warning)
tqdm._monitor.TqdmSynchronisationWarning
builtins.TypeError(builtins.Exception)
tqdm._tqdm.TqdmTypeError
builtins.Warning(builtins.Exception)
tqdm._tqdm.TqdmWarning
tqdm._tqdm.TqdmDeprecationWarning(tqdm._tqdm.TqdmWarning, builtins.DeprecationWarning)
tqdm._tqdm.TqdmExperimentalWarning(tqdm._tqdm.TqdmWarning, builtins.FutureWarning)
tqdm._tqdm.TqdmMonitorWarning(tqdm._tqdm.TqdmWarning, builtins.RuntimeWarning)
threading.Thread(builtins.object)
tqdm._monitor.TMonitor
tqdm._utils.Comparable(builtins.object)
tqdm._tqdm.tqdm
tqdm._tqdm_gui.tqdm_gui

class TMonitor(threading.Thread)
| TMonitor(tqdm_cls, sleep_interval)
|
| Monitoring thread for tqdm bars.
| Monitors if tqdm bars are taking too much time to display
| and readjusts miniters automatically if necessary.
|
| Parameters
| ----------
| tqdm_cls : class
| tqdm class to use (can be core tqdm or a submodule).
| sleep_interval : fload
| Time to sleep between monitoring checks.
|
| Method resolution order:
| TMonitor
| threading.Thread
| builtins.object
|
| Methods defined here:
|
| __init__(self, tqdm_cls, sleep_interval)
| This constructor should always be called with keyword arguments. Arguments are:
|
| *group* should be None; reserved for future extension when a ThreadGroup
| class is implemented.
|
| *target* is the callable object to be invoked by the run()
| method. Defaults to None, meaning nothing is called.
|
| *name* is the thread name. By default, a unique name is constructed of
| the form "Thread-N" where N is a small decimal number.
|
| *args* is the argument tuple for the target invocation. Defaults to ().
|
| *kwargs* is a dictionary of keyword arguments for the target
| invocation. Defaults to {}.
|
| If a subclass overrides the constructor, it must make sure to invoke
| the base class constructor (Thread.__init__()) before doing anything
| else to the thread.
|
| exit(self)
|
| get_instances(self)
|
| report(self)
|
| run(self)
| Method representing the thread's activity.
|
| You may override this method in a subclass. The standard run() method
| invokes the callable object passed to the object's constructor as the
| target argument, if any, with sequential and keyword arguments taken
| from the args and kwargs arguments, respectively.
|
|

| Methods inherited from threading.Thread:
|
| __repr__(self)
| Return repr(self).
|
| getName(self)
|
| isAlive = is_alive(self)
| Return whether the thread is alive.
|
| This method returns True just before the run() method starts until just
| after the run() method terminates. The module function enumerate()
| returns a list of all alive threads.
|
| isDaemon(self)
|
| is_alive(self)
| Return whether the thread is alive.
|
| This method returns True just before the run() method starts until just
| after the run() method terminates. The module function enumerate()
| returns a list of all alive threads.
|
| join(self, timeout=None)
| Wait until the thread terminates.
|
| This blocks the calling thread until the thread whose join() method is
| called terminates -- either normally or through an unhandled exception
| or until the optional timeout occurs.
|
| When the timeout argument is present and not None, it should be a
| floating point number specifying a timeout for the operation in seconds
| (or fractions thereof). As join() always returns None, you must call
| isAlive() after join() to decide whether a timeout happened -- if the
| thread is still alive, the join() call timed out.
|
| When the timeout argument is not present or None, the operation will
| block until the thread terminates.
|
| A thread can be join()ed many times.
|
| join() raises a RuntimeError if an attempt is made to join the current
| thread as that would cause a deadlock. It is also an error to join() a
| thread before it has been started and attempts to do so raises the same
| exception.
|
| setDaemon(self, daemonic)
|
| setName(self, name)
|
| start(self)
| Start the thread's activity.
|
| It must be called at most once per thread object. It arranges for the
| object's run() method to be invoked in a separate thread of control.
|
| This method will raise a RuntimeError if called more than once on the
| same thread object.
|
|

| Data descriptors inherited from threading.Thread:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)
|
| daemon
| A boolean value indicating whether this thread is a daemon thread.
|
| This must be set before start() is called, otherwise RuntimeError is
| raised. Its initial value is inherited from the creating thread; the
| main thread is not a daemon thread and therefore all threads created in
| the main thread default to daemon = False.
|
| The entire Python program exits when no alive non-daemon threads are
| left.
|
| ident
| Thread identifier of this thread or None if it has not been started.
|
| This is a nonzero integer. See the get_ident() function. Thread
| identifiers may be recycled when a thread exits and another thread is
| created. The identifier is available even after the thread has exited.
|
| name
| A string used for identification purposes only.
|
| It has no semantics. Multiple threads may be given the same name. The
| initial name is set by the constructor.

class TqdmDeprecationWarning(TqdmWarning, builtins.DeprecationWarning)
| TqdmDeprecationWarning(msg, fp_write=None, *a, **k)
|
| base class for all tqdm warnings.
|
| Used for non-external-code-breaking errors, such as garbled printing.
|
| Method resolution order:
| TqdmDeprecationWarning
| TqdmWarning
| builtins.DeprecationWarning
| builtins.Warning
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods inherited from TqdmWarning:
|
| __init__(self, msg, fp_write=None, *a, **k)
| Initialize self. See help(type(self)) for accurate signature.
|
|

| Data descriptors inherited from TqdmWarning:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Static methods inherited from builtins.DeprecationWarning:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class TqdmExperimentalWarning(TqdmWarning, builtins.FutureWarning)
| TqdmExperimentalWarning(msg, fp_write=None, *a, **k)
|
| beta feature, unstable API and behaviour
|
| Method resolution order:
| TqdmExperimentalWarning
| TqdmWarning
| builtins.FutureWarning
| builtins.Warning
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods inherited from TqdmWarning:
|
| __init__(self, msg, fp_write=None, *a, **k)
| Initialize self. See help(type(self)) for accurate signature.
|
|

| Data descriptors inherited from TqdmWarning:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Static methods inherited from builtins.FutureWarning:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class TqdmKeyError(builtins.KeyError)
| Mapping key not found.
|
| Method resolution order:
| TqdmKeyError
| builtins.KeyError
| builtins.LookupError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Methods inherited from builtins.KeyError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| __str__(self, /)
| Return str(self).
|
|

| Static methods inherited from builtins.LookupError:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class TqdmMonitorWarning(TqdmWarning, builtins.RuntimeWarning)
| TqdmMonitorWarning(msg, fp_write=None, *a, **k)
|
| tqdm monitor errors which do not affect external functionality
|
| Method resolution order:
| TqdmMonitorWarning
| TqdmWarning
| builtins.RuntimeWarning
| builtins.Warning
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods inherited from TqdmWarning:
|
| __init__(self, msg, fp_write=None, *a, **k)
| Initialize self. See help(type(self)) for accurate signature.
|
|

| Data descriptors inherited from TqdmWarning:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Static methods inherited from builtins.RuntimeWarning:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class TqdmSynchronisationWarning(builtins.RuntimeWarning)
| tqdm multi-thread/-process errors which may cause incorrect nesting
| but otherwise no adverse effects
|
| Method resolution order:
| TqdmSynchronisationWarning
| builtins.RuntimeWarning
| builtins.Warning
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Methods inherited from builtins.RuntimeWarning:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
|

| Static methods inherited from builtins.RuntimeWarning:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class TqdmTypeError(builtins.TypeError)
| Inappropriate argument type.
|
| Method resolution order:
| TqdmTypeError
| builtins.TypeError
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Methods inherited from builtins.TypeError:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
|

| Static methods inherited from builtins.TypeError:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class TqdmWarning(builtins.Warning)
| TqdmWarning(msg, fp_write=None, *a, **k)
|
| base class for all tqdm warnings.
|
| Used for non-external-code-breaking errors, such as garbled printing.
|
| Method resolution order:
| TqdmWarning
| builtins.Warning
| builtins.Exception
| builtins.BaseException
| builtins.object
|
| Methods defined here:
|
| __init__(self, msg, fp_write=None, *a, **k)
| Initialize self. See help(type(self)) for accurate signature.
|
|

| Data descriptors defined here:
|
| __weakref__
| list of weak references to the object (if defined)
|
|

| Static methods inherited from builtins.Warning:
|
| __new__(*args, **kwargs) from builtins.type
| Create and return a new object. See help(type) for accurate signature.
|
|

| Methods inherited from builtins.BaseException:
|
| __delattr__(self, name, /)
| Implement delattr(self, name).
|
| __getattribute__(self, name, /)
| Return getattr(self, name).
|
| __reduce__(...)
| Helper for pickle.
|
| __repr__(self, /)
| Return repr(self).
|
| __setattr__(self, name, value, /)
| Implement setattr(self, name, value).
|
| __setstate__(...)
|
| __str__(self, /)
| Return str(self).
|
| with_traceback(...)
| Exception.with_traceback(tb) --
| set self.__traceback__ to tb and return self.
|
|

| Data descriptors inherited from builtins.BaseException:
|
| __cause__
| exception cause
|
| __context__
| exception context
|
| __dict__
|
| __suppress_context__
|
| __traceback__
|
| args

class tqdm(tqdm._utils.Comparable)
| tqdm(*args, **kwargs)
|
| Decorate an iterable object, returning an iterator which acts exactly
| like the original iterable, but prints a dynamically updating
| progressbar every time a value is requested.
|
| Method resolution order:
| tqdm
| tqdm._utils.Comparable
| builtins.object
|
| Methods defined here:
|
| __del__(self)
|
| __enter__(self)
|
| __exit__(self, *exc)
|
| __hash__(self)
| Return hash(self).
|
| __init__(self, iterable=None, desc=None, total=None, leave=True, file=None, ncols=None, mininterval=0.1, maxinterval=10.0, miniters=None, ascii=None, disable=False, unit='it', unit_scale=False, dynamic_ncols=False, smoothing=0.3, bar_format=None, initial=0, position=None, postfix=None, unit_divisor=1000, gui=False, **kwargs)
| Parameters
| ----------
| iterable : iterable, optional
| Iterable to decorate with a progressbar.
| Leave blank to manually manage the updates.
| desc : str, optional
| Prefix for the progressbar.
| total : int, optional
| The number of expected iterations. If unspecified,
| len(iterable) is used if possible. If float("inf") or as a last
| resort, only basic progress statistics are displayed
| (no ETA, no progressbar).
| If `gui` is True and this parameter needs subsequent updating,
| specify an initial arbitrary large positive integer,
| e.g. int(9e9).
| leave : bool, optional
| If [default: True], keeps all traces of the progressbar
| upon termination of iteration.
| file : `io.TextIOWrapper` or `io.StringIO`, optional
| Specifies where to output the progress messages
| (default: sys.stderr). Uses `file.write(str)` and `file.flush()`
| methods.
| ncols : int, optional
| The width of the entire output message. If specified,
| dynamically resizes the progressbar to stay within this bound.
| If unspecified, attempts to use environment width. The
| fallback is a meter width of 10 and no limit for the counter and
| statistics. If 0, will not print any meter (only stats).
| mininterval : float, optional
| Minimum progress display update interval [default: 0.1] seconds.
| maxinterval : float, optional
| Maximum progress display update interval [default: 10] seconds.
| Automatically adjusts `miniters` to correspond to `mininterval`
| after long display update lag. Only works if `dynamic_miniters`
| or monitor thread is enabled.
| miniters : int, optional
| Minimum progress display update interval, in iterations.
| If 0 and `dynamic_miniters`, will automatically adjust to equal
| `mininterval` (more CPU efficient, good for tight loops).
| If > 0, will skip display of specified number of iterations.
| Tweak this and `mininterval` to get very efficient loops.
| If your progress is erratic with both fast and slow iterations
| (network, skipping items, etc) you should set miniters=1.
| ascii : bool, optional
| If unspecified or False, use unicode (smooth blocks) to fill
| the meter. The fallback is to use ASCII characters `1-9 #`.
| disable : bool, optional
| Whether to disable the entire progressbar wrapper
| [default: False]. If set to None, disable on non-TTY.
| unit : str, optional
| String that will be used to define the unit of each iteration
| [default: it].
| unit_scale : bool or int or float, optional
| If 1 or True, the number of iterations will be reduced/scaled
| automatically and a metric prefix following the
| International System of Units standard will be added
| (kilo, mega, etc.) [default: False]. If any other non-zero
| number, will scale `total` and `n`.
| dynamic_ncols : bool, optional
| If set, constantly alters `ncols` to the environment (allowing
| for window resizes) [default: False].
| smoothing : float, optional
| Exponential moving average smoothing factor for speed estimates
| (ignored in GUI mode). Ranges from 0 (average speed) to 1
| (current/instantaneous speed) [default: 0.3].
| bar_format : str, optional
| Specify a custom bar string formatting. May impact performance.
| [default: '{l_bar}{bar}{r_bar}'], where
| l_bar='{desc}: {percentage:3.0f}%|' and
| r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
| '{rate_fmt}{postfix}]'
| Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
| percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt,
| rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix.
| Note that a trailing ": " is automatically removed after {desc}
| if the latter is empty.
| initial : int, optional
| The initial counter value. Useful when restarting a progress
| bar [default: 0].
| position : int, optional
| Specify the line offset to print this bar (starting from 0)
| Automatic if unspecified.
| Useful to manage multiple bars at once (eg, from threads).
| postfix : dict or *, optional
| Specify additional stats to display at the end of the bar.
| Calls `set_postfix(**postfix)` if possible (dict).
| unit_divisor : float, optional
| [default: 1000], ignored unless `unit_scale` is True.
| gui : bool, optional
| WARNING: internal parameter - do not use.
| Use tqdm_gui(...) instead. If set, will attempt to use
| matplotlib animations for a graphical output [default: False].
|
| Returns
| -------
| out : decorated iterator.
|
| __iter__(self)
| Backward-compatibility to use: for x in tqdm(iterable)
|
| __len__(self)
|
| __repr__(self)
| Return repr(self).
|
| clear(self, nolock=False)
| Clear current bar display
|
| close(self)
| Cleanup and (if leave=False) close the progressbar.
|
| display(self, msg=None, pos=None)
| Use `self.sp` and to display `msg` in the specified `pos`.
|
| Parameters
| ----------
| msg : what to display (default: repr(self))
| pos : position to display in. (default: abs(self.pos))
|
| moveto(self, n)
|
| refresh(self, nolock=False)
| Force refresh the display of this bar
|
| set_description(self, desc=None, refresh=True)
| Set/modify description of the progress bar.
|
| Parameters
| ----------
| desc : str, optional
| refresh : bool, optional
| Forces refresh [default: True].
|
| set_description_str(self, desc=None, refresh=True)
| Set/modify description without ': ' appended.
|
| set_postfix(self, ordered_dict=None, refresh=True, **kwargs)
| Set/modify postfix (additional stats)
| with automatic formatting based on datatype.
|
| Parameters
| ----------
| ordered_dict : dict or OrderedDict, optional
| refresh : bool, optional
| Forces refresh [default: True].
| kwargs : dict, optional
|
| set_postfix_str(self, s='', refresh=True)
| Postfix without dictionary expansion, similar to prefix handling.
|
| unpause(self)
| Restart tqdm timer from last print time.
|
| update(self, n=1)
| Manually update the progress bar, useful for streams
| such as reading files.
| E.g.:
| >>> t = tqdm(total=filesize) # Initialise
| >>> for current_buffer in stream:
| ... ...
| ... t.update(len(current_buffer))
| >>> t.close()
| The last line is highly recommended, but possibly not necessary if
| `t.update()` will be called in such a way that `filesize` will be
| exactly reached and printed.
|
| Parameters
| ----------
| n : int, optional
| Increment to add to the internal counter of iterations
| [default: 1].
|
|

| Class methods defined here:
|
| external_write_mode(file=None, nolock=False) from builtins.type
| Disable tqdm within context and refresh tqdm when exits.
| Useful when writing to standard output stream
|
| get_lock() from builtins.type
| Get the global lock. Construct it if it does not exist.
|
| pandas(*targs, **tkwargs) from builtins.type
| Registers the given `tqdm` class with
| pandas.core.
| ( frame.DataFrame
| | series.Series
| | groupby.DataFrameGroupBy
| | groupby.SeriesGroupBy
| ).progress_apply
|
| A new instance will be create every time `progress_apply` is called,
| and each instance will automatically close() upon completion.
|
| Parameters
| ----------
| targs, tkwargs : arguments for the tqdm instance
|
| Examples
| --------
| >>> import pandas as pd
| >>> import numpy as np
| >>> from tqdm import tqdm, tqdm_gui
| >>>
| >>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
| >>> tqdm.pandas(ncols=50) # can use tqdm_gui, optional kwargs, etc
| >>> # Now you can use `progress_apply` instead of `apply`
| >>> df.groupby(0).progress_apply(lambda x: x**2)
|
| References
| ----------
| https://stackoverflow.com/questions/18603270/
| progress-indicator-during-pandas-operations-python
|
| set_lock(lock) from builtins.type
| Set the global lock.
|
| write(s, file=None, end='\n', nolock=False) from builtins.type
| Print a message via tqdm (without overlap with bars)
|
|

| Static methods defined here:
|
| __new__(cls, *args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ema(x, mu=None, alpha=0.3)
| Exponential moving average: smoothing to give progressively lower
| weights to older values.
|
| Parameters
| ----------
| x : float
| New value to include in EMA.
| mu : float, optional
| Previous EMA value.
| alpha : float, optional
| Smoothing factor in range [0, 1], [default: 0.3].
| Increase to give more weight to recent values.
| Ranges from 0 (yields mu) to 1 (yields x).
|
| format_interval(t)
| Formats a number of seconds as a clock time, [H:]MM:SS
|
| Parameters
| ----------
| t : int
| Number of seconds.
|
| Returns
| -------
| out : str
| [H:]MM:SS
|
| format_meter(n, total, elapsed, ncols=None, prefix='', ascii=False, unit='it', unit_scale=False, rate=None, bar_format=None, postfix=None, unit_divisor=1000, **extra_kwargs)
| Return a string-based progress bar given some parameters
|
| Parameters
| ----------
| n : int
| Number of finished iterations.
| total : int
| The expected total number of iterations. If meaningless (), only
| basic progress statistics are displayed (no ETA).
| elapsed : float
| Number of seconds passed since start.
| ncols : int, optional
| The width of the entire output message. If specified,
| dynamically resizes the progress meter to stay within this bound
| [default: None]. The fallback meter width is 10 for the progress
| bar + no limit for the iterations counter and statistics. If 0,
| will not print any meter (only stats).
| prefix : str, optional
| Prefix message (included in total width) [default: ''].
| Use as {desc} in bar_format string.
| ascii : bool, optional
| If not set, use unicode (smooth blocks) to fill the meter
| [default: False]. The fallback is to use ASCII characters
| (1-9 #).
| unit : str, optional
| The iteration unit [default: 'it'].
| unit_scale : bool or int or float, optional
| If 1 or True, the number of iterations will be printed with an
| appropriate SI metric prefix (k = 10^3, M = 10^6, etc.)
| [default: False]. If any other non-zero number, will scale
| `total` and `n`.
| rate : float, optional
| Manual override for iteration rate.
| If [default: None], uses n/elapsed.
| bar_format : str, optional
| Specify a custom bar string formatting. May impact performance.
| [default: '{l_bar}{bar}{r_bar}'], where
| l_bar='{desc}: {percentage:3.0f}%|' and
| r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
| '{rate_fmt}{postfix}]'
| Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
| percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt,
| rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix.
| Note that a trailing ": " is automatically removed after {desc}
| if the latter is empty.
| postfix : *, optional
| Similar to `prefix`, but placed at the end
| (e.g. for additional stats).
| Note: postfix is usually a string (not a dict) for this method,
| and will if possible be set to postfix = ', ' + postfix.
| However other types are supported (#382).
| unit_divisor : float, optional
| [default: 1000], ignored unless `unit_scale` is True.
|
| Returns
| -------
| out : Formatted meter and stats, ready to display.
|
| format_num(n)
| Intelligent scientific notation (.3g).
|
| Parameters
| ----------
| n : int or float or Numeric
| A Number.
|
| Returns
| -------
| out : str
| Formatted number.
|
| format_sizeof(num, suffix='', divisor=1000)
| Formats a number (greater than unity) with SI Order of Magnitude
| prefixes.
|
| Parameters
| ----------
| num : float
| Number ( >= 1) to format.
| suffix : str, optional
| Post-postfix [default: ''].
| divisor : float, optionl
| Divisor between prefixes [default: 1000].
|
| Returns
| -------
| out : str
| Number with Order of Magnitude SI unit postfix.
|
| status_printer(file)
| Manage the printing and in-place updating of a line of characters.
| Note that if the string is longer than a line, then in-place
| updating may not work (it will print a new line at each refresh).
|
|

| Data descriptors defined here:
|
| format_dict
| Public API for read-only member access
|
|

| Data and other attributes defined here:
|
| monitor = None
|
| monitor_interval = 10
|
|

| Methods inherited from tqdm._utils.Comparable:
|
| __eq__(self, other)
| Return self==value.
|
| __ge__(self, other)
| Return self>=value.
|
| __gt__(self, other)
| Return self>value.
|
| __le__(self, other)
| Return self<=value.
|
| __lt__(self, other)
| Return self |
| __ne__(self, other)
| Return self!=value.
|
|

| Data descriptors inherited from tqdm._utils.Comparable:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

class tqdm_gui(tqdm._tqdm.tqdm)
| tqdm_gui(*args, **kwargs)
|
| Experimental GUI version of tqdm!
|
| Method resolution order:
| tqdm_gui
| tqdm._tqdm.tqdm
| tqdm._utils.Comparable
| builtins.object
|
| Methods defined here:
|
| __init__(self, *args, **kwargs)
| Parameters
| ----------
| iterable : iterable, optional
| Iterable to decorate with a progressbar.
| Leave blank to manually manage the updates.
| desc : str, optional
| Prefix for the progressbar.
| total : int, optional
| The number of expected iterations. If unspecified,
| len(iterable) is used if possible. If float("inf") or as a last
| resort, only basic progress statistics are displayed
| (no ETA, no progressbar).
| If `gui` is True and this parameter needs subsequent updating,
| specify an initial arbitrary large positive integer,
| e.g. int(9e9).
| leave : bool, optional
| If [default: True], keeps all traces of the progressbar
| upon termination of iteration.
| file : `io.TextIOWrapper` or `io.StringIO`, optional
| Specifies where to output the progress messages
| (default: sys.stderr). Uses `file.write(str)` and `file.flush()`
| methods.
| ncols : int, optional
| The width of the entire output message. If specified,
| dynamically resizes the progressbar to stay within this bound.
| If unspecified, attempts to use environment width. The
| fallback is a meter width of 10 and no limit for the counter and
| statistics. If 0, will not print any meter (only stats).
| mininterval : float, optional
| Minimum progress display update interval [default: 0.1] seconds.
| maxinterval : float, optional
| Maximum progress display update interval [default: 10] seconds.
| Automatically adjusts `miniters` to correspond to `mininterval`
| after long display update lag. Only works if `dynamic_miniters`
| or monitor thread is enabled.
| miniters : int, optional
| Minimum progress display update interval, in iterations.
| If 0 and `dynamic_miniters`, will automatically adjust to equal
| `mininterval` (more CPU efficient, good for tight loops).
| If > 0, will skip display of specified number of iterations.
| Tweak this and `mininterval` to get very efficient loops.
| If your progress is erratic with both fast and slow iterations
| (network, skipping items, etc) you should set miniters=1.
| ascii : bool, optional
| If unspecified or False, use unicode (smooth blocks) to fill
| the meter. The fallback is to use ASCII characters `1-9 #`.
| disable : bool, optional
| Whether to disable the entire progressbar wrapper
| [default: False]. If set to None, disable on non-TTY.
| unit : str, optional
| String that will be used to define the unit of each iteration
| [default: it].
| unit_scale : bool or int or float, optional
| If 1 or True, the number of iterations will be reduced/scaled
| automatically and a metric prefix following the
| International System of Units standard will be added
| (kilo, mega, etc.) [default: False]. If any other non-zero
| number, will scale `total` and `n`.
| dynamic_ncols : bool, optional
| If set, constantly alters `ncols` to the environment (allowing
| for window resizes) [default: False].
| smoothing : float, optional
| Exponential moving average smoothing factor for speed estimates
| (ignored in GUI mode). Ranges from 0 (average speed) to 1
| (current/instantaneous speed) [default: 0.3].
| bar_format : str, optional
| Specify a custom bar string formatting. May impact performance.
| [default: '{l_bar}{bar}{r_bar}'], where
| l_bar='{desc}: {percentage:3.0f}%|' and
| r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
| '{rate_fmt}{postfix}]'
| Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
| percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt,
| rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix.
| Note that a trailing ": " is automatically removed after {desc}
| if the latter is empty.
| initial : int, optional
| The initial counter value. Useful when restarting a progress
| bar [default: 0].
| position : int, optional
| Specify the line offset to print this bar (starting from 0)
| Automatic if unspecified.
| Useful to manage multiple bars at once (eg, from threads).
| postfix : dict or *, optional
| Specify additional stats to display at the end of the bar.
| Calls `set_postfix(**postfix)` if possible (dict).
| unit_divisor : float, optional
| [default: 1000], ignored unless `unit_scale` is True.
| gui : bool, optional
| WARNING: internal parameter - do not use.
| Use tqdm_gui(...) instead. If set, will attempt to use
| matplotlib animations for a graphical output [default: False].
|
| Returns
| -------
| out : decorated iterator.
|
| __iter__(self)
| Backward-compatibility to use: for x in tqdm(iterable)
|
| close(self)
| Cleanup and (if leave=False) close the progressbar.
|
| update(self, n=1)
| Manually update the progress bar, useful for streams
| such as reading files.
| E.g.:
| >>> t = tqdm(total=filesize) # Initialise
| >>> for current_buffer in stream:
| ... ...
| ... t.update(len(current_buffer))
| >>> t.close()
| The last line is highly recommended, but possibly not necessary if
| `t.update()` will be called in such a way that `filesize` will be
| exactly reached and printed.
|
| Parameters
| ----------
| n : int, optional
| Increment to add to the internal counter of iterations
| [default: 1].
|
|

| Methods inherited from tqdm._tqdm.tqdm:
|
| __del__(self)
|
| __enter__(self)
|
| __exit__(self, *exc)
|
| __hash__(self)
| Return hash(self).
|
| __len__(self)
|
| __repr__(self)
| Return repr(self).
|
| clear(self, nolock=False)
| Clear current bar display
|
| display(self, msg=None, pos=None)
| Use `self.sp` and to display `msg` in the specified `pos`.
|
| Parameters
| ----------
| msg : what to display (default: repr(self))
| pos : position to display in. (default: abs(self.pos))
|
| moveto(self, n)
|
| refresh(self, nolock=False)
| Force refresh the display of this bar
|
| set_description(self, desc=None, refresh=True)
| Set/modify description of the progress bar.
|
| Parameters
| ----------
| desc : str, optional
| refresh : bool, optional
| Forces refresh [default: True].
|
| set_description_str(self, desc=None, refresh=True)
| Set/modify description without ': ' appended.
|
| set_postfix(self, ordered_dict=None, refresh=True, **kwargs)
| Set/modify postfix (additional stats)
| with automatic formatting based on datatype.
|
| Parameters
| ----------
| ordered_dict : dict or OrderedDict, optional
| refresh : bool, optional
| Forces refresh [default: True].
| kwargs : dict, optional
|
| set_postfix_str(self, s='', refresh=True)
| Postfix without dictionary expansion, similar to prefix handling.
|
| unpause(self)
| Restart tqdm timer from last print time.
|
|

| Class methods inherited from tqdm._tqdm.tqdm:
|
| external_write_mode(file=None, nolock=False) from builtins.type
| Disable tqdm within context and refresh tqdm when exits.
| Useful when writing to standard output stream
|
| get_lock() from builtins.type
| Get the global lock. Construct it if it does not exist.
|
| pandas(*targs, **tkwargs) from builtins.type
| Registers the given `tqdm` class with
| pandas.core.
| ( frame.DataFrame
| | series.Series
| | groupby.DataFrameGroupBy
| | groupby.SeriesGroupBy
| ).progress_apply
|
| A new instance will be create every time `progress_apply` is called,
| and each instance will automatically close() upon completion.
|
| Parameters
| ----------
| targs, tkwargs : arguments for the tqdm instance
|
| Examples
| --------
| >>> import pandas as pd
| >>> import numpy as np
| >>> from tqdm import tqdm, tqdm_gui
| >>>
| >>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
| >>> tqdm.pandas(ncols=50) # can use tqdm_gui, optional kwargs, etc
| >>> # Now you can use `progress_apply` instead of `apply`
| >>> df.groupby(0).progress_apply(lambda x: x**2)
|
| References
| ----------
| https://stackoverflow.com/questions/18603270/
| progress-indicator-during-pandas-operations-python
|
| set_lock(lock) from builtins.type
| Set the global lock.
|
| write(s, file=None, end='\n', nolock=False) from builtins.type
| Print a message via tqdm (without overlap with bars)
|
|

| Static methods inherited from tqdm._tqdm.tqdm:
|
| __new__(cls, *args, **kwargs)
| Create and return a new object. See help(type) for accurate signature.
|
| ema(x, mu=None, alpha=0.3)
| Exponential moving average: smoothing to give progressively lower
| weights to older values.
|
| Parameters
| ----------
| x : float
| New value to include in EMA.
| mu : float, optional
| Previous EMA value.
| alpha : float, optional
| Smoothing factor in range [0, 1], [default: 0.3].
| Increase to give more weight to recent values.
| Ranges from 0 (yields mu) to 1 (yields x).
|
| format_interval(t)
| Formats a number of seconds as a clock time, [H:]MM:SS
|
| Parameters
| ----------
| t : int
| Number of seconds.
|
| Returns
| -------
| out : str
| [H:]MM:SS
|
| format_meter(n, total, elapsed, ncols=None, prefix='', ascii=False, unit='it', unit_scale=False, rate=None, bar_format=None, postfix=None, unit_divisor=1000, **extra_kwargs)
| Return a string-based progress bar given some parameters
|
| Parameters
| ----------
| n : int
| Number of finished iterations.
| total : int
| The expected total number of iterations. If meaningless (), only
| basic progress statistics are displayed (no ETA).
| elapsed : float
| Number of seconds passed since start.
| ncols : int, optional
| The width of the entire output message. If specified,
| dynamically resizes the progress meter to stay within this bound
| [default: None]. The fallback meter width is 10 for the progress
| bar + no limit for the iterations counter and statistics. If 0,
| will not print any meter (only stats).
| prefix : str, optional
| Prefix message (included in total width) [default: ''].
| Use as {desc} in bar_format string.
| ascii : bool, optional
| If not set, use unicode (smooth blocks) to fill the meter
| [default: False]. The fallback is to use ASCII characters
| (1-9 #).
| unit : str, optional
| The iteration unit [default: 'it'].
| unit_scale : bool or int or float, optional
| If 1 or True, the number of iterations will be printed with an
| appropriate SI metric prefix (k = 10^3, M = 10^6, etc.)
| [default: False]. If any other non-zero number, will scale
| `total` and `n`.
| rate : float, optional
| Manual override for iteration rate.
| If [default: None], uses n/elapsed.
| bar_format : str, optional
| Specify a custom bar string formatting. May impact performance.
| [default: '{l_bar}{bar}{r_bar}'], where
| l_bar='{desc}: {percentage:3.0f}%|' and
| r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
| '{rate_fmt}{postfix}]'
| Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
| percentage, rate, rate_fmt, rate_noinv, rate_noinv_fmt,
| rate_inv, rate_inv_fmt, elapsed, remaining, desc, postfix.
| Note that a trailing ": " is automatically removed after {desc}
| if the latter is empty.
| postfix : *, optional
| Similar to `prefix`, but placed at the end
| (e.g. for additional stats).
| Note: postfix is usually a string (not a dict) for this method,
| and will if possible be set to postfix = ', ' + postfix.
| However other types are supported (#382).
| unit_divisor : float, optional
| [default: 1000], ignored unless `unit_scale` is True.
|
| Returns
| -------
| out : Formatted meter and stats, ready to display.
|
| format_num(n)
| Intelligent scientific notation (.3g).
|
| Parameters
| ----------
| n : int or float or Numeric
| A Number.
|
| Returns
| -------
| out : str
| Formatted number.
|
| format_sizeof(num, suffix='', divisor=1000)
| Formats a number (greater than unity) with SI Order of Magnitude
| prefixes.
|
| Parameters
| ----------
| num : float
| Number ( >= 1) to format.
| suffix : str, optional
| Post-postfix [default: ''].
| divisor : float, optionl
| Divisor between prefixes [default: 1000].
|
| Returns
| -------
| out : str
| Number with Order of Magnitude SI unit postfix.
|
| status_printer(file)
| Manage the printing and in-place updating of a line of characters.
| Note that if the string is longer than a line, then in-place
| updating may not work (it will print a new line at each refresh).
|
|

| Data descriptors inherited from tqdm._tqdm.tqdm:
|
| format_dict
| Public API for read-only member access
|
|

| Data and other attributes inherited from tqdm._tqdm.tqdm:
|
| monitor = None
|
| monitor_interval = 10
|
|

| Methods inherited from tqdm._utils.Comparable:
|
| __eq__(self, other)
| Return self==value.
|
| __ge__(self, other)
| Return self>=value.
|
| __gt__(self, other)
| Return self>value.
|
| __le__(self, other)
| Return self<=value.
|
| __lt__(self, other)
| Return self |
| __ne__(self, other)
| Return self!=value.
|
|

| Data descriptors inherited from tqdm._utils.Comparable:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined)

FUNCTIONS
main(fp=, argv=None)
Parameters (internal use only)
---------
fp : file-like object for tqdm
argv : list (default: sys.argv[1:])

tgrange(*args, **kwargs)
A shortcut for tqdm_gui(xrange(*args), **kwargs).
On Python3+ range is used instead of xrange.

tnrange(*args, **kwargs)
A shortcut for tqdm_notebook(xrange(*args), **kwargs).
On Python3+ range is used instead of xrange.

tqdm_notebook(*args, **kwargs)
See tqdm._tqdm_notebook.tqdm_notebook for full documentation

tqdm_pandas(tclass, *targs, **tkwargs)
Registers the given `tqdm` instance with
`pandas.core.groupby.DataFrameGroupBy.progress_apply`.
It will even close() the `tqdm` instance upon completion.

Parameters
----------
tclass : tqdm class you want to use (eg, tqdm, tqdm_notebook, etc)
targs and tkwargs : arguments for the tqdm instance

Examples
--------
>>> import pandas as pd
>>> import numpy as np
>>> from tqdm import tqdm, tqdm_pandas
>>>
>>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
>>> tqdm_pandas(tqdm, leave=True) # can use tqdm_gui, optional kwargs, etc
>>> # Now you can use `progress_apply` instead of `apply`
>>> df.groupby(0).progress_apply(lambda x: x**2)

References
----------
https://stackoverflow.com/questions/18603270/
progress-indicator-during-pandas-operations-python

trange(*args, **kwargs)
A shortcut for tqdm(xrange(*args), **kwargs).
On Python3+ range is used instead of xrange.

DATA
__all__ = ['tqdm', 'tqdm_gui', 'trange', 'tgrange', 'tqdm_pandas', 'tq...

VERSION
4.30.0

FILE
c:\users\matthijs\appdata\local\programs\python\python37\lib\site-packages\tqdm\__init__.py


No Python documentation found for 'tqdm_gui'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'tqdm_loop'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'unicode_literals'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'update_progress'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'web'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.

No Python documentation found for 'web_open'.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.



package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Download files using requests and save them to a target path
Usage example::
import hashlib
# progressbar is provided by progressbar2 on PYPI.
from progressbar import DataTransferBar
from requests_download import download, HashTracker, ProgressTracker
hasher = HashTracker(hashlib.sha256())
progress = ProgressTracker(DataTransferBar())
download('https://github.com/takluyver/requests_download/archive/master.zip',
'requests_download.zip', trackers=(hasher, progress))
assert hasher.hashobj.hexdigest() == '...'

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Download a file using requests.
This is like urllib.request.urlretrieve, but:
- requests validates SSL certificates by default
- you can pass tracker objects to e.g. display a progress bar or calculate
a file hash.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:

Return a string representing the user agent.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:

A file based cache which is safe to use even when the target directory may
not be accessible or writable.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Gets the content of a file; it may be a filename, file: URL, or
http: URL. Returns (location, content). Content is unicode.

:param url: File path or url.
:param comes_from: Origin description of requirements.
:param session: Instance of pip.download.PipSession.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Returns true if the name looks like a URL
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:

Convert a file: URL to a path.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:

Convert a path to a file: URL. The path will be made absolute and have
quoted path parts.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Return True if `name` is a considered as an archive file.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Return whether a file:// Link points to a directory.

``link`` must not have any other scheme but file://. Call is_file_url()
first.


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Unpack link into location.

If download_dir is provided and link points to a file, make a copy
of the link file inside download_dir.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Copy distribution files in `link_path` to `location`.

Invoked when user requests to install a local directory. E.g.:

pip install .
pip install ~/dev/git-repos/python-prompt-toolkit


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Provide a `xmlrpclib.Transport` implementation via a `PipSession`
object.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Unpack link.
If link is a VCS link:
if only_download, export into download_dir and ignore location
else unpack into location
for other types of link:
- unpack into location
- if download_dir, copy the file into download_dir
- if only_download, mark location for deletion

:param hashes: A Hashes object, one of whose embedded hashes must match,
or HashMismatch will be raised. If the Hashes is empty, no matches are
required, and unhashable types of requirements (like VCS ones, which
would ordinarily raise HashUnsupported) are allowed.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Download link url into temp_dir using provided session
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\download.py, function: unkown:
Check download_dir for previously downloaded file with correct hash
If a correct file is found return its path else None



package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\os_sys.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\os_sys.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\os_sys.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)




package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\upload.py, function: unkown:
Lazy function (generator) to read a file piece by piece.
Default chunk size: 1k.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\wifi.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\wifi.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)



package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\__init__.py, function: unkown:
a app to extract .zip, .tar.gz and .tar zip files.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\__init__.py, function: unkown:

Decorate an iterable object, returning an iterator which acts exactly
like the original iterable, but prints a dynamically updating
progressbar every time a value is requested.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\__init__.py, function: unkown:

Decorate an iterable object, returning an iterator which acts exactly
like the original iterable, but prints a dynamically updating
progressbar every time a value is requested.


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\download.py, function: unkown:
Download files using requests and save them to a target path
Usage example::
import hashlib
# progressbar is provided by progressbar2 on PYPI.
from progressbar import DataTransferBar
from requests_download import download, HashTracker, ProgressTracker
hasher = HashTracker(hashlib.sha256())
progress = ProgressTracker(DataTransferBar())
download('https://github.com/takluyver/requests_download/archive/master.zip',
'requests_download.zip', trackers=(hasher, progress))
assert hasher.hashobj.hexdigest() == '...'

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\download.py, function: unkown:
Download a file using requests.
This is like urllib.request.urlretrieve, but:
- requests validates SSL certificates by default
- you can pass tracker objects to e.g. display a progress bar or calculate
a file hash.


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\modules.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\modules.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\modules.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\modules.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\modules.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\modules.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\modules.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\modules.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\os_sys.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\os_sys.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\os_sys.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)



package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\wifi.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\wifi.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\__init__.py, function: unkown:

global stop, kill
stop = False
#add arguments

import argparse
parser = argparse.ArgumentParser(prog='os_sys-config', description='from here you can config os_sys')
parser.add_argument('-c', '--command', nargs='?', help='help for -c or --command:\n\
welkom at the os_sys console/setup from here out you can config os_sys.\n\
this are the commands to config os_sys:\n\
download(download the os_sys .tar and .wheel files)\n\
uninstall(remove os_sys from your pc)\n\
upgrade(upgrade os_sys to the newest version)\n\
uninstall = remove os_sys form your pc.\n\
install-version = install a version of os_sys that you choise.\n\
config-os_sys-settings = config os_sys.
')
args = parser.parse_args()
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\__init__.py, function: unkown:
welkom at the os_sys console/setup from here out you can config os_sys.\n
this are the commands to config os_sys:\n
download = download the newest os_sys package.\n
upgrade = upgrade os_sys to the newest version.\n
uninstall = remove os_sys form your pc.\n
install-version = install a version of os_sys that you choise.\n
config-os_sys-settings = config os_sys.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\__init__.py, function: unkown:
Run a ManagementUtility.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\programs\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\commands\programs\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.





package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Download files using requests and save them to a target path
Usage example::
import hashlib
# progressbar is provided by progressbar2 on PYPI.
from progressbar import DataTransferBar
from requests_download import download, HashTracker, ProgressTracker
hasher = HashTracker(hashlib.sha256())
progress = ProgressTracker(DataTransferBar())
download('https://github.com/takluyver/requests_download/archive/master.zip',
'requests_download.zip', trackers=(hasher, progress))
assert hasher.hashobj.hexdigest() == '...'

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Download a file using requests.
This is like urllib.request.urlretrieve, but:
- requests validates SSL certificates by default
- you can pass tracker objects to e.g. display a progress bar or calculate
a file hash.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:

Return a string representing the user agent.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:

A file based cache which is safe to use even when the target directory may
not be accessible or writable.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Gets the content of a file; it may be a filename, file: URL, or
http: URL. Returns (location, content). Content is unicode.

:param url: File path or url.
:param comes_from: Origin description of requirements.
:param session: Instance of pip.download.PipSession.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Returns true if the name looks like a URL
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:

Convert a file: URL to a path.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:

Convert a path to a file: URL. The path will be made absolute and have
quoted path parts.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Return True if `name` is a considered as an archive file.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Return whether a file:// Link points to a directory.

``link`` must not have any other scheme but file://. Call is_file_url()
first.


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Unpack link into location.

If download_dir is provided and link points to a file, make a copy
of the link file inside download_dir.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Copy distribution files in `link_path` to `location`.

Invoked when user requests to install a local directory. E.g.:

pip install .
pip install ~/dev/git-repos/python-prompt-toolkit


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Provide a `xmlrpclib.Transport` implementation via a `PipSession`
object.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Unpack link.
If link is a VCS link:
if only_download, export into download_dir and ignore location
else unpack into location
for other types of link:
- unpack into location
- if download_dir, copy the file into download_dir
- if only_download, mark location for deletion

:param hashes: A Hashes object, one of whose embedded hashes must match,
or HashMismatch will be raised. If the Hashes is empty, no matches are
required, and unhashable types of requirements (like VCS ones, which
would ordinarily raise HashUnsupported) are allowed.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Download link url into temp_dir using provided session
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\download.py, function: unkown:
Check download_dir for previously downloaded file with correct hash
If a correct file is found return its path else None



package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\os_sys.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\os_sys.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\os_sys.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)




package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\upload.py, function: unkown:
Lazy function (generator) to read a file piece by piece.
Default chunk size: 1k.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\wifi.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\wifi.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)



package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\__init__.py, function: unkown:
a app to extract .zip, .tar.gz and .tar zip files.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\__init__.py, function: unkown:

Decorate an iterable object, returning an iterator which acts exactly
like the original iterable, but prints a dynamically updating
progressbar every time a value is requested.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\__init__.py, function: unkown:

Decorate an iterable object, returning an iterator which acts exactly
like the original iterable, but prints a dynamically updating
progressbar every time a value is requested.


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\download.py, function: unkown:
Download files using requests and save them to a target path
Usage example::
import hashlib
# progressbar is provided by progressbar2 on PYPI.
from progressbar import DataTransferBar
from requests_download import download, HashTracker, ProgressTracker
hasher = HashTracker(hashlib.sha256())
progress = ProgressTracker(DataTransferBar())
download('https://github.com/takluyver/requests_download/archive/master.zip',
'requests_download.zip', trackers=(hasher, progress))
assert hasher.hashobj.hexdigest() == '...'

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\download.py, function: unkown:
Download a file using requests.
This is like urllib.request.urlretrieve, but:
- requests validates SSL certificates by default
- you can pass tracker objects to e.g. display a progress bar or calculate
a file hash.


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\modules.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\modules.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\modules.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\modules.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\modules.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\modules.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\modules.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\modules.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\os_sys.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\os_sys.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\os_sys.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)



package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\wifi.py, function: unkown:

Returns True if host (str) responds to a ping request.
Remember that a host may not respond to a ping (ICMP) request even if the host name is valid.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\wifi.py, function: unkown:

Host: 8.8.8.8 (google-public-dns-a.google.com)
OpenPort: 53/tcp
Service: domain (DNS/TCP)


package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\__init__.py, function: unkown:

global stop, kill
stop = False
#add arguments

import argparse
parser = argparse.ArgumentParser(prog='os_sys-config', description='from here you can config os_sys')
parser.add_argument('-c', '--command', nargs='?', help='help for -c or --command:\n\
welkom at the os_sys console/setup from here out you can config os_sys.\n\
this are the commands to config os_sys:\n\
download(download the os_sys .tar and .wheel files)\n\
uninstall(remove os_sys from your pc)\n\
upgrade(upgrade os_sys to the newest version)\n\
uninstall = remove os_sys form your pc.\n\
install-version = install a version of os_sys that you choise.\n\
config-os_sys-settings = config os_sys.
')
args = parser.parse_args()
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\__init__.py, function: unkown:
welkom at the os_sys console/setup from here out you can config os_sys.\n
this are the commands to config os_sys:\n
download = download the newest os_sys package.\n
upgrade = upgrade os_sys to the newest version.\n
uninstall = remove os_sys form your pc.\n
install-version = install a version of os_sys that you choise.\n
config-os_sys-settings = config os_sys.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\__init__.py, function: unkown:
Run a ManagementUtility.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\programs\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\commands\programs\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.





package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:
Generate Python documentation in HTML or text for interactive use.

At the Python interactive prompt, calling help(thing) on a Python object
documents the object, and calling help() starts up an interactive
help session.

Or, at the shell command line outside of Python:

Run "pydoc " to show documentation on something. may be
the name of a function, module, package, or a dotted reference to a
class or function within a module or module in a package. If the
argument contains a path segment delimiter (e.g. slash on Unix,
backslash on Windows) it is treated as the path to a Python source file.

Run "pydoc -k " to search for a keyword in the synopsis lines
of all available modules.

Run "pydoc -n " to start an HTTP server with the given
hostname (default: localhost) on the local machine.

Run "pydoc -p " to start an HTTP server on the given port on the
local machine. Port number 0 can be used to get an arbitrary unused port.

Run "pydoc -b" to start an HTTP server on an arbitrary unused port and
open a Web browser to interactively browse documentation. Combine with
the -n and -p options to control the hostname and port used.

Run "pydoc -w " to write out the HTML documentation for a module
to a file named ".html".

Module docs for core modules are assumed to be in

https://docs.python.org/X.Y/library/

This can be overridden by setting the PYTHONDOCS environment variable
to a different URL or to a local directory containing the Library
Reference Manual pages.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Guido van Rossum, for an excellent programming language.
Tommy Burnette, the original creator of manpy.
Paul Prescod, for all his work on onlinehelp.
Richard Chamberlain, for the first implementation of textdoc.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Convert sys.path into a list of absolute, existing, unique paths.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Get the doc string or comments for an object.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Split a doc string into a synopsis line (if any) and the rest.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Get a class name and qualify it with a module name if necessary.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Check if an object is of a type that probably means it's data.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Do a series of global replacements on a string.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Omit part of a string if needed to make it fit in a maximum length.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Remove the hexadecimal id from a Python object representation.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

Returns True if fn is a bound method, regardless of whether
fn was implemented in Python or in C.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Split sequence s via predicate, and return pair ([true], [false]).

The return value is a 2-tuple of lists,
([x for x in s if predicate(x)],
[x for x in s if not predicate(x)])

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Decide whether to show documentation on a variable.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Wrap inspect.classify_class_attrs, with fixup for data descriptors.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Guess whether a path refers to a package directory.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
': line = line[1:]
if line[:3] == '
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
')[0].strip()
else: result = None
return result

def synopsis(filename, cache={}):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

mtime = os.stat(filename).st_mtime
lastupdate, result = cache.get(filename, (None, None))
if lastupdate is None or lastupdate < mtime:
# Look for binary suffixes first, falling back to source.
if filename.endswith(tuple(importlib.machinery.BYTECODE_SUFFIXES)):
loader_cls = importlib.machinery.SourcelessFileLoader
elif filename.endswith(tuple(importlib.machinery.EXTENSION_SUFFIXES)):
loader_cls = importlib.machinery.ExtensionFileLoader
else:
loader_cls = None
# Now handle the choice.
if loader_cls is None:
# Must be a source file.
try:
file = tokenize.open(filename)
except OSError:
# module can't be opened, so skip it
return None
# text modules can be directly examined
with file:
result = source_synopsis(file)
else:
# Must be a binary module, which has to be imported.
loader = loader_cls('__temp__', filename)
# XXX We probably don't need to pass in the loader here.
spec = importlib.util.spec_from_file_location('__temp__', filename,
loader=loader)
try:
module = importlib._bootstrap._load(spec)
except:
return None
del sys.modules['__temp__']
result = module.__doc__.splitlines()[0] if module.__doc__ else None
# Cache the result.
cache[filename] = (mtime, result)
return result

class ErrorDuringImport(Exception):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

def __init__(self, filename, exc_info):
self.filename = filename
self.exc, self.value, self.tb = exc_info

def __str__(self):
exc = self.exc.__name__
return 'problem in %s - %s: %s' % (self.filename, exc, self.value)

def importfile(path):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

magic = importlib.util.MAGIC_NUMBER
with open(path, 'rb') as file:
is_bytecode = magic == file.read(len(magic))
filename = os.path.basename(path)
name, ext = os.path.splitext(filename)
if is_bytecode:
loader = importlib._bootstrap_external.SourcelessFileLoader(name, path)
else:
loader = importlib._bootstrap_external.SourceFileLoader(name, path)
# XXX We probably don't need to pass in the loader here.
spec = importlib.util.spec_from_file_location(name, path, loader=loader)
try:
return importlib._bootstrap._load(spec)
except:
raise ErrorDuringImport(path, sys.exc_info())

def safeimport(path, forceload=0, cache={}):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

try:
# If forceload is 1 and the module has been previously loaded from
# disk, we always have to reload the module. Checking the file's
# mtime isn't good enough (e.g. the module could contain a class
# that inherits from another module that has changed).
if forceload and path in sys.modules:
if path not in sys.builtin_module_names:
# Remove the module from sys.modules and re-import to try
# and avoid problems with partially loaded modules.
# Also remove any submodules because they won't appear
# in the newly loaded module's namespace if they're already
# in sys.modules.
subs = [m for m in sys.modules if m.startswith(path + '.')]
for key in [path] + subs:
# Prevent garbage collection.
cache[key] = sys.modules[key]
del sys.modules[key]
module = __import__(path)
except:
# Did the error occur before or after the module was found?
(exc, value, tb) = info = sys.exc_info()
if path in sys.modules:
# An error occurred while executing the imported module.
raise ErrorDuringImport(sys.modules[path].__file__, info)
elif exc is SyntaxError:
# A SyntaxError occurred before we could execute the module.
raise ErrorDuringImport(value.filename, info)
elif issubclass(exc, ImportError) and value.name == path:
# No such module in the path.
return None
else:
# Some other error occurred during the importing process.
raise ErrorDuringImport(path, sys.exc_info())
for part in path.split('.')[1:]:
try: module = getattr(module, part)
except AttributeError: return None
return module

# ---------------------------------------------------- formatter base class

class Doc:

PYTHONDOCS = os.environ.get("PYTHONDOCS",
"https://docs.python.org/%d.%d/library"
% sys.version_info[:2])

def document(self, object, name=None, *args):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

args = (object, name) + args
# 'try' clause is to attempt to handle the possibility that inspect
# identifies something in a way that pydoc itself has issues handling;
# think 'super' and how it is a descriptor (which raises the exception
# by lacking a __name__ attribute) and an instance.
if inspect.isgetsetdescriptor(object): return self.docdata(*args)
if inspect.ismemberdescriptor(object): return self.docdata(*args)
try:
if inspect.ismodule(object): return self.docmodule(*args)
if inspect.isclass(object): return self.docclass(*args)
if inspect.isroutine(object): return self.docroutine(*args)
except AttributeError:
pass
if isinstance(object, property): return self.docproperty(*args)
return self.docother(*args)

def fail(self, object, name=None, *args):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

message = "don't know how to document object%s of type %s" % (
name and ' ' + repr(name), type(object).__name__)
raise TypeError(message)

docmodule = docclass = docroutine = docother = docproperty = docdata = fail

def getdocloc(self, object,
basedir=os.path.join(sys.base_exec_prefix, "lib",
"python%d.%d" % sys.version_info[:2])):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:


try:
file = inspect.getabsfile(object)
except TypeError:
file = '(built-in)'

docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)

basedir = os.path.normcase(basedir)
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
'marshal', 'posix', 'signal', 'sys',
'_thread', 'zipimport') or
(file.startswith(basedir) and
not file.startswith(os.path.join(basedir, 'site-packages')))) and
object.__name__ not in ('xml.etree', 'test.pydoc_mod')):
if docloc.startswith(("http://", "https://")):
docloc = "%s/%s" % (docloc.rstrip("/"), object.__name__.lower())
else:
docloc = os.path.join(docloc, object.__name__.lower() + ".html")
else:
docloc = None
return docloc

# -------------------------------------------- HTML documentation generator

class HTMLRepr(Repr):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

def __init__(self):
Repr.__init__(self)
self.maxlist = self.maxtuple = 20
self.maxdict = 10
self.maxstring = self.maxother = 100

def escape(self, text):
return replace(text, '&', '&', '<', '<', '>', '>')

def repr(self, object):
return Repr.repr(self, object)

def repr1(self, x, level):
if hasattr(type(x), '__name__'):
methodname = 'repr_' + '_'.join(type(x).__name__.split())
if hasattr(self, methodname):
return getattr(self, methodname)(x, level)
return self.escape(cram(stripid(repr(x)), self.maxother))

def repr_string(self, x, level):
test = cram(x, self.maxstring)
testrepr = repr(test)
if '\\' in test and '\\' not in replace(testrepr, r'\\', ''):
# Backslashes are only literal in the string and are never
# needed to make any special characters, so show a raw string.
return 'r' + testrepr[0] + self.escape(test) + testrepr[0]
return re.sub(r'((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)',
r'\1',
self.escape(testrepr))

repr_str = repr_string

def repr_instance(self, x, level):
try:
return self.escape(cram(stripid(repr(x)), self.maxstring))
except:
return self.escape('<%s instance>' % x.__class__.__name__)

repr_unicode = repr_string

class HTMLDoc(Doc):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __doc__:


# ------------------------------------------- HTML formatting utilities

_repr_instance = HTMLRepr()
repr = _repr_instance.repr
escape = _repr_instance.escape

def page(self, title, contents):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return '''\

Python: %s


%s
''' % (title, contents)

def heading(self, title, fgcol, bgcol, extras=''):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return '''


>
 

 
%s
>%s

''' % (bgcol, fgcol, title, fgcol, extras or ' ')

def section(self, title, fgcol, bgcol, contents, width=6,
prelude='', marginalia=None, gap=' '):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

if marginalia is None:
marginalia = '' + ' ' * width + ''
result = '''





''' % (bgcol, fgcol, title)
if prelude:
result = result + '''


''' % (bgcol, marginalia, prelude, gap)
else:
result = result + '''
''' % (bgcol, marginalia, gap)

return result + '\n
 

%s
%s %s
%s
%s%s %s
' % contents

def bigsection(self, title, *args):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

title = '%s' % title
return self.section(title, *args)

def preformat(self, text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

text = self.escape(text.expandtabs())
return replace(text, '\n\n', '\n \n', '\n\n', '\n \n',
' ', ' ', '\n', '
\n')

def multicolumn(self, list, format, cols=4):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

result = ''
rows = (len(list)+cols-1)//cols
for col in range(cols):
result = result + '' % (100//cols)
for i in range(rows*col, rows*col+rows):
if i < len(list):
result = result + format(list[i]) + '
\n'
result = result + ''
return '%s
' % result

def grey(self, text): return '%s' % text

def namelink(self, name, *dicts):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

for dict in dicts:
if name in dict:
return '%s' % (dict[name], name)
return name

def classlink(self, object, modname):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

name, module = object.__name__, sys.modules.get(object.__module__)
if hasattr(module, name) and getattr(module, name) is object:
return '%s' % (
module.__name__, name, classname(object, modname))
return classname(object, modname)

def modulelink(self, object):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return '%s' % (object.__name__, object.__name__)

def modpkglink(self, modpkginfo):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

name, path, ispackage, shadowed = modpkginfo
if shadowed:
return self.grey(name)
if path:
url = '%s.%s.html' % (path, name)
else:
url = '%s.html' % name
if ispackage:
text = '%s (package)' % name
else:
text = name
return '%s' % (url, text)

def filelink(self, url, path):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return '%s' % (url, path)

def markup(self, text, escape=None, funcs={}, classes={}, methods={}):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __doc__:

escape = escape or self.escape
results = []
here = 0
pattern = re.compile(r'\b((http|ftp)://\S+[\w/]|'
r'RFC[- ]?(\d+)|'
r'PEP[- ]?(\d+)|'
r'(self\.)?(\w+))')
while True:
match = pattern.search(text, here)
if not match: break
start, end = match.span()
results.append(escape(text[here:start]))

all, scheme, rfc, pep, selfdot, name = match.groups()
if scheme:
url = escape(all).replace('"', '"')
results.append('%s' % (url, url))
elif rfc:
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
results.append('%s' % (url, escape(all)))
elif pep:
url = 'http://www.python.org/dev/peps/pep-%04d/' % int(pep)
results.append('%s' % (url, escape(all)))
elif selfdot:
# Create a link for methods like 'self.method(...)'
# and use for attributes like 'self.attr'
if text[end:end+1] == '(':
results.append('self.' + self.namelink(name, methods))
else:
results.append('self.%s' % name)
elif text[end:end+1] == '(':
results.append(self.namelink(name, methods, funcs, classes))
else:
results.append(self.namelink(name, classes))
here = end
results.append(escape(text[here:]))
return ''.join(results)

# ---------------------------------------------- type-specific routines

def formattree(self, tree, modname, parent=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

result = ''
for entry in tree:
if type(entry) is type(()):
c, bases = entry
result = result + '
'
result = result + self.classlink(c, modname)
if bases and bases != (parent,):
parents = []
for base in bases:
parents.append(self.classlink(base, modname))
result = result + '(' + ', '.join(parents) + ')'
result = result + '\n
'
elif type(entry) is type([]):
result = result + '
\n%s
\n' % self.formattree(
entry, modname, c)
return '
\n%s
\n' % result

def docmodule(self, object, name=None, mod=None, *ignored):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

name = object.__name__ # ignore the passed-in name
try:
all = object.__all__
except AttributeError:
all = None
parts = name.split('.')
links = []
for i in range(len(parts)-1):
links.append(
'%s' %
('.'.join(parts[:i+1]), parts[i]))
linkedname = '.'.join(links + parts[-1:])
head = '%s' % linkedname
try:
path = inspect.getabsfile(object)
url = urllib.parse.quote(path)
filelink = self.filelink(url, path)
except TypeError:
filelink = '(built-in)'
info = []
if hasattr(object, '__version__'):
version = str(object.__version__)
if version[:11] == '$' + 'Revision: ' and version[-1:] == '$':
version = version[11:-1].strip()
info.append('version %s' % self.escape(version))
if hasattr(object, '__date__'):
info.append(self.escape(str(object.__date__)))
if info:
head = head + ' (%s)' % ', '.join(info)
docloc = self.getdocloc(object)
if docloc is not None:
docloc = '
Module Reference' % locals()
else:
docloc = ''
result = self.heading(
head, '#ffffff', '#7799ee',
'index
' + filelink + docloc)

modules = inspect.getmembers(object, inspect.ismodule)

classes, cdict = [], {}
for key, value in inspect.getmembers(object, inspect.isclass):
# if __all__ exists, believe it. Otherwise use old heuristic.
if (all is not None or
(inspect.getmodule(value) or object) is object):
if visiblename(key, all, object):
classes.append((key, value))
cdict[key] = cdict[value] = '#' + key
for key, value in classes:
for base in value.__bases__:
key, modname = base.__name__, base.__module__
module = sys.modules.get(modname)
if modname != name and module and hasattr(module, key):
if getattr(module, key) is base:
if not key in cdict:
cdict[key] = cdict[base] = modname + '.html#' + key
funcs, fdict = [], {}
for key, value in inspect.getmembers(object, inspect.isroutine):
# if __all__ exists, believe it. Otherwise use old heuristic.
if (all is not None or
inspect.isbuiltin(value) or inspect.getmodule(value) is object):
if visiblename(key, all, object):
funcs.append((key, value))
fdict[key] = '#-' + key
if inspect.isfunction(value): fdict[value] = fdict[key]
data = []
for key, value in inspect.getmembers(object, isdata):
if visiblename(key, all, object):
data.append((key, value))

doc = self.markup(getdoc(object), self.preformat, fdict, cdict)
doc = doc and '%s' % doc
result = result + '

%s

\n' % doc

if hasattr(object, '__path__'):
modpkgs = []
for importer, modname, ispkg in pkgutil.iter_modules(object.__path__):
modpkgs.append((modname, name, ispkg, 0))
modpkgs.sort()
contents = self.multicolumn(modpkgs, self.modpkglink)
result = result + self.bigsection(
'Package Contents', '#ffffff', '#aa55cc', contents)
elif modules:
contents = self.multicolumn(
modules, lambda t: self.modulelink(t[1]))
result = result + self.bigsection(
'Modules', '#ffffff', '#aa55cc', contents)

if classes:
classlist = [value for (key, value) in classes]
contents = [
self.formattree(inspect.getclasstree(classlist, 1), name)]
for key, value in classes:
contents.append(self.document(value, key, name, fdict, cdict))
result = result + self.bigsection(
'Classes', '#ffffff', '#ee77aa', ' '.join(contents))
if funcs:
contents = []
for key, value in funcs:
contents.append(self.document(value, key, name, fdict, cdict))
result = result + self.bigsection(
'Functions', '#ffffff', '#eeaa77', ' '.join(contents))
if data:
contents = []
for key, value in data:
contents.append(self.document(value, key))
result = result + self.bigsection(
'Data', '#ffffff', '#55aa55', '
\n'.join(contents))
if hasattr(object, '__author__'):
contents = self.markup(str(object.__author__), self.preformat)
result = result + self.bigsection(
'Author', '#ffffff', '#7799ee', contents)
if hasattr(object, '__credits__'):
contents = self.markup(str(object.__credits__), self.preformat)
result = result + self.bigsection(
'Credits', '#ffffff', '#7799ee', contents)

return result

def docclass(self, object, name=None, mod=None, funcs={}, classes={},
*ignored):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

realname = object.__name__
name = name or realname
bases = object.__bases__

contents = []
push = contents.append

# Cute little class to pump out a horizontal rule between sections.
class HorizontalRule:
def __init__(self):
self.needone = 0
def maybe(self):
if self.needone:
push('
\n')
self.needone = 1
hr = HorizontalRule()

# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
hr.maybe()
push('
Method resolution order:
\n')
for base in mro:
push('
%s
\n' % self.classlink(base,
object.__module__))
push('
\n')

def spill(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
try:
value = getattr(object, name)
except Exception:
# Some descriptors may meet a failure in their __get__.
# (bug #1785)
push(self._docdescriptor(name, value, mod))
else:
push(self.document(value, name, mod,
funcs, classes, mdict, object))
push('\n')
return attrs

def spilldescriptors(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
push(self._docdescriptor(name, value, mod))
return attrs

def spilldata(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
base = self.docother(getattr(object, name), name, mod)
if callable(value) or inspect.isdatadescriptor(value):
doc = getattr(value, "__doc__", None)
else:
doc = None
if doc is None:
push('
%s
\n' % base)
else:
doc = self.markup(getdoc(value), self.preformat,
funcs, classes, mdict)
doc = '
%s' % doc
push('
%s%s
\n' % (base, doc))
push('\n')
return attrs

attrs = [(name, kind, cls, value)
for name, kind, cls, value in classify_class_attrs(object)
if visiblename(name, obj=object)]

mdict = {}
for key, kind, homecls, value in attrs:
mdict[key] = anchor = '#' + name + '-' + key
try:
value = getattr(object, name)
except Exception:
# Some descriptors may meet a failure in their __get__.
# (bug #1785)
pass
try:
# The value may not be hashable (e.g., a data attr with
# a dict or list value).
mdict[value] = anchor
except TypeError:
pass

while attrs:
if mro:
thisclass = mro.popleft()
else:
thisclass = attrs[0][2]
attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)

if thisclass is builtins.object:
attrs = inherited
continue
elif thisclass is object:
tag = 'defined here'
else:
tag = 'inherited from %s' % self.classlink(thisclass,
object.__module__)
tag += ':
\n'

sort_attributes(attrs, object)

# Pump out the attrs, segregated by kind.
attrs = spill('Methods %s' % tag, attrs,
lambda t: t[1] == 'method')
attrs = spill('Class methods %s' % tag, attrs,
lambda t: t[1] == 'class method')
attrs = spill('Static methods %s' % tag, attrs,
lambda t: t[1] == 'static method')
attrs = spilldescriptors('Data descriptors %s' % tag, attrs,
lambda t: t[1] == 'data descriptor')
attrs = spilldata('Data and other attributes %s' % tag, attrs,
lambda t: t[1] == 'data')
assert attrs == []
attrs = inherited

contents = ''.join(contents)

if name == realname:
title = 'class %s' % (
name, realname)
else:
title = '%s = class %s' % (
name, name, realname)
if bases:
parents = []
for base in bases:
parents.append(self.classlink(base, object.__module__))
title = title + '(%s)' % ', '.join(parents)

decl = ''
try:
signature = inspect.signature(object)
except (ValueError, TypeError):
signature = None
if signature:
argspec = str(signature)
if argspec and argspec != '()':
decl = name + self.escape(argspec) + '\n\n'

doc = getdoc(object)
if decl:
doc = decl + (doc or '')
doc = self.markup(doc, self.preformat, funcs, classes, mdict)
doc = doc and '%s
 
' % doc

return self.section(title, '#000000', '#ffc8d8', contents, 3, doc)

def formatvalue(self, object):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return self.grey('=' + self.repr(object))

def docroutine(self, object, name=None, mod=None,
funcs={}, classes={}, methods={}, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

realname = object.__name__
name = name or realname
anchor = (cl and cl.__name__ or '') + '-' + name
note = ''
skipdocs = 0
if _is_bound_method(object):
imclass = object.__self__.__class__
if cl:
if imclass is not cl:
note = ' from ' + self.classlink(imclass, mod)
else:
if object.__self__ is not None:
note = ' method of %s instance' % self.classlink(
object.__self__.__class__, mod)
else:
note = ' unbound %s method' % self.classlink(imclass,mod)

if name == realname:
title = '%s' % (anchor, realname)
else:
if (cl and realname in cl.__dict__ and
cl.__dict__[realname] is object):
reallink = '%s' % (
cl.__name__ + '-' + realname, realname)
skipdocs = 1
else:
reallink = realname
title = '%s = %s' % (
anchor, name, reallink)
argspec = None
if inspect.isroutine(object):
try:
signature = inspect.signature(object)
except (ValueError, TypeError):
signature = None
if signature:
argspec = str(signature)
if realname == '':
title = '%s lambda ' % name
# XXX lambda's won't usually have func_annotations['return']
# since the syntax doesn't support but it is possible.
# So removing parentheses isn't truly safe.
argspec = argspec[1:-1] # remove parentheses
if not argspec:
argspec = '(...)'

decl = title + self.escape(argspec) + (note and self.grey(
'%s' % note))

if skipdocs:
return '
%s
\n' % decl
else:
doc = self.markup(
getdoc(object), self.preformat, funcs, classes, methods)
doc = doc and '
%s
' % doc
return '
%s
%s
\n' % (decl, doc)

def _docdescriptor(self, name, value, mod):
results = []
push = results.append

if name:
push('
%s
\n' % name)
if value.__doc__ is not None:
doc = self.markup(getdoc(value), self.preformat)
push('
%s
\n' % doc)
push('
\n')

return ''.join(results)

def docproperty(self, object, name=None, mod=None, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return self._docdescriptor(name, object, mod)

def docother(self, object, name=None, mod=None, *ignored):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

lhs = name and '%s = ' % name or ''
return lhs + self.repr(object)

def docdata(self, object, name=None, mod=None, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return self._docdescriptor(name, object, mod)

def index(self, dir, shadowed=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

modpkgs = []
if shadowed is None: shadowed = {}
for importer, name, ispkg in pkgutil.iter_modules([dir]):
if any((0xD800 <= ord(ch) <= 0xDFFF) for ch in name):
# ignore a module if its name contains a surrogate character
continue
modpkgs.append((name, '', ispkg, name in shadowed))
shadowed[name] = 1

modpkgs.sort()
contents = self.multicolumn(modpkgs, self.modpkglink)
return self.bigsection(dir, '#ffffff', '#ee77aa', contents)

# -------------------------------------------- text documentation generator

class TextRepr(Repr):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

def __init__(self):
Repr.__init__(self)
self.maxlist = self.maxtuple = 20
self.maxdict = 10
self.maxstring = self.maxother = 100

def repr1(self, x, level):
if hasattr(type(x), '__name__'):
methodname = 'repr_' + '_'.join(type(x).__name__.split())
if hasattr(self, methodname):
return getattr(self, methodname)(x, level)
return cram(stripid(repr(x)), self.maxother)

def repr_string(self, x, level):
test = cram(x, self.maxstring)
testrepr = repr(test)
if '\\' in test and '\\' not in replace(testrepr, r'\\', ''):
# Backslashes are only literal in the string and are never
# needed to make any special characters, so show a raw string.
return 'r' + testrepr[0] + test + testrepr[0]
return testrepr

repr_str = repr_string

def repr_instance(self, x, level):
try:
return cram(stripid(repr(x)), self.maxstring)
except:
return '<%s instance>' % x.__class__.__name__

class TextDoc(Doc):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __doc__:


# ------------------------------------------- text formatting utilities

_repr_instance = TextRepr()
repr = _repr_instance.repr

def bold(self, text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return ''.join(ch + '\b' + ch for ch in text)

def indent(self, text, prefix=' '):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

if not text: return ''
lines = [prefix + line for line in text.split('\n')]
if lines: lines[-1] = lines[-1].rstrip()
return '\n'.join(lines)

def section(self, title, contents):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

clean_contents = self.indent(contents).rstrip()
return self.bold(title) + '\n' + clean_contents + '\n\n'

# ---------------------------------------------- type-specific routines

def formattree(self, tree, modname, parent=None, prefix=''):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

result = ''
for entry in tree:
if type(entry) is type(()):
c, bases = entry
result = result + prefix + classname(c, modname)
if bases and bases != (parent,):
parents = (classname(c, modname) for c in bases)
result = result + '(%s)' % ', '.join(parents)
result = result + '\n'
elif type(entry) is type([]):
result = result + self.formattree(
entry, modname, c, prefix + ' ')
return result

def docmodule(self, object, name=None, mod=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

name = object.__name__ # ignore the passed-in name
synop, desc = splitdoc(getdoc(object))
result = self.section('NAME', name + (synop and ' - ' + synop))
all = getattr(object, '__all__', None)
docloc = self.getdocloc(object)
if docloc is not None:
result = result + self.section('MODULE REFERENCE', docloc +
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:
)

if desc:
result = result + self.section('DESCRIPTION', desc)

classes = []
for key, value in inspect.getmembers(object, inspect.isclass):
# if __all__ exists, believe it. Otherwise use old heuristic.
if (all is not None
or (inspect.getmodule(value) or object) is object):
if visiblename(key, all, object):
classes.append((key, value))
funcs = []
for key, value in inspect.getmembers(object, inspect.isroutine):
# if __all__ exists, believe it. Otherwise use old heuristic.
if (all is not None or
inspect.isbuiltin(value) or inspect.getmodule(value) is object):
if visiblename(key, all, object):
funcs.append((key, value))
data = []
for key, value in inspect.getmembers(object, isdata):
if visiblename(key, all, object):
data.append((key, value))

modpkgs = []
modpkgs_names = set()
if hasattr(object, '__path__'):
for importer, modname, ispkg in pkgutil.iter_modules(object.__path__):
modpkgs_names.add(modname)
if ispkg:
modpkgs.append(modname + ' (package)')
else:
modpkgs.append(modname)

modpkgs.sort()
result = result + self.section(
'PACKAGE CONTENTS', '\n'.join(modpkgs))

# Detect submodules as sometimes created by C extensions
submodules = []
for key, value in inspect.getmembers(object, inspect.ismodule):
if value.__name__.startswith(name + '.') and key not in modpkgs_names:
submodules.append(key)
if submodules:
submodules.sort()
result = result + self.section(
'SUBMODULES', '\n'.join(submodules))

if classes:
classlist = [value for key, value in classes]
contents = [self.formattree(
inspect.getclasstree(classlist, 1), name)]
for key, value in classes:
contents.append(self.document(value, key, name))
result = result + self.section('CLASSES', '\n'.join(contents))

if funcs:
contents = []
for key, value in funcs:
contents.append(self.document(value, key, name))
result = result + self.section('FUNCTIONS', '\n'.join(contents))

if data:
contents = []
for key, value in data:
contents.append(self.docother(value, key, name, maxlen=70))
result = result + self.section('DATA', '\n'.join(contents))

if hasattr(object, '__version__'):
version = str(object.__version__)
if version[:11] == '$' + 'Revision: ' and version[-1:] == '$':
version = version[11:-1].strip()
result = result + self.section('VERSION', version)
if hasattr(object, '__date__'):
result = result + self.section('DATE', str(object.__date__))
if hasattr(object, '__author__'):
result = result + self.section('AUTHOR', str(object.__author__))
if hasattr(object, '__credits__'):
result = result + self.section('CREDITS', str(object.__credits__))
try:
file = inspect.getabsfile(object)
except TypeError:
file = '(built-in)'
result = result + self.section('FILE', file)
return result

def docclass(self, object, name=None, mod=None, *ignored):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

realname = object.__name__
name = name or realname
bases = object.__bases__

def makename(c, m=object.__module__):
return classname(c, m)

if name == realname:
title = 'class ' + self.bold(realname)
else:
title = self.bold(name) + ' = class ' + realname
if bases:
parents = map(makename, bases)
title = title + '(%s)' % ', '.join(parents)

contents = []
push = contents.append

try:
signature = inspect.signature(object)
except (ValueError, TypeError):
signature = None
if signature:
argspec = str(signature)
if argspec and argspec != '()':
push(name + argspec + '\n')

doc = getdoc(object)
if doc:
push(doc + '\n')

# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
push("Method resolution order:")
for base in mro:
push(' ' + makename(base))
push('')

# Cute little class to pump out a horizontal rule between sections.
class HorizontalRule:
def __init__(self):
self.needone = 0
def maybe(self):
if self.needone:
push('-' * 70)
self.needone = 1
hr = HorizontalRule()

def spill(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
try:
value = getattr(object, name)
except Exception:
# Some descriptors may meet a failure in their __get__.
# (bug #1785)
push(self._docdescriptor(name, value, mod))
else:
push(self.document(value,
name, mod, object))
return attrs

def spilldescriptors(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
push(self._docdescriptor(name, value, mod))
return attrs

def spilldata(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
if callable(value) or inspect.isdatadescriptor(value):
doc = getdoc(value)
else:
doc = None
try:
obj = getattr(object, name)
except AttributeError:
obj = homecls.__dict__[name]
push(self.docother(obj, name, mod, maxlen=70, doc=doc) +
'\n')
return attrs

attrs = [(name, kind, cls, value)
for name, kind, cls, value in classify_class_attrs(object)
if visiblename(name, obj=object)]

while attrs:
if mro:
thisclass = mro.popleft()
else:
thisclass = attrs[0][2]
attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)

if thisclass is builtins.object:
attrs = inherited
continue
elif thisclass is object:
tag = "defined here"
else:
tag = "inherited from %s" % classname(thisclass,
object.__module__)

sort_attributes(attrs, object)

# Pump out the attrs, segregated by kind.
attrs = spill("Methods %s:\n" % tag, attrs,
lambda t: t[1] == 'method')
attrs = spill("Class methods %s:\n" % tag, attrs,
lambda t: t[1] == 'class method')
attrs = spill("Static methods %s:\n" % tag, attrs,
lambda t: t[1] == 'static method')
attrs = spilldescriptors("Data descriptors %s:\n" % tag, attrs,
lambda t: t[1] == 'data descriptor')
attrs = spilldata("Data and other attributes %s:\n" % tag, attrs,
lambda t: t[1] == 'data')

assert attrs == []
attrs = inherited

contents = '\n'.join(contents)
if not contents:
return title + '\n'
return title + '\n' + self.indent(contents.rstrip(), ' | ') + '\n'

def formatvalue(self, object):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return '=' + self.repr(object)

def docroutine(self, object, name=None, mod=None, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

realname = object.__name__
name = name or realname
note = ''
skipdocs = 0
if _is_bound_method(object):
imclass = object.__self__.__class__
if cl:
if imclass is not cl:
note = ' from ' + classname(imclass, mod)
else:
if object.__self__ is not None:
note = ' method of %s instance' % classname(
object.__self__.__class__, mod)
else:
note = ' unbound %s method' % classname(imclass,mod)

if name == realname:
title = self.bold(realname)
else:
if (cl and realname in cl.__dict__ and
cl.__dict__[realname] is object):
skipdocs = 1
title = self.bold(name) + ' = ' + realname
argspec = None

if inspect.isroutine(object):
try:
signature = inspect.signature(object)
except (ValueError, TypeError):
signature = None
if signature:
argspec = str(signature)
if realname == '':
title = self.bold(name) + ' lambda '
# XXX lambda's won't usually have func_annotations['return']
# since the syntax doesn't support but it is possible.
# So removing parentheses isn't truly safe.
argspec = argspec[1:-1] # remove parentheses
if not argspec:
argspec = '(...)'
decl = title + argspec + note

if skipdocs:
return decl + '\n'
else:
doc = getdoc(object) or ''
return decl + '\n' + (doc and self.indent(doc).rstrip() + '\n')

def _docdescriptor(self, name, value, mod):
results = []
push = results.append

if name:
push(self.bold(name))
push('\n')
doc = getdoc(value) or ''
if doc:
push(self.indent(doc))
push('\n')
return ''.join(results)

def docproperty(self, object, name=None, mod=None, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return self._docdescriptor(name, object, mod)

def docdata(self, object, name=None, mod=None, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return self._docdescriptor(name, object, mod)

def docother(self, object, name=None, mod=None, parent=None, maxlen=None, doc=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

repr = self.repr(object)
if maxlen:
line = (name and name + ' = ' or '') + repr
chop = maxlen - len(line)
if chop < 0: repr = repr[:chop] + '...'
line = (name and self.bold(name) + ' = ' or '') + repr
if doc is not None:
line += '\n' + self.indent(str(doc))
return line

class _PlainTextDoc(TextDoc):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

def bold(self, text):
return text

# --------------------------------------------------------- user interfaces

def pager(text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

global pager
pager = getpager()
pager(text)

def getpager():

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

if not hasattr(sys.stdin, "isatty"):
return plainpager
if not hasattr(sys.stdout, "isatty"):
return plainpager
if not sys.stdin.isatty() or not sys.stdout.isatty():
return plainpager
use_pager = os.environ.get('MANPAGER') or os.environ.get('PAGER')
if use_pager:
if sys.platform == 'win32': # pipes completely broken in Windows
return lambda text: tempfilepager(plain(text), use_pager)
elif os.environ.get('TERM') in ('dumb', 'emacs'):
return lambda text: pipepager(plain(text), use_pager)
else:
return lambda text: pipepager(text, use_pager)
if os.environ.get('TERM') in ('dumb', 'emacs'):
return plainpager
if sys.platform == 'win32':
return lambda text: tempfilepager(plain(text), 'more <')
if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0:
return lambda text: pipepager(text, 'less')

import tempfile
(fd, filename) = tempfile.mkstemp()
os.close(fd)
try:
if hasattr(os, 'system') and os.system('more "%s"' % filename) == 0:
return lambda text: pipepager(text, 'more')
else:
return ttypager
finally:
os.unlink(filename)

def plain(text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

return re.sub('.\b', '', text)

def pipepager(text, cmd):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

import subprocess
proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE)
try:
with io.TextIOWrapper(proc.stdin, errors='backslashreplace') as pipe:
try:
pipe.write(text)
except KeyboardInterrupt:
# We've hereby abandoned whatever text hasn't been written,
# but the pager is still in control of the terminal.
pass
except OSError:
pass # Ignore broken pipes caused by quitting the pager program.
while True:
try:
proc.wait()
break
except KeyboardInterrupt:
# Ignore ctl-c like the pager itself does. Otherwise the pager is
# left running and the terminal is in raw mode and unusable.
pass

def tempfilepager(text, cmd):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

import tempfile
filename = tempfile.mktemp()
with open(filename, 'w', errors='backslashreplace') as file:
file.write(text)
try:
os.system(cmd + ' "' + filename + '"')
finally:
os.unlink(filename)

def _escape_stdout(text):
# Escape non-encodable characters to avoid encoding errors later
encoding = getattr(sys.stdout, 'encoding', None) or 'utf-8'
return text.encode(encoding, 'backslashreplace').decode(encoding)

def ttypager(text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

lines = plain(_escape_stdout(text)).split('\n')
try:
import tty
fd = sys.stdin.fileno()
old = tty.tcgetattr(fd)
tty.setcbreak(fd)
getchar = lambda: sys.stdin.read(1)
except (ImportError, AttributeError, io.UnsupportedOperation):
tty = None
getchar = lambda: sys.stdin.readline()[:-1][:1]

try:
try:
h = int(os.environ.get('LINES', 0))
except ValueError:
h = 0
if h <= 1:
h = 25
r = inc = h - 1
sys.stdout.write('\n'.join(lines[:inc]) + '\n')
while lines[r:]:
sys.stdout.write('-- more --')
sys.stdout.flush()
c = getchar()

if c in ('q', 'Q'):
sys.stdout.write('\r \r')
break
elif c in ('\r', '\n'):
sys.stdout.write('\r \r' + lines[r] + '\n')
r = r + 1
continue
if c in ('b', 'B', '\x1b'):
r = r - inc - inc
if r < 0: r = 0
sys.stdout.write('\n' + '\n'.join(lines[r:r+inc]) + '\n')
r = r + inc

finally:
if tty:
tty.tcsetattr(fd, tty.TCSAFLUSH, old)

def plainpager(text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

sys.stdout.write(plain(_escape_stdout(text)))

def describe(thing):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

if inspect.ismodule(thing):
if thing.__name__ in sys.builtin_module_names:
return 'built-in module ' + thing.__name__
if hasattr(thing, '__path__'):
return 'package ' + thing.__name__
else:
return 'module ' + thing.__name__
if inspect.isbuiltin(thing):
return 'built-in function ' + thing.__name__
if inspect.isgetsetdescriptor(thing):
return 'getset descriptor %s.%s.%s' % (
thing.__objclass__.__module__, thing.__objclass__.__name__,
thing.__name__)
if inspect.ismemberdescriptor(thing):
return 'member descriptor %s.%s.%s' % (
thing.__objclass__.__module__, thing.__objclass__.__name__,
thing.__name__)
if inspect.isclass(thing):
return 'class ' + thing.__name__
if inspect.isfunction(thing):
return 'function ' + thing.__name__
if inspect.ismethod(thing):
return 'method ' + thing.__name__
return type(thing).__name__

def locate(path, forceload=0):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:

parts = [part for part in path.split('.') if part]
module, n = None, 0
while n < len(parts):
nextmodule = safeimport('.'.join(parts[:n+1]), forceload)
if nextmodule: module, n = nextmodule, n + 1
else: break
if module:
object = module
else:
object = builtins
for part in parts[n:]:
try:
object = getattr(object, part)
except AttributeError:
return None
return object

# --------------------------------------- interactive interpreter interface

text = TextDoc()
plaintext = _PlainTextDoc()
html = HTMLDoc()

def resolve(thing, forceload=0):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

if isinstance(thing, str):
object = locate(thing, forceload)
if object is None:
raise ImportError('''\
No Python documentation found for %r.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.''' % thing)
return object, thing
else:
name = getattr(thing, '__name__', None)
return thing, name if isinstance(name, str) else None

def render_doc(thing, title='Python Library Documentation: %s', forceload=0,
renderer=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

if renderer is None:
renderer = text
object, name = resolve(thing, forceload)
desc = describe(object)
module = inspect.getmodule(object)
if name and '.' in name:
desc += ' in ' + name[:name.rfind('.')]
elif module and module is not object:
desc += ' in module ' + module.__name__

if not (inspect.ismodule(object) or
inspect.isclass(object) or
inspect.isroutine(object) or
inspect.isgetsetdescriptor(object) or
inspect.ismemberdescriptor(object) or
isinstance(object, property)):
# If the passed object is a piece of data or an instance,
# document its available methods instead of its value.
object = type(object)
desc += ' object'
return title % desc + '\n\n' + renderer.document(object, name)

def doc(thing, title='Python Library Documentation: %s', forceload=0, renderer=None,
output=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

try:
if output is None:
pager(render_doc(thing, title, forceload, renderer))
else:
output.write(render_doc(thing, title, forceload, plaintext))
except (ImportError, ErrorDuringImport) as value:
print(value)

def writedoc(thing, forceload=0):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:

try:
object, name = resolve(thing, forceload)
page = html.page(describe(object), html.document(object, name))
with open(name + '.html', 'w', encoding='utf-8') as file:
file.write(page)
print('wrote', name + '.html')
except (ImportError, ErrorDuringImport) as value:
print(value)

def writedocs(dir, pkgpath='', done=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __doc__:

if done is None: done = {}
for importer, modname, ispkg in pkgutil.walk_packages([dir], pkgpath):
writedoc(modname)
return

class Helper:

# These dictionaries map a topic name to either an alias, or a tuple
# (label, seealso-items). The "label" is the label of the corresponding
# section in the .rst file under Doc/ and an index into the dictionary
# in pydoc_data/topics.py.
#
# CAUTION: if you change one of these dictionaries, be sure to adapt the
# list of needed labels in Doc/tools/extensions/pyspecific.py and
# regenerate the pydoc_data/topics.py file by running
# make pydoc-topics
# in Doc/ and copying the output file into the Lib/ directory.

keywords = {
'False': '',
'None': '',
'True': '',
'and': 'BOOLEAN',
'as': 'with',
'assert': ('assert', ''),
'async': ('async', ''),
'await': ('await', ''),
'break': ('break', 'while for'),
'class': ('class', 'CLASSES SPECIALMETHODS'),
'continue': ('continue', 'while for'),
'def': ('function', ''),
'del': ('del', 'BASICMETHODS'),
'elif': 'if',
'else': ('else', 'while for'),
'except': 'try',
'finally': 'try',
'for': ('for', 'break continue while'),
'from': 'import',
'global': ('global', 'nonlocal NAMESPACES'),
'if': ('if', 'TRUTHVALUE'),
'import': ('import', 'MODULES'),
'in': ('in', 'SEQUENCEMETHODS'),
'is': 'COMPARISON',
'lambda': ('lambda', 'FUNCTIONS'),
'nonlocal': ('nonlocal', 'global NAMESPACES'),
'not': 'BOOLEAN',
'or': 'BOOLEAN',
'pass': ('pass', ''),
'raise': ('raise', 'EXCEPTIONS'),
'return': ('return', 'FUNCTIONS'),
'try': ('try', 'EXCEPTIONS'),
'while': ('while', 'break continue if TRUTHVALUE'),
'with': ('with', 'CONTEXTMANAGERS EXCEPTIONS yield'),
'yield': ('yield', ''),
}
# Either add symbols to this dictionary or to the symbols dictionary
# directly: Whichever is easier. They are merged later.
_strprefixes = [p + q for p in ('b', 'f', 'r', 'u') for q in ("'", '"')]
_symbols_inverse = {
'STRINGS' : ("'", "'''", '"', '
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Read one line, using input() when appropriate.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Return unbuffered tuple of (topic, xrefs).

If an error occurs here, the exception is caught and displayed by
the url handler.

This function duplicates the showtopic method but returns its
result directly so it can be formatted for display in an html page.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
An interruptible scanner that searches module synopses.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Print all the one-line module summaries that contain a substring.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:
Start an HTTP server thread on a specific port.

Start an HTML/text server thread, so HTML or text documents can be
browsed dynamically and interactively with a Web browser. Example use:

>>> import time
>>> import pydoc

Define a URL handler. To determine what the client is asking
for, check the URL and content_type.

Then get or generate some text or HTML code and return it.

>>> def my_url_handler(url, content_type):
... text = 'the URL sent was: (%s, %s)' % (url, content_type)
... return text

Start server thread on port 0.
If you use port 0, the server will pick a random port number.
You can then use serverthread.port to get the port number.

>>> port = 0
>>> serverthread = pydoc._start_server(my_url_handler, port)

Check that the server is really started. If it is, open browser
and get first page. Use serverthread.url as the starting page.

>>> if serverthread.serving:
... import webbrowser

The next two lines are commented out so a browser doesn't open if
doctest is run on this module.

#... webbrowser.open(serverthread.url)
#True

Let the server do its thing. We just need to monitor its status.
Use time.sleep so the loop doesn't hog the CPU.

>>> starttime = time.time()
>>> timeout = 1 #seconds

This is a short timeout for testing purposes.

>>> while serverthread.serving:
... time.sleep(.01)
... if serverthread.serving and time.time() - starttime > timeout:
... serverthread.stop()
... break

Print any errors that may have occurred.

>>> print(serverthread.error)
None

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Process a request from an HTML browser.

The URL received is in self.path.
Get an HTML page from self.urlhandler and send it.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Start the server.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Stop the server and this thread nicely
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
The pydoc url handler for use with the pydoc server.

If the content_type is 'text/css', the _pydoc.css style
sheet is read and returned if it exits.

If the content_type is 'text/html', then the result of
get_html_page(url) is returned.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Format an HTML page.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:


Python %s
%s



package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Module Index page.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Search results page.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Get and display a source file listing safely.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Index of topic texts available.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Index of keywords.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Topic or keyword help page.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Generate an HTML page for url.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Start the enhanced pydoc Web server and open a Web browser.

Use port '0' to start the server on an arbitrary port.
Set open_browser to False to suppress opening a browser.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Ensures current directory is on returned path, and argv0 directory is not

Exception: argv0 dir is left alone if it's also pydoc's directory.

Returns a new path entry list, or None if no adjustment is needed.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Ensures current directory is on sys.path, and __main__ directory is not.

Exception: __main__ dir is left alone if it's also pydoc's directory.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: unkown:
Command-line interface (looks at sys.argv to decide what to do).
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\doc_maker\doc_maker.py, function: __add__:
pydoc - the Python documentation tool

{cmd} ...
Show text documentation on something. may be the name of a
Python keyword, topic, function, module, or package, or a dotted
reference to a class or function within a module or module in a
package. If contains a '{sep}', it is used as the path to a
Python source file to document. If name is 'keywords', 'topics',
or 'modules', a listing of these things is displayed.

{cmd} -k
Search for a keyword in the synopsis lines of all available modules.

{cmd} -n
Start an HTTP server with the given hostname (default: localhost).

{cmd} -p
Start an HTTP server on the given port on the local machine. Port
number 0 can be used to get an arbitrary unused port.

{cmd} -b
Start an HTTP server on an arbitrary unused port and open a Web browser
to interactively browse documentation. This option can be used in
combination with -n and/or -p.

{cmd} -w ...
Write out the HTML documentation for a module to a file in the current
directory. If contains a '{sep}', it is treated as a filename; if
it names a directory, documentation is written for all the contents.







package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\programs\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\core\os_sys\programs\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.










package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:
Generate Python documentation in HTML or text for interactive use.

At the Python interactive prompt, calling help(thing) on a Python object
documents the object, and calling help() starts up an interactive
help session.

Or, at the shell command line outside of Python:

Run "pydoc " to show documentation on something. may be
the name of a function, module, package, or a dotted reference to a
class or function within a module or module in a package. If the
argument contains a path segment delimiter (e.g. slash on Unix,
backslash on Windows) it is treated as the path to a Python source file.

Run "pydoc -k " to search for a keyword in the synopsis lines
of all available modules.

Run "pydoc -n " to start an HTTP server with the given
hostname (default: localhost) on the local machine.

Run "pydoc -p " to start an HTTP server on the given port on the
local machine. Port number 0 can be used to get an arbitrary unused port.

Run "pydoc -b" to start an HTTP server on an arbitrary unused port and
open a Web browser to interactively browse documentation. Combine with
the -n and -p options to control the hostname and port used.

Run "pydoc -w " to write out the HTML documentation for a module
to a file named ".html".

Module docs for core modules are assumed to be in

https://docs.python.org/X.Y/library/

This can be overridden by setting the PYTHONDOCS environment variable
to a different URL or to a local directory containing the Library
Reference Manual pages.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Guido van Rossum, for an excellent programming language.
Tommy Burnette, the original creator of manpy.
Paul Prescod, for all his work on onlinehelp.
Richard Chamberlain, for the first implementation of textdoc.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Convert sys.path into a list of absolute, existing, unique paths.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Get the doc string or comments for an object.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Split a doc string into a synopsis line (if any) and the rest.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Get a class name and qualify it with a module name if necessary.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Check if an object is of a type that probably means it's data.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Do a series of global replacements on a string.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Omit part of a string if needed to make it fit in a maximum length.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Remove the hexadecimal id from a Python object representation.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

Returns True if fn is a bound method, regardless of whether
fn was implemented in Python or in C.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Split sequence s via predicate, and return pair ([true], [false]).

The return value is a 2-tuple of lists,
([x for x in s if predicate(x)],
[x for x in s if not predicate(x)])

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Decide whether to show documentation on a variable.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Wrap inspect.classify_class_attrs, with fixup for data descriptors.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Guess whether a path refers to a package directory.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
': line = line[1:]
if line[:3] == '
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
')[0].strip()
else: result = None
return result

def synopsis(filename, cache={}):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

mtime = os.stat(filename).st_mtime
lastupdate, result = cache.get(filename, (None, None))
if lastupdate is None or lastupdate < mtime:
# Look for binary suffixes first, falling back to source.
if filename.endswith(tuple(importlib.machinery.BYTECODE_SUFFIXES)):
loader_cls = importlib.machinery.SourcelessFileLoader
elif filename.endswith(tuple(importlib.machinery.EXTENSION_SUFFIXES)):
loader_cls = importlib.machinery.ExtensionFileLoader
else:
loader_cls = None
# Now handle the choice.
if loader_cls is None:
# Must be a source file.
try:
file = tokenize.open(filename)
except OSError:
# module can't be opened, so skip it
return None
# text modules can be directly examined
with file:
result = source_synopsis(file)
else:
# Must be a binary module, which has to be imported.
loader = loader_cls('__temp__', filename)
# XXX We probably don't need to pass in the loader here.
spec = importlib.util.spec_from_file_location('__temp__', filename,
loader=loader)
try:
module = importlib._bootstrap._load(spec)
except:
return None
del sys.modules['__temp__']
result = module.__doc__.splitlines()[0] if module.__doc__ else None
# Cache the result.
cache[filename] = (mtime, result)
return result

class ErrorDuringImport(Exception):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

def __init__(self, filename, exc_info):
self.filename = filename
self.exc, self.value, self.tb = exc_info

def __str__(self):
exc = self.exc.__name__
return 'problem in %s - %s: %s' % (self.filename, exc, self.value)

def importfile(path):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

magic = importlib.util.MAGIC_NUMBER
with open(path, 'rb') as file:
is_bytecode = magic == file.read(len(magic))
filename = os.path.basename(path)
name, ext = os.path.splitext(filename)
if is_bytecode:
loader = importlib._bootstrap_external.SourcelessFileLoader(name, path)
else:
loader = importlib._bootstrap_external.SourceFileLoader(name, path)
# XXX We probably don't need to pass in the loader here.
spec = importlib.util.spec_from_file_location(name, path, loader=loader)
try:
return importlib._bootstrap._load(spec)
except:
raise ErrorDuringImport(path, sys.exc_info())

def safeimport(path, forceload=0, cache={}):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

try:
# If forceload is 1 and the module has been previously loaded from
# disk, we always have to reload the module. Checking the file's
# mtime isn't good enough (e.g. the module could contain a class
# that inherits from another module that has changed).
if forceload and path in sys.modules:
if path not in sys.builtin_module_names:
# Remove the module from sys.modules and re-import to try
# and avoid problems with partially loaded modules.
# Also remove any submodules because they won't appear
# in the newly loaded module's namespace if they're already
# in sys.modules.
subs = [m for m in sys.modules if m.startswith(path + '.')]
for key in [path] + subs:
# Prevent garbage collection.
cache[key] = sys.modules[key]
del sys.modules[key]
module = __import__(path)
except:
# Did the error occur before or after the module was found?
(exc, value, tb) = info = sys.exc_info()
if path in sys.modules:
# An error occurred while executing the imported module.
raise ErrorDuringImport(sys.modules[path].__file__, info)
elif exc is SyntaxError:
# A SyntaxError occurred before we could execute the module.
raise ErrorDuringImport(value.filename, info)
elif issubclass(exc, ImportError) and value.name == path:
# No such module in the path.
return None
else:
# Some other error occurred during the importing process.
raise ErrorDuringImport(path, sys.exc_info())
for part in path.split('.')[1:]:
try: module = getattr(module, part)
except AttributeError: return None
return module

# ---------------------------------------------------- formatter base class

class Doc:

PYTHONDOCS = os.environ.get("PYTHONDOCS",
"https://docs.python.org/%d.%d/library"
% sys.version_info[:2])

def document(self, object, name=None, *args):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

args = (object, name) + args
# 'try' clause is to attempt to handle the possibility that inspect
# identifies something in a way that pydoc itself has issues handling;
# think 'super' and how it is a descriptor (which raises the exception
# by lacking a __name__ attribute) and an instance.
if inspect.isgetsetdescriptor(object): return self.docdata(*args)
if inspect.ismemberdescriptor(object): return self.docdata(*args)
try:
if inspect.ismodule(object): return self.docmodule(*args)
if inspect.isclass(object): return self.docclass(*args)
if inspect.isroutine(object): return self.docroutine(*args)
except AttributeError:
pass
if isinstance(object, property): return self.docproperty(*args)
return self.docother(*args)

def fail(self, object, name=None, *args):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

message = "don't know how to document object%s of type %s" % (
name and ' ' + repr(name), type(object).__name__)
raise TypeError(message)

docmodule = docclass = docroutine = docother = docproperty = docdata = fail

def getdocloc(self, object,
basedir=os.path.join(sys.base_exec_prefix, "lib",
"python%d.%d" % sys.version_info[:2])):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:


try:
file = inspect.getabsfile(object)
except TypeError:
file = '(built-in)'

docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)

basedir = os.path.normcase(basedir)
if (isinstance(object, type(os)) and
(object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
'marshal', 'posix', 'signal', 'sys',
'_thread', 'zipimport') or
(file.startswith(basedir) and
not file.startswith(os.path.join(basedir, 'site-packages')))) and
object.__name__ not in ('xml.etree', 'test.pydoc_mod')):
if docloc.startswith(("http://", "https://")):
docloc = "%s/%s" % (docloc.rstrip("/"), object.__name__.lower())
else:
docloc = os.path.join(docloc, object.__name__.lower() + ".html")
else:
docloc = None
return docloc

# -------------------------------------------- HTML documentation generator

class HTMLRepr(Repr):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

def __init__(self):
Repr.__init__(self)
self.maxlist = self.maxtuple = 20
self.maxdict = 10
self.maxstring = self.maxother = 100

def escape(self, text):
return replace(text, '&', '&', '<', '<', '>', '>')

def repr(self, object):
return Repr.repr(self, object)

def repr1(self, x, level):
if hasattr(type(x), '__name__'):
methodname = 'repr_' + '_'.join(type(x).__name__.split())
if hasattr(self, methodname):
return getattr(self, methodname)(x, level)
return self.escape(cram(stripid(repr(x)), self.maxother))

def repr_string(self, x, level):
test = cram(x, self.maxstring)
testrepr = repr(test)
if '\\' in test and '\\' not in replace(testrepr, r'\\', ''):
# Backslashes are only literal in the string and are never
# needed to make any special characters, so show a raw string.
return 'r' + testrepr[0] + self.escape(test) + testrepr[0]
return re.sub(r'((\\[\\abfnrtv\'"]|\\[0-9]..|\\x..|\\u....)+)',
r'\1',
self.escape(testrepr))

repr_str = repr_string

def repr_instance(self, x, level):
try:
return self.escape(cram(stripid(repr(x)), self.maxstring))
except:
return self.escape('<%s instance>' % x.__class__.__name__)

repr_unicode = repr_string

class HTMLDoc(Doc):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __doc__:


# ------------------------------------------- HTML formatting utilities

_repr_instance = HTMLRepr()
repr = _repr_instance.repr
escape = _repr_instance.escape

def page(self, title, contents):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return '''\

Python: %s


%s
''' % (title, contents)

def heading(self, title, fgcol, bgcol, extras=''):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return '''


>
 

 
%s
>%s

''' % (bgcol, fgcol, title, fgcol, extras or ' ')

def section(self, title, fgcol, bgcol, contents, width=6,
prelude='', marginalia=None, gap=' '):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

if marginalia is None:
marginalia = '' + ' ' * width + ''
result = '''





''' % (bgcol, fgcol, title)
if prelude:
result = result + '''


''' % (bgcol, marginalia, prelude, gap)
else:
result = result + '''
''' % (bgcol, marginalia, gap)

return result + '\n
 

%s
%s %s
%s
%s%s %s
' % contents

def bigsection(self, title, *args):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

title = '%s' % title
return self.section(title, *args)

def preformat(self, text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

text = self.escape(text.expandtabs())
return replace(text, '\n\n', '\n \n', '\n\n', '\n \n',
' ', ' ', '\n', '
\n')

def multicolumn(self, list, format, cols=4):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

result = ''
rows = (len(list)+cols-1)//cols
for col in range(cols):
result = result + '' % (100//cols)
for i in range(rows*col, rows*col+rows):
if i < len(list):
result = result + format(list[i]) + '
\n'
result = result + ''
return '%s
' % result

def grey(self, text): return '%s' % text

def namelink(self, name, *dicts):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

for dict in dicts:
if name in dict:
return '%s' % (dict[name], name)
return name

def classlink(self, object, modname):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

name, module = object.__name__, sys.modules.get(object.__module__)
if hasattr(module, name) and getattr(module, name) is object:
return '%s' % (
module.__name__, name, classname(object, modname))
return classname(object, modname)

def modulelink(self, object):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return '%s' % (object.__name__, object.__name__)

def modpkglink(self, modpkginfo):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

name, path, ispackage, shadowed = modpkginfo
if shadowed:
return self.grey(name)
if path:
url = '%s.%s.html' % (path, name)
else:
url = '%s.html' % name
if ispackage:
text = '%s (package)' % name
else:
text = name
return '%s' % (url, text)

def filelink(self, url, path):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return '%s' % (url, path)

def markup(self, text, escape=None, funcs={}, classes={}, methods={}):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __doc__:

escape = escape or self.escape
results = []
here = 0
pattern = re.compile(r'\b((http|ftp)://\S+[\w/]|'
r'RFC[- ]?(\d+)|'
r'PEP[- ]?(\d+)|'
r'(self\.)?(\w+))')
while True:
match = pattern.search(text, here)
if not match: break
start, end = match.span()
results.append(escape(text[here:start]))

all, scheme, rfc, pep, selfdot, name = match.groups()
if scheme:
url = escape(all).replace('"', '"')
results.append('%s' % (url, url))
elif rfc:
url = 'http://www.rfc-editor.org/rfc/rfc%d.txt' % int(rfc)
results.append('%s' % (url, escape(all)))
elif pep:
url = 'http://www.python.org/dev/peps/pep-%04d/' % int(pep)
results.append('%s' % (url, escape(all)))
elif selfdot:
# Create a link for methods like 'self.method(...)'
# and use for attributes like 'self.attr'
if text[end:end+1] == '(':
results.append('self.' + self.namelink(name, methods))
else:
results.append('self.%s' % name)
elif text[end:end+1] == '(':
results.append(self.namelink(name, methods, funcs, classes))
else:
results.append(self.namelink(name, classes))
here = end
results.append(escape(text[here:]))
return ''.join(results)

# ---------------------------------------------- type-specific routines

def formattree(self, tree, modname, parent=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

result = ''
for entry in tree:
if type(entry) is type(()):
c, bases = entry
result = result + '
'
result = result + self.classlink(c, modname)
if bases and bases != (parent,):
parents = []
for base in bases:
parents.append(self.classlink(base, modname))
result = result + '(' + ', '.join(parents) + ')'
result = result + '\n
'
elif type(entry) is type([]):
result = result + '
\n%s
\n' % self.formattree(
entry, modname, c)
return '
\n%s
\n' % result

def docmodule(self, object, name=None, mod=None, *ignored):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

name = object.__name__ # ignore the passed-in name
try:
all = object.__all__
except AttributeError:
all = None
parts = name.split('.')
links = []
for i in range(len(parts)-1):
links.append(
'%s' %
('.'.join(parts[:i+1]), parts[i]))
linkedname = '.'.join(links + parts[-1:])
head = '%s' % linkedname
try:
path = inspect.getabsfile(object)
url = urllib.parse.quote(path)
filelink = self.filelink(url, path)
except TypeError:
filelink = '(built-in)'
info = []
if hasattr(object, '__version__'):
version = str(object.__version__)
if version[:11] == '$' + 'Revision: ' and version[-1:] == '$':
version = version[11:-1].strip()
info.append('version %s' % self.escape(version))
if hasattr(object, '__date__'):
info.append(self.escape(str(object.__date__)))
if info:
head = head + ' (%s)' % ', '.join(info)
docloc = self.getdocloc(object)
if docloc is not None:
docloc = '
Module Reference' % locals()
else:
docloc = ''
result = self.heading(
head, '#ffffff', '#7799ee',
'index
' + filelink + docloc)

modules = inspect.getmembers(object, inspect.ismodule)

classes, cdict = [], {}
for key, value in inspect.getmembers(object, inspect.isclass):
# if __all__ exists, believe it. Otherwise use old heuristic.
if (all is not None or
(inspect.getmodule(value) or object) is object):
if visiblename(key, all, object):
classes.append((key, value))
cdict[key] = cdict[value] = '#' + key
for key, value in classes:
for base in value.__bases__:
key, modname = base.__name__, base.__module__
module = sys.modules.get(modname)
if modname != name and module and hasattr(module, key):
if getattr(module, key) is base:
if not key in cdict:
cdict[key] = cdict[base] = modname + '.html#' + key
funcs, fdict = [], {}
for key, value in inspect.getmembers(object, inspect.isroutine):
# if __all__ exists, believe it. Otherwise use old heuristic.
if (all is not None or
inspect.isbuiltin(value) or inspect.getmodule(value) is object):
if visiblename(key, all, object):
funcs.append((key, value))
fdict[key] = '#-' + key
if inspect.isfunction(value): fdict[value] = fdict[key]
data = []
for key, value in inspect.getmembers(object, isdata):
if visiblename(key, all, object):
data.append((key, value))

doc = self.markup(getdoc(object), self.preformat, fdict, cdict)
doc = doc and '%s' % doc
result = result + '

%s

\n' % doc

if hasattr(object, '__path__'):
modpkgs = []
for importer, modname, ispkg in pkgutil.iter_modules(object.__path__):
modpkgs.append((modname, name, ispkg, 0))
modpkgs.sort()
contents = self.multicolumn(modpkgs, self.modpkglink)
result = result + self.bigsection(
'Package Contents', '#ffffff', '#aa55cc', contents)
elif modules:
contents = self.multicolumn(
modules, lambda t: self.modulelink(t[1]))
result = result + self.bigsection(
'Modules', '#ffffff', '#aa55cc', contents)

if classes:
classlist = [value for (key, value) in classes]
contents = [
self.formattree(inspect.getclasstree(classlist, 1), name)]
for key, value in classes:
contents.append(self.document(value, key, name, fdict, cdict))
result = result + self.bigsection(
'Classes', '#ffffff', '#ee77aa', ' '.join(contents))
if funcs:
contents = []
for key, value in funcs:
contents.append(self.document(value, key, name, fdict, cdict))
result = result + self.bigsection(
'Functions', '#ffffff', '#eeaa77', ' '.join(contents))
if data:
contents = []
for key, value in data:
contents.append(self.document(value, key))
result = result + self.bigsection(
'Data', '#ffffff', '#55aa55', '
\n'.join(contents))
if hasattr(object, '__author__'):
contents = self.markup(str(object.__author__), self.preformat)
result = result + self.bigsection(
'Author', '#ffffff', '#7799ee', contents)
if hasattr(object, '__credits__'):
contents = self.markup(str(object.__credits__), self.preformat)
result = result + self.bigsection(
'Credits', '#ffffff', '#7799ee', contents)

return result

def docclass(self, object, name=None, mod=None, funcs={}, classes={},
*ignored):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

realname = object.__name__
name = name or realname
bases = object.__bases__

contents = []
push = contents.append

# Cute little class to pump out a horizontal rule between sections.
class HorizontalRule:
def __init__(self):
self.needone = 0
def maybe(self):
if self.needone:
push('
\n')
self.needone = 1
hr = HorizontalRule()

# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
hr.maybe()
push('
Method resolution order:
\n')
for base in mro:
push('
%s
\n' % self.classlink(base,
object.__module__))
push('
\n')

def spill(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
try:
value = getattr(object, name)
except Exception:
# Some descriptors may meet a failure in their __get__.
# (bug #1785)
push(self._docdescriptor(name, value, mod))
else:
push(self.document(value, name, mod,
funcs, classes, mdict, object))
push('\n')
return attrs

def spilldescriptors(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
push(self._docdescriptor(name, value, mod))
return attrs

def spilldata(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
base = self.docother(getattr(object, name), name, mod)
if callable(value) or inspect.isdatadescriptor(value):
doc = getattr(value, "__doc__", None)
else:
doc = None
if doc is None:
push('
%s
\n' % base)
else:
doc = self.markup(getdoc(value), self.preformat,
funcs, classes, mdict)
doc = '
%s' % doc
push('
%s%s
\n' % (base, doc))
push('\n')
return attrs

attrs = [(name, kind, cls, value)
for name, kind, cls, value in classify_class_attrs(object)
if visiblename(name, obj=object)]

mdict = {}
for key, kind, homecls, value in attrs:
mdict[key] = anchor = '#' + name + '-' + key
try:
value = getattr(object, name)
except Exception:
# Some descriptors may meet a failure in their __get__.
# (bug #1785)
pass
try:
# The value may not be hashable (e.g., a data attr with
# a dict or list value).
mdict[value] = anchor
except TypeError:
pass

while attrs:
if mro:
thisclass = mro.popleft()
else:
thisclass = attrs[0][2]
attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)

if thisclass is builtins.object:
attrs = inherited
continue
elif thisclass is object:
tag = 'defined here'
else:
tag = 'inherited from %s' % self.classlink(thisclass,
object.__module__)
tag += ':
\n'

sort_attributes(attrs, object)

# Pump out the attrs, segregated by kind.
attrs = spill('Methods %s' % tag, attrs,
lambda t: t[1] == 'method')
attrs = spill('Class methods %s' % tag, attrs,
lambda t: t[1] == 'class method')
attrs = spill('Static methods %s' % tag, attrs,
lambda t: t[1] == 'static method')
attrs = spilldescriptors('Data descriptors %s' % tag, attrs,
lambda t: t[1] == 'data descriptor')
attrs = spilldata('Data and other attributes %s' % tag, attrs,
lambda t: t[1] == 'data')
assert attrs == []
attrs = inherited

contents = ''.join(contents)

if name == realname:
title = 'class %s' % (
name, realname)
else:
title = '%s = class %s' % (
name, name, realname)
if bases:
parents = []
for base in bases:
parents.append(self.classlink(base, object.__module__))
title = title + '(%s)' % ', '.join(parents)

decl = ''
try:
signature = inspect.signature(object)
except (ValueError, TypeError):
signature = None
if signature:
argspec = str(signature)
if argspec and argspec != '()':
decl = name + self.escape(argspec) + '\n\n'

doc = getdoc(object)
if decl:
doc = decl + (doc or '')
doc = self.markup(doc, self.preformat, funcs, classes, mdict)
doc = doc and '%s
 
' % doc

return self.section(title, '#000000', '#ffc8d8', contents, 3, doc)

def formatvalue(self, object):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return self.grey('=' + self.repr(object))

def docroutine(self, object, name=None, mod=None,
funcs={}, classes={}, methods={}, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

realname = object.__name__
name = name or realname
anchor = (cl and cl.__name__ or '') + '-' + name
note = ''
skipdocs = 0
if _is_bound_method(object):
imclass = object.__self__.__class__
if cl:
if imclass is not cl:
note = ' from ' + self.classlink(imclass, mod)
else:
if object.__self__ is not None:
note = ' method of %s instance' % self.classlink(
object.__self__.__class__, mod)
else:
note = ' unbound %s method' % self.classlink(imclass,mod)

if name == realname:
title = '%s' % (anchor, realname)
else:
if (cl and realname in cl.__dict__ and
cl.__dict__[realname] is object):
reallink = '%s' % (
cl.__name__ + '-' + realname, realname)
skipdocs = 1
else:
reallink = realname
title = '%s = %s' % (
anchor, name, reallink)
argspec = None
if inspect.isroutine(object):
try:
signature = inspect.signature(object)
except (ValueError, TypeError):
signature = None
if signature:
argspec = str(signature)
if realname == '':
title = '%s lambda ' % name
# XXX lambda's won't usually have func_annotations['return']
# since the syntax doesn't support but it is possible.
# So removing parentheses isn't truly safe.
argspec = argspec[1:-1] # remove parentheses
if not argspec:
argspec = '(...)'

decl = title + self.escape(argspec) + (note and self.grey(
'%s' % note))

if skipdocs:
return '
%s
\n' % decl
else:
doc = self.markup(
getdoc(object), self.preformat, funcs, classes, methods)
doc = doc and '
%s
' % doc
return '
%s
%s
\n' % (decl, doc)

def _docdescriptor(self, name, value, mod):
results = []
push = results.append

if name:
push('
%s
\n' % name)
if value.__doc__ is not None:
doc = self.markup(getdoc(value), self.preformat)
push('
%s
\n' % doc)
push('
\n')

return ''.join(results)

def docproperty(self, object, name=None, mod=None, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return self._docdescriptor(name, object, mod)

def docother(self, object, name=None, mod=None, *ignored):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

lhs = name and '%s = ' % name or ''
return lhs + self.repr(object)

def docdata(self, object, name=None, mod=None, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return self._docdescriptor(name, object, mod)

def index(self, dir, shadowed=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

modpkgs = []
if shadowed is None: shadowed = {}
for importer, name, ispkg in pkgutil.iter_modules([dir]):
if any((0xD800 <= ord(ch) <= 0xDFFF) for ch in name):
# ignore a module if its name contains a surrogate character
continue
modpkgs.append((name, '', ispkg, name in shadowed))
shadowed[name] = 1

modpkgs.sort()
contents = self.multicolumn(modpkgs, self.modpkglink)
return self.bigsection(dir, '#ffffff', '#ee77aa', contents)

# -------------------------------------------- text documentation generator

class TextRepr(Repr):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

def __init__(self):
Repr.__init__(self)
self.maxlist = self.maxtuple = 20
self.maxdict = 10
self.maxstring = self.maxother = 100

def repr1(self, x, level):
if hasattr(type(x), '__name__'):
methodname = 'repr_' + '_'.join(type(x).__name__.split())
if hasattr(self, methodname):
return getattr(self, methodname)(x, level)
return cram(stripid(repr(x)), self.maxother)

def repr_string(self, x, level):
test = cram(x, self.maxstring)
testrepr = repr(test)
if '\\' in test and '\\' not in replace(testrepr, r'\\', ''):
# Backslashes are only literal in the string and are never
# needed to make any special characters, so show a raw string.
return 'r' + testrepr[0] + test + testrepr[0]
return testrepr

repr_str = repr_string

def repr_instance(self, x, level):
try:
return cram(stripid(repr(x)), self.maxstring)
except:
return '<%s instance>' % x.__class__.__name__

class TextDoc(Doc):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __doc__:


# ------------------------------------------- text formatting utilities

_repr_instance = TextRepr()
repr = _repr_instance.repr

def bold(self, text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return ''.join(ch + '\b' + ch for ch in text)

def indent(self, text, prefix=' '):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

if not text: return ''
lines = [prefix + line for line in text.split('\n')]
if lines: lines[-1] = lines[-1].rstrip()
return '\n'.join(lines)

def section(self, title, contents):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

clean_contents = self.indent(contents).rstrip()
return self.bold(title) + '\n' + clean_contents + '\n\n'

# ---------------------------------------------- type-specific routines

def formattree(self, tree, modname, parent=None, prefix=''):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

result = ''
for entry in tree:
if type(entry) is type(()):
c, bases = entry
result = result + prefix + classname(c, modname)
if bases and bases != (parent,):
parents = (classname(c, modname) for c in bases)
result = result + '(%s)' % ', '.join(parents)
result = result + '\n'
elif type(entry) is type([]):
result = result + self.formattree(
entry, modname, c, prefix + ' ')
return result

def docmodule(self, object, name=None, mod=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

name = object.__name__ # ignore the passed-in name
synop, desc = splitdoc(getdoc(object))
result = self.section('NAME', name + (synop and ' - ' + synop))
all = getattr(object, '__all__', None)
docloc = self.getdocloc(object)
if docloc is not None:
result = result + self.section('MODULE REFERENCE', docloc +
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:
)

if desc:
result = result + self.section('DESCRIPTION', desc)

classes = []
for key, value in inspect.getmembers(object, inspect.isclass):
# if __all__ exists, believe it. Otherwise use old heuristic.
if (all is not None
or (inspect.getmodule(value) or object) is object):
if visiblename(key, all, object):
classes.append((key, value))
funcs = []
for key, value in inspect.getmembers(object, inspect.isroutine):
# if __all__ exists, believe it. Otherwise use old heuristic.
if (all is not None or
inspect.isbuiltin(value) or inspect.getmodule(value) is object):
if visiblename(key, all, object):
funcs.append((key, value))
data = []
for key, value in inspect.getmembers(object, isdata):
if visiblename(key, all, object):
data.append((key, value))

modpkgs = []
modpkgs_names = set()
if hasattr(object, '__path__'):
for importer, modname, ispkg in pkgutil.iter_modules(object.__path__):
modpkgs_names.add(modname)
if ispkg:
modpkgs.append(modname + ' (package)')
else:
modpkgs.append(modname)

modpkgs.sort()
result = result + self.section(
'PACKAGE CONTENTS', '\n'.join(modpkgs))

# Detect submodules as sometimes created by C extensions
submodules = []
for key, value in inspect.getmembers(object, inspect.ismodule):
if value.__name__.startswith(name + '.') and key not in modpkgs_names:
submodules.append(key)
if submodules:
submodules.sort()
result = result + self.section(
'SUBMODULES', '\n'.join(submodules))

if classes:
classlist = [value for key, value in classes]
contents = [self.formattree(
inspect.getclasstree(classlist, 1), name)]
for key, value in classes:
contents.append(self.document(value, key, name))
result = result + self.section('CLASSES', '\n'.join(contents))

if funcs:
contents = []
for key, value in funcs:
contents.append(self.document(value, key, name))
result = result + self.section('FUNCTIONS', '\n'.join(contents))

if data:
contents = []
for key, value in data:
contents.append(self.docother(value, key, name, maxlen=70))
result = result + self.section('DATA', '\n'.join(contents))

if hasattr(object, '__version__'):
version = str(object.__version__)
if version[:11] == '$' + 'Revision: ' and version[-1:] == '$':
version = version[11:-1].strip()
result = result + self.section('VERSION', version)
if hasattr(object, '__date__'):
result = result + self.section('DATE', str(object.__date__))
if hasattr(object, '__author__'):
result = result + self.section('AUTHOR', str(object.__author__))
if hasattr(object, '__credits__'):
result = result + self.section('CREDITS', str(object.__credits__))
try:
file = inspect.getabsfile(object)
except TypeError:
file = '(built-in)'
result = result + self.section('FILE', file)
return result

def docclass(self, object, name=None, mod=None, *ignored):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

realname = object.__name__
name = name or realname
bases = object.__bases__

def makename(c, m=object.__module__):
return classname(c, m)

if name == realname:
title = 'class ' + self.bold(realname)
else:
title = self.bold(name) + ' = class ' + realname
if bases:
parents = map(makename, bases)
title = title + '(%s)' % ', '.join(parents)

contents = []
push = contents.append

try:
signature = inspect.signature(object)
except (ValueError, TypeError):
signature = None
if signature:
argspec = str(signature)
if argspec and argspec != '()':
push(name + argspec + '\n')

doc = getdoc(object)
if doc:
push(doc + '\n')

# List the mro, if non-trivial.
mro = deque(inspect.getmro(object))
if len(mro) > 2:
push("Method resolution order:")
for base in mro:
push(' ' + makename(base))
push('')

# Cute little class to pump out a horizontal rule between sections.
class HorizontalRule:
def __init__(self):
self.needone = 0
def maybe(self):
if self.needone:
push('-' * 70)
self.needone = 1
hr = HorizontalRule()

def spill(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
try:
value = getattr(object, name)
except Exception:
# Some descriptors may meet a failure in their __get__.
# (bug #1785)
push(self._docdescriptor(name, value, mod))
else:
push(self.document(value,
name, mod, object))
return attrs

def spilldescriptors(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
push(self._docdescriptor(name, value, mod))
return attrs

def spilldata(msg, attrs, predicate):
ok, attrs = _split_list(attrs, predicate)
if ok:
hr.maybe()
push(msg)
for name, kind, homecls, value in ok:
if callable(value) or inspect.isdatadescriptor(value):
doc = getdoc(value)
else:
doc = None
try:
obj = getattr(object, name)
except AttributeError:
obj = homecls.__dict__[name]
push(self.docother(obj, name, mod, maxlen=70, doc=doc) +
'\n')
return attrs

attrs = [(name, kind, cls, value)
for name, kind, cls, value in classify_class_attrs(object)
if visiblename(name, obj=object)]

while attrs:
if mro:
thisclass = mro.popleft()
else:
thisclass = attrs[0][2]
attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)

if thisclass is builtins.object:
attrs = inherited
continue
elif thisclass is object:
tag = "defined here"
else:
tag = "inherited from %s" % classname(thisclass,
object.__module__)

sort_attributes(attrs, object)

# Pump out the attrs, segregated by kind.
attrs = spill("Methods %s:\n" % tag, attrs,
lambda t: t[1] == 'method')
attrs = spill("Class methods %s:\n" % tag, attrs,
lambda t: t[1] == 'class method')
attrs = spill("Static methods %s:\n" % tag, attrs,
lambda t: t[1] == 'static method')
attrs = spilldescriptors("Data descriptors %s:\n" % tag, attrs,
lambda t: t[1] == 'data descriptor')
attrs = spilldata("Data and other attributes %s:\n" % tag, attrs,
lambda t: t[1] == 'data')

assert attrs == []
attrs = inherited

contents = '\n'.join(contents)
if not contents:
return title + '\n'
return title + '\n' + self.indent(contents.rstrip(), ' | ') + '\n'

def formatvalue(self, object):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return '=' + self.repr(object)

def docroutine(self, object, name=None, mod=None, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

realname = object.__name__
name = name or realname
note = ''
skipdocs = 0
if _is_bound_method(object):
imclass = object.__self__.__class__
if cl:
if imclass is not cl:
note = ' from ' + classname(imclass, mod)
else:
if object.__self__ is not None:
note = ' method of %s instance' % classname(
object.__self__.__class__, mod)
else:
note = ' unbound %s method' % classname(imclass,mod)

if name == realname:
title = self.bold(realname)
else:
if (cl and realname in cl.__dict__ and
cl.__dict__[realname] is object):
skipdocs = 1
title = self.bold(name) + ' = ' + realname
argspec = None

if inspect.isroutine(object):
try:
signature = inspect.signature(object)
except (ValueError, TypeError):
signature = None
if signature:
argspec = str(signature)
if realname == '':
title = self.bold(name) + ' lambda '
# XXX lambda's won't usually have func_annotations['return']
# since the syntax doesn't support but it is possible.
# So removing parentheses isn't truly safe.
argspec = argspec[1:-1] # remove parentheses
if not argspec:
argspec = '(...)'
decl = title + argspec + note

if skipdocs:
return decl + '\n'
else:
doc = getdoc(object) or ''
return decl + '\n' + (doc and self.indent(doc).rstrip() + '\n')

def _docdescriptor(self, name, value, mod):
results = []
push = results.append

if name:
push(self.bold(name))
push('\n')
doc = getdoc(value) or ''
if doc:
push(self.indent(doc))
push('\n')
return ''.join(results)

def docproperty(self, object, name=None, mod=None, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return self._docdescriptor(name, object, mod)

def docdata(self, object, name=None, mod=None, cl=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return self._docdescriptor(name, object, mod)

def docother(self, object, name=None, mod=None, parent=None, maxlen=None, doc=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

repr = self.repr(object)
if maxlen:
line = (name and name + ' = ' or '') + repr
chop = maxlen - len(line)
if chop < 0: repr = repr[:chop] + '...'
line = (name and self.bold(name) + ' = ' or '') + repr
if doc is not None:
line += '\n' + self.indent(str(doc))
return line

class _PlainTextDoc(TextDoc):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

def bold(self, text):
return text

# --------------------------------------------------------- user interfaces

def pager(text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

global pager
pager = getpager()
pager(text)

def getpager():

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

if not hasattr(sys.stdin, "isatty"):
return plainpager
if not hasattr(sys.stdout, "isatty"):
return plainpager
if not sys.stdin.isatty() or not sys.stdout.isatty():
return plainpager
use_pager = os.environ.get('MANPAGER') or os.environ.get('PAGER')
if use_pager:
if sys.platform == 'win32': # pipes completely broken in Windows
return lambda text: tempfilepager(plain(text), use_pager)
elif os.environ.get('TERM') in ('dumb', 'emacs'):
return lambda text: pipepager(plain(text), use_pager)
else:
return lambda text: pipepager(text, use_pager)
if os.environ.get('TERM') in ('dumb', 'emacs'):
return plainpager
if sys.platform == 'win32':
return lambda text: tempfilepager(plain(text), 'more <')
if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0:
return lambda text: pipepager(text, 'less')

import tempfile
(fd, filename) = tempfile.mkstemp()
os.close(fd)
try:
if hasattr(os, 'system') and os.system('more "%s"' % filename) == 0:
return lambda text: pipepager(text, 'more')
else:
return ttypager
finally:
os.unlink(filename)

def plain(text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

return re.sub('.\b', '', text)

def pipepager(text, cmd):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

import subprocess
proc = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE)
try:
with io.TextIOWrapper(proc.stdin, errors='backslashreplace') as pipe:
try:
pipe.write(text)
except KeyboardInterrupt:
# We've hereby abandoned whatever text hasn't been written,
# but the pager is still in control of the terminal.
pass
except OSError:
pass # Ignore broken pipes caused by quitting the pager program.
while True:
try:
proc.wait()
break
except KeyboardInterrupt:
# Ignore ctl-c like the pager itself does. Otherwise the pager is
# left running and the terminal is in raw mode and unusable.
pass

def tempfilepager(text, cmd):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

import tempfile
filename = tempfile.mktemp()
with open(filename, 'w', errors='backslashreplace') as file:
file.write(text)
try:
os.system(cmd + ' "' + filename + '"')
finally:
os.unlink(filename)

def _escape_stdout(text):
# Escape non-encodable characters to avoid encoding errors later
encoding = getattr(sys.stdout, 'encoding', None) or 'utf-8'
return text.encode(encoding, 'backslashreplace').decode(encoding)

def ttypager(text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

lines = plain(_escape_stdout(text)).split('\n')
try:
import tty
fd = sys.stdin.fileno()
old = tty.tcgetattr(fd)
tty.setcbreak(fd)
getchar = lambda: sys.stdin.read(1)
except (ImportError, AttributeError, io.UnsupportedOperation):
tty = None
getchar = lambda: sys.stdin.readline()[:-1][:1]

try:
try:
h = int(os.environ.get('LINES', 0))
except ValueError:
h = 0
if h <= 1:
h = 25
r = inc = h - 1
sys.stdout.write('\n'.join(lines[:inc]) + '\n')
while lines[r:]:
sys.stdout.write('-- more --')
sys.stdout.flush()
c = getchar()

if c in ('q', 'Q'):
sys.stdout.write('\r \r')
break
elif c in ('\r', '\n'):
sys.stdout.write('\r \r' + lines[r] + '\n')
r = r + 1
continue
if c in ('b', 'B', '\x1b'):
r = r - inc - inc
if r < 0: r = 0
sys.stdout.write('\n' + '\n'.join(lines[r:r+inc]) + '\n')
r = r + inc

finally:
if tty:
tty.tcsetattr(fd, tty.TCSAFLUSH, old)

def plainpager(text):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

sys.stdout.write(plain(_escape_stdout(text)))

def describe(thing):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

if inspect.ismodule(thing):
if thing.__name__ in sys.builtin_module_names:
return 'built-in module ' + thing.__name__
if hasattr(thing, '__path__'):
return 'package ' + thing.__name__
else:
return 'module ' + thing.__name__
if inspect.isbuiltin(thing):
return 'built-in function ' + thing.__name__
if inspect.isgetsetdescriptor(thing):
return 'getset descriptor %s.%s.%s' % (
thing.__objclass__.__module__, thing.__objclass__.__name__,
thing.__name__)
if inspect.ismemberdescriptor(thing):
return 'member descriptor %s.%s.%s' % (
thing.__objclass__.__module__, thing.__objclass__.__name__,
thing.__name__)
if inspect.isclass(thing):
return 'class ' + thing.__name__
if inspect.isfunction(thing):
return 'function ' + thing.__name__
if inspect.ismethod(thing):
return 'method ' + thing.__name__
return type(thing).__name__

def locate(path, forceload=0):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:

parts = [part for part in path.split('.') if part]
module, n = None, 0
while n < len(parts):
nextmodule = safeimport('.'.join(parts[:n+1]), forceload)
if nextmodule: module, n = nextmodule, n + 1
else: break
if module:
object = module
else:
object = builtins
for part in parts[n:]:
try:
object = getattr(object, part)
except AttributeError:
return None
return object

# --------------------------------------- interactive interpreter interface

text = TextDoc()
plaintext = _PlainTextDoc()
html = HTMLDoc()

def resolve(thing, forceload=0):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

if isinstance(thing, str):
object = locate(thing, forceload)
if object is None:
raise ImportError('''\
No Python documentation found for %r.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.''' % thing)
return object, thing
else:
name = getattr(thing, '__name__', None)
return thing, name if isinstance(name, str) else None

def render_doc(thing, title='Python Library Documentation: %s', forceload=0,
renderer=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

if renderer is None:
renderer = text
object, name = resolve(thing, forceload)
desc = describe(object)
module = inspect.getmodule(object)
if name and '.' in name:
desc += ' in ' + name[:name.rfind('.')]
elif module and module is not object:
desc += ' in module ' + module.__name__

if not (inspect.ismodule(object) or
inspect.isclass(object) or
inspect.isroutine(object) or
inspect.isgetsetdescriptor(object) or
inspect.ismemberdescriptor(object) or
isinstance(object, property)):
# If the passed object is a piece of data or an instance,
# document its available methods instead of its value.
object = type(object)
desc += ' object'
return title % desc + '\n\n' + renderer.document(object, name)

def doc(thing, title='Python Library Documentation: %s', forceload=0, renderer=None,
output=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

try:
if output is None:
pager(render_doc(thing, title, forceload, renderer))
else:
output.write(render_doc(thing, title, forceload, plaintext))
except (ImportError, ErrorDuringImport) as value:
print(value)

def writedoc(thing, forceload=0):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:

try:
object, name = resolve(thing, forceload)
page = html.page(describe(object), html.document(object, name))
with open(name + '.html', 'w', encoding='utf-8') as file:
file.write(page)
print('wrote', name + '.html')
except (ImportError, ErrorDuringImport) as value:
print(value)

def writedocs(dir, pkgpath='', done=None):

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __doc__:

if done is None: done = {}
for importer, modname, ispkg in pkgutil.walk_packages([dir], pkgpath):
writedoc(modname)
return

class Helper:

# These dictionaries map a topic name to either an alias, or a tuple
# (label, seealso-items). The "label" is the label of the corresponding
# section in the .rst file under Doc/ and an index into the dictionary
# in pydoc_data/topics.py.
#
# CAUTION: if you change one of these dictionaries, be sure to adapt the
# list of needed labels in Doc/tools/extensions/pyspecific.py and
# regenerate the pydoc_data/topics.py file by running
# make pydoc-topics
# in Doc/ and copying the output file into the Lib/ directory.

keywords = {
'False': '',
'None': '',
'True': '',
'and': 'BOOLEAN',
'as': 'with',
'assert': ('assert', ''),
'async': ('async', ''),
'await': ('await', ''),
'break': ('break', 'while for'),
'class': ('class', 'CLASSES SPECIALMETHODS'),
'continue': ('continue', 'while for'),
'def': ('function', ''),
'del': ('del', 'BASICMETHODS'),
'elif': 'if',
'else': ('else', 'while for'),
'except': 'try',
'finally': 'try',
'for': ('for', 'break continue while'),
'from': 'import',
'global': ('global', 'nonlocal NAMESPACES'),
'if': ('if', 'TRUTHVALUE'),
'import': ('import', 'MODULES'),
'in': ('in', 'SEQUENCEMETHODS'),
'is': 'COMPARISON',
'lambda': ('lambda', 'FUNCTIONS'),
'nonlocal': ('nonlocal', 'global NAMESPACES'),
'not': 'BOOLEAN',
'or': 'BOOLEAN',
'pass': ('pass', ''),
'raise': ('raise', 'EXCEPTIONS'),
'return': ('return', 'FUNCTIONS'),
'try': ('try', 'EXCEPTIONS'),
'while': ('while', 'break continue if TRUTHVALUE'),
'with': ('with', 'CONTEXTMANAGERS EXCEPTIONS yield'),
'yield': ('yield', ''),
}
# Either add symbols to this dictionary or to the symbols dictionary
# directly: Whichever is easier. They are merged later.
_strprefixes = [p + q for p in ('b', 'f', 'r', 'u') for q in ("'", '"')]
_symbols_inverse = {
'STRINGS' : ("'", "'''", '"', '
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Read one line, using input() when appropriate.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Return unbuffered tuple of (topic, xrefs).

If an error occurs here, the exception is caught and displayed by
the url handler.

This function duplicates the showtopic method but returns its
result directly so it can be formatted for display in an html page.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
An interruptible scanner that searches module synopses.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Print all the one-line module summaries that contain a substring.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:
Start an HTTP server thread on a specific port.

Start an HTML/text server thread, so HTML or text documents can be
browsed dynamically and interactively with a Web browser. Example use:

>>> import time
>>> import pydoc

Define a URL handler. To determine what the client is asking
for, check the URL and content_type.

Then get or generate some text or HTML code and return it.

>>> def my_url_handler(url, content_type):
... text = 'the URL sent was: (%s, %s)' % (url, content_type)
... return text

Start server thread on port 0.
If you use port 0, the server will pick a random port number.
You can then use serverthread.port to get the port number.

>>> port = 0
>>> serverthread = pydoc._start_server(my_url_handler, port)

Check that the server is really started. If it is, open browser
and get first page. Use serverthread.url as the starting page.

>>> if serverthread.serving:
... import webbrowser

The next two lines are commented out so a browser doesn't open if
doctest is run on this module.

#... webbrowser.open(serverthread.url)
#True

Let the server do its thing. We just need to monitor its status.
Use time.sleep so the loop doesn't hog the CPU.

>>> starttime = time.time()
>>> timeout = 1 #seconds

This is a short timeout for testing purposes.

>>> while serverthread.serving:
... time.sleep(.01)
... if serverthread.serving and time.time() - starttime > timeout:
... serverthread.stop()
... break

Print any errors that may have occurred.

>>> print(serverthread.error)
None

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Process a request from an HTML browser.

The URL received is in self.path.
Get an HTML page from self.urlhandler and send it.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Start the server.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Stop the server and this thread nicely
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
The pydoc url handler for use with the pydoc server.

If the content_type is 'text/css', the _pydoc.css style
sheet is read and returned if it exits.

If the content_type is 'text/html', then the result of
get_html_page(url) is returned.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Format an HTML page.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:


Python %s
%s






package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Module Index page.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Search results page.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Get and display a source file listing safely.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Index of topic texts available.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Index of keywords.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Topic or keyword help page.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Generate an HTML page for url.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Start the enhanced pydoc Web server and open a Web browser.

Use port '0' to start the server on an arbitrary port.
Set open_browser to False to suppress opening a browser.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Ensures current directory is on returned path, and argv0 directory is not

Exception: argv0 dir is left alone if it's also pydoc's directory.

Returns a new path entry list, or None if no adjustment is needed.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Ensures current directory is on sys.path, and __main__ directory is not.

Exception: __main__ dir is left alone if it's also pydoc's directory.

package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: unkown:
Command-line interface (looks at sys.argv to decide what to do).
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\doc_maker\doc_maker.py, function: __add__:
pydoc - the Python documentation tool

{cmd} ...
Show text documentation on something. may be the name of a
Python keyword, topic, function, module, or package, or a dotted
reference to a class or function within a module or module in a
package. If contains a '{sep}', it is used as the path to a
Python source file to document. If name is 'keywords', 'topics',
or 'modules', a listing of these things is displayed.

{cmd} -k
Search for a keyword in the synopsis lines of all available modules.

{cmd} -n
Start an HTTP server with the given hostname (default: localhost).

{cmd} -p
Start an HTTP server on the given port on the local machine. Port
number 0 can be used to get an arbitrary unused port.

{cmd} -b
Start an HTTP server on an arbitrary unused port and open a Web browser
to interactively browse documentation. This option can be used in
combination with -n and/or -p.

{cmd} -w ...
Write out the HTML documentation for a module to a file in the current
directory. If contains a '{sep}', it is treated as a filename; if
it names a directory, documentation is written for all the contents.







package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\programs\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.
package: C:\Users\matthijs\AppData\Local\Programs\Python\Python37\Lib\site-packages\os_sys\programs\fail.py, function: unkown:
Issue a warning, or maybe ignore it or raise an exception.







os_sys-mail


send_mail(send_from, send_to, subject, text, files=None, server="smtp.ziggo.nl", port=25)
send_from:
who the sender is
send_to:
a list with email-adress(es) to who you want to send it
subject:
your subject
text:
text in your mail
files:
extra files to send with it
server:
your server(this server will work)
port:
the port of the server

os_sys-py-install

build and install files with py-install

setup