pypipr 1.0.75__py3-none-any.whl → 1.0.77__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pypipr/__init__.py +28 -1
- pypipr/ibuiltins/chunk_array.py +3 -3
- pypipr/ibuiltins/get_class_method.py +1 -0
- pypipr/ibuiltins/get_from_index.py +2 -2
- pypipr/iconsole/print_dir.py +1 -0
- pypipr/iconsole/print_log.py +1 -1
- pypipr/iengineering/batch_calculate.py +2 -1
- pypipr/ifunctions/iloads.py +2 -2
- pypipr/ifunctions/iloads_html.py +1 -0
- pypipr/ifunctions/iprint.py +1 -0
- pypipr/terminal.py +7 -1
- pypipr-1.0.77.dist-info/METADATA +1590 -0
- {pypipr-1.0.75.dist-info → pypipr-1.0.77.dist-info}/RECORD +15 -15
- pypipr-1.0.75.dist-info/METADATA +0 -47
- {pypipr-1.0.75.dist-info → pypipr-1.0.77.dist-info}/WHEEL +0 -0
- {pypipr-1.0.75.dist-info → pypipr-1.0.77.dist-info}/entry_points.txt +0 -0
pypipr/__init__.py
CHANGED
@@ -60,4 +60,31 @@ from .ifunctions.iprint import iprint
|
|
60
60
|
from .ifunctions.irange import irange
|
61
61
|
from .ifunctions.ireplace import ireplace
|
62
62
|
from .ifunctions.iscandir import iscandir
|
63
|
-
from .ifunctions.isplit import isplit
|
63
|
+
from .ifunctions.isplit import isplit
|
64
|
+
import colorama
|
65
|
+
import datetime
|
66
|
+
import functools
|
67
|
+
import inspect
|
68
|
+
import io
|
69
|
+
import json
|
70
|
+
import lxml
|
71
|
+
import math
|
72
|
+
import operator
|
73
|
+
import os
|
74
|
+
import pathlib
|
75
|
+
import pint
|
76
|
+
import pprint
|
77
|
+
import queue
|
78
|
+
import random
|
79
|
+
import re
|
80
|
+
import requests
|
81
|
+
import string
|
82
|
+
import subprocess
|
83
|
+
import sys
|
84
|
+
import textwrap
|
85
|
+
import time
|
86
|
+
import tzdata
|
87
|
+
import uuid
|
88
|
+
import webbrowser
|
89
|
+
import yaml
|
90
|
+
import zoneinfo
|
pypipr/ibuiltins/chunk_array.py
CHANGED
@@ -3,9 +3,9 @@ def chunk_array(array, size, start=0):
|
|
3
3
|
Membagi array menjadi potongan-potongan dengan besaran yg diinginkan
|
4
4
|
|
5
5
|
```python
|
6
|
-
|
7
|
-
print(
|
8
|
-
print(list(
|
6
|
+
arr = [2, 3, 12, 3, 3, 42, 42, 1, 43, 2, 42, 41, 4, 24, 32, 42, 3, 12, 32, 42, 42]
|
7
|
+
print(chunk_array(arr, 5))
|
8
|
+
print(list(chunk_array(arr, 5)))
|
9
9
|
```
|
10
10
|
"""
|
11
11
|
for i in range(start, len(array), size):
|
pypipr/iconsole/print_dir.py
CHANGED
pypipr/iconsole/print_log.py
CHANGED
pypipr/ifunctions/iloads.py
CHANGED
@@ -14,14 +14,14 @@ def iloads(data, syntax="yaml"):
|
|
14
14
|
data = {
|
15
15
|
'a': 123,
|
16
16
|
't': ['disini', 'senang', 'disana', 'senang'],
|
17
|
-
'l': (12, 23, [12, 42])
|
17
|
+
'l': (12, 23, [12, 42]),
|
18
18
|
}
|
19
19
|
s = idumps(data)
|
20
20
|
print(iloads(s))
|
21
21
|
```
|
22
22
|
"""
|
23
23
|
if syntax == "yaml":
|
24
|
-
return yaml.
|
24
|
+
return yaml.full_load(data)
|
25
25
|
if syntax == "json":
|
26
26
|
return json.load(data)
|
27
27
|
if syntax == "html":
|
pypipr/ifunctions/iloads_html.py
CHANGED
@@ -18,6 +18,7 @@ def iloads_html(html):
|
|
18
18
|
apabila data berupa table maka dapat dicek type(data) -> html_table
|
19
19
|
|
20
20
|
```python
|
21
|
+
import pprint
|
21
22
|
pprint.pprint(iloads_html(iopen("https://harga-emas.org/")), depth=10)
|
22
23
|
pprint.pprint(iloads_html(iopen("https://harga-emas.org/1-gram/")), depth=10)
|
23
24
|
```
|
pypipr/ifunctions/iprint.py
CHANGED
pypipr/terminal.py
CHANGED
@@ -42,7 +42,13 @@ def main():
|
|
42
42
|
print(f"{i} [{v.default}] : ", end="")
|
43
43
|
o = input()
|
44
44
|
if len(o):
|
45
|
-
|
45
|
+
try:
|
46
|
+
k[i] = eval(o)
|
47
|
+
except Exception:
|
48
|
+
pypipr.print_colorize(
|
49
|
+
"Input harus dalam syntax python.",
|
50
|
+
color=pypipr.colorama.Fore.RED,
|
51
|
+
)
|
46
52
|
|
47
53
|
print()
|
48
54
|
f = f(**k)
|