xref: /OK3568_Linux_fs/yocto/poky/bitbake/lib/progressbar/__init__.py (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#!/usr/bin/python
2*4882a593Smuzhiyun# -*- coding: utf-8 -*-
3*4882a593Smuzhiyun#
4*4882a593Smuzhiyun# progressbar  - Text progress bar library for Python.
5*4882a593Smuzhiyun# Copyright (c) 2005 Nilton Volpato
6*4882a593Smuzhiyun#
7*4882a593Smuzhiyun# SPDX-License-Identifier: LGPL-2.1-or-later OR BSD-3-Clause-Clear
8*4882a593Smuzhiyun#
9*4882a593Smuzhiyun# This library is free software; you can redistribute it and/or
10*4882a593Smuzhiyun# modify it under the terms of the GNU Lesser General Public
11*4882a593Smuzhiyun# License as published by the Free Software Foundation; either
12*4882a593Smuzhiyun# version 2.1 of the License, or (at your option) any later version.
13*4882a593Smuzhiyun#
14*4882a593Smuzhiyun# This library is distributed in the hope that it will be useful,
15*4882a593Smuzhiyun# but WITHOUT ANY WARRANTY; without even the implied warranty of
16*4882a593Smuzhiyun# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17*4882a593Smuzhiyun# Lesser General Public License for more details.
18*4882a593Smuzhiyun#
19*4882a593Smuzhiyun# You should have received a copy of the GNU Lesser General Public
20*4882a593Smuzhiyun# License along with this library; if not, write to the Free Software
21*4882a593Smuzhiyun# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun"""Text progress bar library for Python.
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunA text progress bar is typically used to display the progress of a long
26*4882a593Smuzhiyunrunning operation, providing a visual cue that processing is underway.
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunThe ProgressBar class manages the current progress, and the format of the line
29*4882a593Smuzhiyunis given by a number of widgets. A widget is an object that may display
30*4882a593Smuzhiyundifferently depending on the state of the progress bar. There are three types
31*4882a593Smuzhiyunof widgets:
32*4882a593Smuzhiyun - a string, which always shows itself
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun - a ProgressBarWidget, which may return a different value every time its
35*4882a593Smuzhiyun   update method is called
36*4882a593Smuzhiyun
37*4882a593Smuzhiyun - a ProgressBarWidgetHFill, which is like ProgressBarWidget, except it
38*4882a593Smuzhiyun   expands to fill the remaining width of the line.
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunThe progressbar module is very easy to use, yet very powerful. It will also
41*4882a593Smuzhiyunautomatically enable features like auto-resizing when the system supports it.
42*4882a593Smuzhiyun"""
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun__author__ = 'Nilton Volpato'
45*4882a593Smuzhiyun__author_email__ = 'first-name dot last-name @ gmail.com'
46*4882a593Smuzhiyun__date__ = '2011-05-14'
47*4882a593Smuzhiyun__version__ = '2.3'
48*4882a593Smuzhiyun
49*4882a593Smuzhiyunfrom .compat import *
50*4882a593Smuzhiyunfrom .widgets import *
51*4882a593Smuzhiyunfrom .progressbar import *
52