summaryrefslogtreecommitdiff
path: root/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/progress/spinner.py
diff options
context:
space:
mode:
authorShubham Saini <shubham6405@gmail.com>2018-12-11 10:01:23 +0000
committerShubham Saini <shubham6405@gmail.com>2018-12-11 10:01:23 +0000
commit68df54d6629ec019142eb149dd037774f2d11e7c (patch)
tree345bc22d46b4e01a4ba8303b94278952a4ed2b9e /venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/progress/spinner.py
First commit
Diffstat (limited to 'venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/progress/spinner.py')
-rw-r--r--venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/progress/spinner.py44
1 files changed, 44 insertions, 0 deletions
diff --git a/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/progress/spinner.py b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/progress/spinner.py
new file mode 100644
index 0000000..d67c679
--- /dev/null
+++ b/venv/lib/python3.7/site-packages/pip-10.0.1-py3.7.egg/pip/_vendor/progress/spinner.py
@@ -0,0 +1,44 @@
1# -*- coding: utf-8 -*-
2
3# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
4#
5# Permission to use, copy, modify, and distribute this software for any
6# purpose with or without fee is hereby granted, provided that the above
7# copyright notice and this permission notice appear in all copies.
8#
9# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
17from __future__ import unicode_literals
18from . import Infinite
19from .helpers import WriteMixin
20
21
22class Spinner(WriteMixin, Infinite):
23 message = ''
24 phases = ('-', '\\', '|', '/')
25 hide_cursor = True
26
27 def update(self):
28 i = self.index % len(self.phases)
29 self.write(self.phases[i])
30
31
32class PieSpinner(Spinner):
33 phases = ['◷', '◶', '◵', '◴']
34
35
36class MoonSpinner(Spinner):
37 phases = ['◑', '◒', '◐', '◓']
38
39
40class LineSpinner(Spinner):
41 phases = ['⎺', '⎻', '⎼', '⎽', '⎼', '⎻']
42
43class PixelSpinner(Spinner):
44 phases = ['⣾','⣷', '⣯', '⣟', '⡿', '⢿', '⣻', '⣽']