-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPKG-INFO
More file actions
92 lines (73 loc) · 2.86 KB
/
PKG-INFO
File metadata and controls
92 lines (73 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Metadata-Version: 2.1
Name: uwutilities
Version: 0.1.2
Summary: useful functions in loose
Home-page: https://github.com/kojhyy/uwutilities
Author: kojhyy
Author-email: l4p0ubelle@gmail.com
License: MIT
Description: # bouts de code utiles
## __progress bar__
la barre de progression est un objet qui permet de faire une barre de chargement.
Elle a de nombreuses options:
Args:
steps (int): le nombre de d'étapes
text (str): le message afficher a gauche de la barre
pattern_bar (str): le motif de la barre
pattern_space (str): le motif de l'espace
lenght (int): la longueur de la barre
show_steps (bool): afficher les étapes sur le nombre d'étapes total
show_time (bool): afficher le temps passé sur le temps total
show_time_left (bool): afficher le temps restant
Exemple d'utilisation:
### Code
```python
from uwutilities import bar
import time
Bar = bar(steps=10, text="chargement", lenght=50)
for _ in range(10):
Bar.next()
time.sleep(1)
```
### Resultat
```
chargement | ██████████████████████████████ | 60% [ steps: 6 / 10 | finished in: 0:00:03 ]
```
### Methodes
- next(): avance la barre de chargement
- stop(): arrête la barre de chargement
## __String_tools__
Cette classe permet de modifier des string facilement.
### Methodes
### - replace
Args:
string (str): le string à modifier
*args (str): les strings à remplacer par pair
Returns:
str: le string modifié
#### Code
```python
a = "Hello World"
a = string.replaces(a, "Hello", "Hi", "World", "Earth")
print(a) -> "Hi Earth"
```
### - replaces
Args:
string (str): le string à modifier
index (int): l'index du caractère à remplacer
char (str): le caractère qui remplace
Returns:
str: le string modifié
#### Code
```python
a = "Hello World"
a = string.replace(a, 4, "a")
print(a) -> "Hella World"
```
Platform: UNKNOWN
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown