pypipr 1.0.163__py3-none-any.whl → 1.0.165__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 CHANGED
@@ -66,6 +66,7 @@ from .ivars import ivars
66
66
  from .log import log
67
67
  from .oct_to_int import oct_to_int
68
68
  from .password_generator import password_generator
69
+ from .path_to_module import path_to_module
69
70
  from .pip_freeze_without_version import pip_freeze_without_version
70
71
  from .pip_update_pypipr import pip_update_pypipr
71
72
  from .poetry_publish import poetry_publish
pypipr/iinput.py CHANGED
@@ -13,17 +13,16 @@ def iinput(*args, **kwargs):
13
13
  iinput(default="...")
14
14
  """
15
15
  global argv_iter
16
-
17
- if not args and not kwargs:
18
- argv_iter = iter(argv)
19
- return
16
+ k = {}
20
17
 
21
18
  try:
22
- return next(argv_iter)
19
+ _next = next(argv_iter)
20
+ if _next != "_":
21
+ return _next
22
+ k["_"] = True
23
23
  except Exception:
24
24
  pass
25
25
 
26
- k = {}
27
26
 
28
27
  def get_args(indeks):
29
28
  try:
@@ -46,11 +45,15 @@ def iinput(*args, **kwargs):
46
45
  except Exception:
47
46
  pass
48
47
 
48
+ use_default = "_" in k
49
49
  no_msg = "msg" not in k
50
50
  no_default = "default" not in k
51
51
  has_msg = "msg" in k
52
52
  has_default = "default" in k
53
53
 
54
+ if use_default and has_default:
55
+ return k["default"]
56
+
54
57
  if has_default and no_msg:
55
58
  return k["default"]
56
59
 
@@ -0,0 +1,28 @@
1
+ import os
2
+
3
+
4
+ def path_to_module(abs_path, indeks=0):
5
+ """
6
+ Mengubah absolute path file menjadi path modul relatif terhadap cwd (current working directory),
7
+ dengan opsi untuk memangkas bagian akhir path berdasarkan indeks.
8
+
9
+ Parameter:
10
+ abs_path (str): Path absolut menuju file.
11
+ indeks (int):
12
+ - 0 => hasil lengkap hingga file (tanpa ekstensi),
13
+ - -1 => tanpa nama file, hanya foldernya,
14
+ - -2 => dua folder di atasnya, dst.
15
+
16
+ Returns:
17
+ str: Path bergaya modul Python (dipisah dengan ".")
18
+ """
19
+ cwd = os.getcwd()
20
+ rel_path = os.path.relpath(abs_path, cwd)
21
+ rel_path_no_ext = os.path.splitext(rel_path)[0]
22
+
23
+ parts = rel_path_no_ext.split(os.sep)
24
+
25
+ if indeks < 0:
26
+ parts = parts[: len(parts) + indeks]
27
+
28
+ return ".".join(parts)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pypipr
3
- Version: 1.0.163
3
+ Version: 1.0.165
4
4
  Summary: The Python Package Index Project
5
5
  Author: ufiapjj
6
6
  Author-email: ufiapjj@gmail.com
@@ -248,8 +248,8 @@ iprint(irange("z", "a", 4))
248
248
 
249
249
  Output:
250
250
  ```py
251
- <generator object int_range at 0x75a23ae940>
252
- <generator object int_range at 0x75a23aea40>
251
+ <generator object int_range at 0x75ef9ce940>
252
+ <generator object int_range at 0x75ef9cea40>
253
253
  [13, 12, 11, 10, 9, 8, 7, 6]
254
254
  [2, 5, 8]
255
255
  []
@@ -281,7 +281,7 @@ print(list(batchmaker(s)))
281
281
 
282
282
  Output:
283
283
  ```py
284
- <generator object batchmaker at 0x75a23bf1c0>
284
+ <generator object batchmaker at 0x75ef9e71c0>
285
285
  ['Urutan 1 dan 10 dan j dan Z saja.', 'Urutan 1 dan 10 dan j dan K saja.', 'Urutan 1 dan 10 dan j dan saja.']
286
286
  ```
287
287
 
@@ -335,7 +335,7 @@ print(list(batch_calculate("{1 10} m ** {1 3}")))
335
335
 
336
336
  Output:
337
337
  ```py
338
- <generator object batch_calculate at 0x75a23d3300>
338
+ <generator object batch_calculate at 0x75ef9f7300>
339
339
  [('1 m ** 1', <Quantity(1, 'meter')>), ('1 m ** 2', <Quantity(1, 'meter ** 2')>), ('1 m ** 3', <Quantity(1, 'meter ** 3')>)]
340
340
  ```
341
341
 
@@ -441,7 +441,7 @@ print(list(chunk_array(arr, 5)))
441
441
 
442
442
  Output:
443
443
  ```py
444
- <generator object chunk_array at 0x75a23b7010>
444
+ <generator object chunk_array at 0x75ef9db010>
445
445
  [[2, 3, 12, 3, 3], [42, 42, 1, 43, 2], [42, 41, 4, 24, 32], [42, 3, 12, 32, 42], [42]]
446
446
  ```
447
447
 
@@ -492,9 +492,9 @@ print(datetime_now("Etc/GMT+7"))
492
492
 
493
493
  Output:
494
494
  ```py
495
- 2025-04-07 19:33:22.061085+07:00
496
- 2025-04-07 12:33:22.062370+00:00
497
- 2025-04-07 05:33:22.065884-07:00
495
+ 2025-04-10 19:56:49.714183+07:00
496
+ 2025-04-10 12:56:49.715899+00:00
497
+ 2025-04-10 05:56:49.722934-07:00
498
498
  ```
499
499
 
500
500
  ## dict_first
@@ -608,7 +608,7 @@ iprint(filter_empty(var))
608
608
 
609
609
  Output:
610
610
  ```py
611
- <generator object filter_empty at 0x75a23b71f0>
611
+ <generator object filter_empty at 0x75ef9db1f0>
612
612
  [1, '0', True, {}, ['eee']]
613
613
  ```
614
614
 
@@ -655,8 +655,8 @@ print(list(get_class_method(ExampleGetClassMethod)))
655
655
 
656
656
  Output:
657
657
  ```py
658
- <generator object get_class_method at 0x75a23d3e60>
659
- [<function ExampleGetClassMethod.a at 0x759f38aca0>, <function ExampleGetClassMethod.b at 0x759f38ab60>, <function ExampleGetClassMethod.c at 0x759f38aac0>, <function ExampleGetClassMethod.d at 0x759f38ad40>]
658
+ <generator object get_class_method at 0x75ef9f7e60>
659
+ [<function ExampleGetClassMethod.a at 0x75ef72ede0>, <function ExampleGetClassMethod.b at 0x75ef72ec00>, <function ExampleGetClassMethod.c at 0x75ef72eca0>, <function ExampleGetClassMethod.d at 0x75ef72ee80>]
660
660
  ```
661
661
 
662
662
  ## get_filesize
@@ -850,6 +850,7 @@ Output:
850
850
  'operator',
851
851
  'os',
852
852
  'password_generator',
853
+ 'path_to_module',
853
854
  'pathlib',
854
855
  'pint',
855
856
  'pip_freeze_without_version',
@@ -1082,7 +1083,7 @@ Output:
1082
1083
 
1083
1084
  ## ienumerate
1084
1085
 
1085
- `ienumerate(iterator, start=0, key=<function int_to_int at 0x75a427a5c0>)`
1086
+ `ienumerate(iterator, start=0, key=<function int_to_int at 0x75f7af25c0>)`
1086
1087
 
1087
1088
  meningkatkan fungsi enumerate() pada python
1088
1089
  untuk key menggunakan huruf dan basis angka lainnya.
@@ -1095,7 +1096,7 @@ iprint(ienumerate(it, key=int_to_chr))
1095
1096
 
1096
1097
  Output:
1097
1098
  ```py
1098
- <generator object ienumerate at 0x75a23b71f0>
1099
+ <generator object ienumerate at 0x75ef9db1f0>
1099
1100
  [('a', 'ini'), ('b', 'contoh'), ('c', 'enumerator')]
1100
1101
  ```
1101
1102
 
@@ -1172,7 +1173,7 @@ print(ijoin(10, ' '))
1172
1173
 
1173
1174
  Output:
1174
1175
  ```py
1175
- asd, qweqw, weq, dfs
1176
+ asd, weq, dfs, qweqw
1176
1177
  ,ini,path,seperti,url,
1177
1178
  ini,path,seperti,url
1178
1179
  <li>satu</li>
@@ -1217,10 +1218,10 @@ pprint.pprint(iloads_html(iopen("https://harga-emas.org/1-gram/")), depth=10)
1217
1218
  Output:
1218
1219
  ```py
1219
1220
  (['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
1220
- [['Harga Emas Hari Ini - Senin, 07 April 2025'],
1221
- ['Spot Emas USD3.027,90 (-9,75) / oz',
1221
+ [['Harga Emas Hari Ini - Kamis, 10 April 2025'],
1222
+ ['Spot Emas USD3.127,37 (+36,33) / oz',
1222
1223
  'Kurs IDR1,00 / USD',
1223
- 'Emas IDR↓97 (-0) / gr'],
1224
+ 'Emas IDR↑101 (+1) / gr'],
1224
1225
  ['LM Antam (Jual)↓1.513.000 (-30.000) / gr',
1225
1226
  'LM Antam (Beli)↓1.366.000 (-30.000) / gr']],
1226
1227
  [['Harga Emas Hari Ini'],
@@ -1243,10 +1244,10 @@ Output:
1243
1244
  'Update harga LM Pegadaian :31 Desember 1969']],
1244
1245
  [['Spot Harga Emas Hari Ini (Market Open)'],
1245
1246
  ['Satuan', 'USD', 'Kurs\xa0Dollar', 'IDR'],
1246
- ['Ounce\xa0(oz)', '3.027,90 (-9,75)', '1,00', '3.028'],
1247
- ['Gram\xa0(gr)', '97,35', '1,00', '97 (-0)'],
1248
- ['Kilogram\xa0(kg)', '97.349,25', '1,00', '97.349'],
1249
- ['Update harga emas :07 April 2025, pukul 19:33Update kurs :14 Maret 2025, '
1247
+ ['Ounce\xa0(oz)', '3.127,37 (+36,33)', '1,00', '3.127'],
1248
+ ['Gram\xa0(gr)', '100,55', '1,00', '101 (+1)'],
1249
+ ['Kilogram\xa0(kg)', '100.547,28', '1,00', '100.547'],
1250
+ ['Update harga emas :10 April 2025, pukul 19:56Update kurs :14 Maret 2025, '
1250
1251
  'pukul 10:13']],
1251
1252
  [['Gram', 'UBS Gold 99.99%'],
1252
1253
  ['Jual', 'Beli'],
@@ -1284,36 +1285,36 @@ Output:
1284
1285
  ['Unit', 'USD', 'IDR'],
1285
1286
  ['Angka', '+/-', 'Angka', '+/-'],
1286
1287
  ['Hari Ini', 'Kurs', '', '', '1', '%'],
1287
- ['oz', '3.037,65', '-9,75-0,32%', '3.038', '-10-0,32%'],
1288
- ['gr', '97,66', '-0,31-0,32%', '98', '-0-0,32%'],
1289
- ['30 Hari', 'Kurs', '', '', '16.315', '-16.314-99,99%'],
1290
- ['oz', '2.911,17', '+116,73+4,01%', '47.495.739', '-47.492.711-99,99%'],
1291
- ['gr', '93,60', '+3,75+4,01%', '1.527.023', '-1.526.926-99,99%'],
1292
- ['2 Bulan', 'Kurs', '', '', '16.308', '-16.307-99,99%'],
1293
- ['oz', '2.849,65', '+178,25+6,26%', '46.472.092', '-46.469.064-99,99%'],
1294
- ['gr', '91,62', '+5,73+6,26', '1.494.112', '-1.494.015-99,99%'],
1295
- ['6 Bulan', 'Kurs', '', '', '15.671', '-15.670-99,99%'],
1296
- ['oz', '2.609,31', '+418,59+16,04%', '40.890.497', '-40.887.469-99,99%'],
1297
- ['gr', '83,89', '+13,46+16,04%', '1.314.660', '-1.314.563-99,99%'],
1288
+ ['oz', '3.091,04', '+36,33+1,18%', '3.091', '+36+1,18%'],
1289
+ ['gr', '99,38', '+1,17+1,18%', '99', '+1+1,18%'],
1290
+ ['30 Hari', 'Kurs', '', '', '16.326', '-16.325-99,99%'],
1291
+ ['oz', '2.916,73', '+210,64+7,22%', '47.618.534', '-47.615.407-99,99%'],
1292
+ ['gr', '93,78', '+6,77+7,22%', '1.530.971', '-1.530.871-99,99%'],
1293
+ ['2 Bulan', 'Kurs', '', '', '16.330', '-16.329-99,99%'],
1294
+ ['oz', '2.861,26', '+266,11+9,30%', '46.724.376', '-46.721.248-99,99%'],
1295
+ ['gr', '91,99', '+8,56+9,30', '1.502.224', '-1.502.123-99,99%'],
1296
+ ['6 Bulan', 'Kurs', '', '', '15.658', '-15.657-99,99%'],
1297
+ ['oz', '2.656,78', '+470,59+17,71%', '41.599.861', '-41.596.734-99,99%'],
1298
+ ['gr', '85,42', '+15,13+17,71%', '1.337.467', '-1.337.366-99,99%'],
1298
1299
  ['1 Tahun', 'Kurs', '', '', '15.907', '-15.906-99,99%'],
1299
- ['oz', '2.329,93', '+697,97+29,96%', '37.062.197', '-37.059.169-99,99%'],
1300
- ['gr', '74,91', '+22,44+29,96%', '1.191.577', '-1.191.480-99,99%'],
1300
+ ['oz', '2.338,57', '+788,80+33,73%', '37.199.633', '-37.196.506-99,99%'],
1301
+ ['gr', '75,19', '+25,36+33,73%', '1.195.996', '-1.195.895-99,99%'],
1301
1302
  ['2 Tahun', 'Kurs', '', '', '15.731', '-15.730-99,99%'],
1302
- ['oz', '1.823,86', '+1.204,04+66,02%', '28.691.142', '-28.688.114-99,99%'],
1303
- ['gr', '58,64', '+38,71+66,02%', '922.442', '-922.344-99,99%'],
1304
- ['3 Tahun', 'Kurs', '', '', '14.359', '-14.358-99,99%'],
1305
- ['oz', '1.941,36', '+1.086,54+55,97%', '27.876.008', '-27.872.980-99,99%'],
1306
- ['gr', '62,42', '+34,93+55,97%', '896.234', '-896.137-99,99%'],
1307
- ['5 Tahun', 'Kurs', '', '', '16.245', '-16.244-99,99%'],
1308
- ['oz', '1.650,14', '+1.377,76+83,49%', '26.806.541', '-26.803.513-99,99%'],
1309
- ['gr', '53,05', '+44,30+83,49%', '861.850', '-861.753-99,99%']])
1303
+ ['oz', '1.823,86', '+1.303,51+71,47%', '28.691.142', '-28.688.014-99,99%'],
1304
+ ['gr', '58,64', '+41,91+71,47%', '922.442', '-922.341-99,99%'],
1305
+ ['3 Tahun', 'Kurs', '', '', '14.365', '-14.364-99,99%'],
1306
+ ['oz', '1.942,64', '+1.184,73+60,99%', '27.906.043', '-27.902.916-99,99%'],
1307
+ ['gr', '62,46', '+38,09+60,99%', '897.200', '-897.100-99,99%'],
1308
+ ['5 Tahun', 'Kurs', '', '', '16.241', '-16.240-99,99%'],
1309
+ ['oz', '1.688,78', '+1.438,59+85,19%', '27.427.493', '-27.424.365-99,99%'],
1310
+ ['gr', '54,30', '+46,25+85,19%', '881.814', '-881.714-99,99%']])
1310
1311
  (['Home', 'Emas 1 Gram', 'History', 'Trend', 'Perak 1 Gram', 'Pluang'],
1311
1312
  [[''],
1312
1313
  ['Emas 24 KaratHarga Emas 1 Gram', ''],
1313
- ['USD', '97,35↓', '-0,31-0,32%'],
1314
+ ['USD', '100,55↑', '+1,17+1,18%'],
1314
1315
  ['KURS', '16.355,25↓', '%'],
1315
- ['IDR', '1.592.171,25↓', '-5.126,88-0,32%'],
1316
- ['Senin, 07 April 2025 19:33']],
1316
+ ['IDR', '1.644.475,91↑', '+19.103,53+1,18%'],
1317
+ ['Kamis, 10 April 2025 19:56']],
1317
1318
  [[''],
1318
1319
  ['Emas 1 Gram (IDR)Emas 1 Gram (USD)Kurs USD-IDR',
1319
1320
  'Hari Ini',
@@ -1324,25 +1325,25 @@ Output:
1324
1325
  '']],
1325
1326
  [['Pergerakkan Harga Emas 1 Gram'],
1326
1327
  ['', 'Penutupan Kemarin', 'Pergerakkan Hari Ini', 'Rata-rata'],
1327
- ['USD', '97,66', '97,35 - 97,66', '97,51'],
1328
+ ['USD', '99,38', '99,38 - 100,55', '99,97'],
1328
1329
  ['KURS', '16.355,25', '16.355,25 - 16.355,25', '16.355,25'],
1329
- ['IDR', '1.597.298,13', '1.592.171,25 - 1.597.298,13', '1.594.734,69'],
1330
+ ['IDR', '1.625.372,38', '1.625.372,38 - 1.644.475,91', '1.634.924,15'],
1330
1331
  [''],
1331
1332
  ['', 'Awal Tahun', 'Pergerakkan YTD', '+/- YTD'],
1332
- ['USD', '84,42', '84,38 - 100,65', '+12,93 (15,32%)'],
1333
+ ['USD', '84,42', '84,38 - 100,65', '+16,13 (19,11%)'],
1333
1334
  ['KURS', '16.220,76', '16.156,70 - 16.387,00', '+134,49 (0,83%)'],
1334
1335
  ['IDR',
1335
1336
  '1.369.306,75',
1336
1337
  '1.368.695,74 - 1.646.100,73',
1337
- '+222.864,50 (16,28%)'],
1338
+ '+275.169,16 (20,10%)'],
1338
1339
  [''],
1339
1340
  ['', 'Tahun Lalu / 52 Minggu', 'Pergerakkan 52 Minggu', '+/- 52 Minggu'],
1340
- ['USD', '74,91', '73,75 - 100,65', '+22,44 (29,96%)'],
1341
- ['KURS', '15.887,75', '15.100,00 - 16.509,65', '+467,50 (2,94%)'],
1341
+ ['USD', '75,37', '73,75 - 100,65', '+25,18 (33,41%)'],
1342
+ ['KURS', '15.877,00', '15.100,00 - 16.509,65', '+478,25 (3,01%)'],
1342
1343
  ['IDR',
1343
- '1.190.135,29',
1344
+ '1.196.609,14',
1344
1345
  '1.181.943,88 - 1.646.100,73',
1345
- '+402.035,96 (33,78%)']])
1346
+ '+447.866,77 (37,43%)']])
1346
1347
  ```
1347
1348
 
1348
1349
  ## iloads
@@ -1472,7 +1473,7 @@ Output:
1472
1473
  ```py
1473
1474
  8
1474
1475
  ['mana', 'aja']
1475
- [<Element a at 0x759f3950e0>, <Element a at 0x759f3cfd40>, <Element a at 0x759f3cfd90>, <Element a at 0x759f3cfde0>, <Element a at 0x759f3cfe30>, <Element a at 0x759f3cfe80>, <Element a at 0x759f3cfed0>, <Element a at 0x759f3cff20>, <Element a at 0x759f3cff70>, <Element a at 0x759f3cffc0>, <Element a at 0x759f3ec050>, <Element a at 0x759f3ec0a0>, <Element a at 0x759f3ec0f0>, <Element a at 0x759f3ec140>, <Element a at 0x759f3ec190>, <Element a at 0x759f3ec1e0>, <Element a at 0x759f3ec230>, <Element a at 0x759f3ec280>]
1476
+ [<Element a at 0x75ef739270>, <Element a at 0x75ef773ed0>, <Element a at 0x75ef773f20>, <Element a at 0x75ef773f70>, <Element a at 0x75ef773fc0>, <Element a at 0x75ef790050>, <Element a at 0x75ef7900a0>, <Element a at 0x75ef7900f0>, <Element a at 0x75ef790140>, <Element a at 0x75ef790190>, <Element a at 0x75ef7901e0>, <Element a at 0x75ef790230>, <Element a at 0x75ef790280>, <Element a at 0x75ef7902d0>, <Element a at 0x75ef790320>, <Element a at 0x75ef790370>, <Element a at 0x75ef7903c0>, <Element a at 0x75ef790410>]
1476
1477
  False
1477
1478
  ```
1478
1479
 
@@ -1542,7 +1543,7 @@ print(list(iscandir("./", recursive=False, scan_file=False)))
1542
1543
 
1543
1544
  Output:
1544
1545
  ```py
1545
- <generator object iscandir at 0x75a23b7100>
1546
+ <generator object iscandir at 0x75ef9db100>
1546
1547
  [PosixPath('.git'), PosixPath('.vscode'), PosixPath('pypipr'), PosixPath('__pycache__'), PosixPath('dist')]
1547
1548
  ```
1548
1549
 
@@ -1575,96 +1576,97 @@ iprint(ivars(__import__('pypipr')))
1575
1576
 
1576
1577
  Output:
1577
1578
  ```py
1578
- {'function': {'avg': <function avg at 0x75acbf0680>,
1579
- 'get_filemtime': <function get_filemtime at 0x75a41cd3a0>,
1580
- 'print_colorize': <function print_colorize at 0x75a41cd580>,
1581
- 'print_log': <function print_log at 0x75a490b4c0>,
1582
- 'console_run': <function console_run at 0x75a41cd440>,
1583
- 'auto_reload': <function auto_reload at 0x75a41ccd60>,
1584
- 'basename': <function basename at 0x75a41cd620>,
1585
- 'chr_to_int': <function chr_to_int at 0x75a41cdbc0>,
1586
- 'int_to_chr': <function int_to_chr at 0x75a41cdc60>,
1587
- 'irange': <function irange at 0x75a41ce160>,
1588
- 'batchmaker': <function batchmaker at 0x75a41cd940>,
1589
- 'calculate': <function calculate at 0x75a41cd4e0>,
1590
- 'batch_calculate': <function batch_calculate at 0x75a41cd6c0>,
1591
- 'bin_to_int': <function bin_to_int at 0x75a41cd8a0>,
1592
- 'is_empty': <function is_empty at 0x75a41cea20>,
1593
- 'exit_if_empty': <function exit_if_empty at 0x75a41ce8e0>,
1594
- 'input_char': <function input_char at 0x75a41ce980>,
1595
- 'choices': <function choices at 0x75a41ceca0>,
1596
- 'chunk_array': <function chunk_array at 0x75a41ced40>,
1597
- 'create_folder': <function create_folder at 0x75a41cede0>,
1598
- 'datetime_from_string': <function datetime_from_string at 0x75a41cee80>,
1599
- 'datetime_now': <function datetime_now at 0x75a41cef20>,
1600
- 'dict_first': <function dict_first at 0x75a41ed1c0>,
1601
- 'dirname': <function dirname at 0x75a41ed260>,
1602
- 'django_clear_migrations': <function django_clear_migrations at 0x75a41ed300>,
1603
- 'django_runserver': <function django_runserver at 0x75a41ed620>,
1604
- 'is_iterable': <function is_iterable at 0x75a41ed9e0>,
1605
- 'to_str': <function to_str at 0x75a41edb20>,
1606
- 'filter_empty': <function filter_empty at 0x75a41ed8a0>,
1607
- 'get_by_index': <function get_by_index at 0x75a41eda80>,
1608
- 'get_class_method': <function get_class_method at 0x75a41edbc0>,
1609
- 'get_filesize': <function get_filesize at 0x75a41edd00>,
1610
- 'github_init': <function github_init at 0x75a41edda0>,
1611
- 'github_pull': <function github_pull at 0x75a41ede40>,
1612
- 'github_push': <function github_push at 0x75a41edf80>,
1613
- 'github_user': <function github_user at 0x75a41ee020>,
1614
- 'hex_to_int': <function hex_to_int at 0x75a41ee0c0>,
1615
- 'iargv': <function iargv at 0x75a41ee160>,
1616
- 'idir': <function idir at 0x75a41ee200>,
1617
- 'idumps_html': <function idumps_html at 0x75a427a0c0>,
1618
- 'idumps': <function idumps at 0x75a41ee2a0>,
1619
- 'int_to_int': <function int_to_int at 0x75a427a5c0>,
1620
- 'ienumerate': <function ienumerate at 0x75a4260900>,
1621
- 'ienv': <function ienv at 0x75a427a480>,
1622
- 'iexec': <function iexec at 0x75a427a660>,
1623
- 'iinput': <function iinput at 0x75a427a700>,
1624
- 'ijoin': <function ijoin at 0x75a427a7a0>,
1625
- 'iloads_html': <function iloads_html at 0x75a427aac0>,
1626
- 'iloads': <function iloads at 0x75ad6a5260>,
1627
- 'int_to_bin': <function int_to_bin at 0x75a427a840>,
1628
- 'int_to_hex': <function int_to_hex at 0x75a427a8e0>,
1629
- 'int_to_oct': <function int_to_oct at 0x75a427ab60>,
1630
- 'is_valid_url': <function is_valid_url at 0x75a427ade0>,
1631
- 'iopen': <function iopen at 0x75a4006980>,
1632
- 'iprint': <function iprint at 0x75a4059940>,
1633
- 'is_raw_string': <function is_raw_string at 0x75a256c220>,
1634
- 'ireplace': <function ireplace at 0x75a2556700>,
1635
- 'is_html': <function is_html at 0x75a256c180>,
1636
- 'iscandir': <function iscandir at 0x75a256c2c0>,
1637
- 'isplit': <function isplit at 0x75a256c360>,
1638
- 'ivars': <function ivars at 0x75a256c400>,
1639
- 'log': <function log at 0x75a256c4a0>,
1640
- 'oct_to_int': <function oct_to_int at 0x75a256c540>,
1641
- 'password_generator': <function password_generator at 0x75a256c5e0>,
1642
- 'pip_freeze_without_version': <function pip_freeze_without_version at 0x75a256c680>,
1643
- 'pip_update_pypipr': <function pip_update_pypipr at 0x75a256c720>,
1644
- 'poetry_publish': <function poetry_publish at 0x75a256c7c0>,
1645
- 'poetry_update_version': <function poetry_update_version at 0x75a256c900>,
1646
- 'print_dir': <function print_dir at 0x75a256ca40>,
1647
- 'print_to_last_line': <function print_to_last_line at 0x75a256cae0>,
1648
- 'random_bool': <function random_bool at 0x75a256cb80>,
1649
- 'repath': <function repath at 0x75a256ccc0>,
1650
- 'restart': <function restart at 0x75a256cd60>,
1651
- 'set_timeout': <function set_timeout at 0x75a256ce00>,
1652
- 'sets_ordered': <function sets_ordered at 0x75a256cea0>,
1653
- 'sqlite_backup': <function sqlite_backup at 0x75a256cf40>,
1654
- 'sqlite_delete_table': <function sqlite_delete_table at 0x75a256cfe0>,
1655
- 'sqlite_get_all_tables': <function sqlite_get_all_tables at 0x75a256cc20>,
1656
- 'sqlite_get_data_table': <function sqlite_get_data_table at 0x75a256d120>,
1657
- 'str_cmp': <function str_cmp at 0x75a256d9e0>,
1658
- 'text_colorize': <function text_colorize at 0x75a256da80>,
1659
- 'tiles': <function tiles at 0x75a256db20>,
1660
- 'traceback_filename': <function traceback_filename at 0x75a256dbc0>,
1661
- 'traceback_framename': <function traceback_framename at 0x75a256dc60>},
1579
+ {'function': {'avg': <function avg at 0x75fb3e8680>,
1580
+ 'get_filemtime': <function get_filemtime at 0x75f7a453a0>,
1581
+ 'print_colorize': <function print_colorize at 0x75f7a45580>,
1582
+ 'print_log': <function print_log at 0x75f81374c0>,
1583
+ 'console_run': <function console_run at 0x75f7a45440>,
1584
+ 'auto_reload': <function auto_reload at 0x75f7a44d60>,
1585
+ 'basename': <function basename at 0x75f7a45620>,
1586
+ 'chr_to_int': <function chr_to_int at 0x75f7a45bc0>,
1587
+ 'int_to_chr': <function int_to_chr at 0x75f7a45c60>,
1588
+ 'irange': <function irange at 0x75f7a46160>,
1589
+ 'batchmaker': <function batchmaker at 0x75f7a45940>,
1590
+ 'calculate': <function calculate at 0x75f7a454e0>,
1591
+ 'batch_calculate': <function batch_calculate at 0x75f7a456c0>,
1592
+ 'bin_to_int': <function bin_to_int at 0x75f7a458a0>,
1593
+ 'is_empty': <function is_empty at 0x75f7a46a20>,
1594
+ 'exit_if_empty': <function exit_if_empty at 0x75f7a468e0>,
1595
+ 'input_char': <function input_char at 0x75f7a46980>,
1596
+ 'choices': <function choices at 0x75f7a46ca0>,
1597
+ 'chunk_array': <function chunk_array at 0x75f7a46d40>,
1598
+ 'create_folder': <function create_folder at 0x75f7a46de0>,
1599
+ 'datetime_from_string': <function datetime_from_string at 0x75f7a46e80>,
1600
+ 'datetime_now': <function datetime_now at 0x75f7a46f20>,
1601
+ 'dict_first': <function dict_first at 0x75f7a651c0>,
1602
+ 'dirname': <function dirname at 0x75f7a65260>,
1603
+ 'django_clear_migrations': <function django_clear_migrations at 0x75f7a65300>,
1604
+ 'django_runserver': <function django_runserver at 0x75f7a65620>,
1605
+ 'is_iterable': <function is_iterable at 0x75f7a659e0>,
1606
+ 'to_str': <function to_str at 0x75f7a65b20>,
1607
+ 'filter_empty': <function filter_empty at 0x75f7a658a0>,
1608
+ 'get_by_index': <function get_by_index at 0x75f7a65a80>,
1609
+ 'get_class_method': <function get_class_method at 0x75f7a65bc0>,
1610
+ 'get_filesize': <function get_filesize at 0x75f7a65d00>,
1611
+ 'github_init': <function github_init at 0x75f7a65da0>,
1612
+ 'github_pull': <function github_pull at 0x75f7a65e40>,
1613
+ 'github_push': <function github_push at 0x75f7a65f80>,
1614
+ 'github_user': <function github_user at 0x75f7a66020>,
1615
+ 'hex_to_int': <function hex_to_int at 0x75f7a660c0>,
1616
+ 'iargv': <function iargv at 0x75f7a66160>,
1617
+ 'idir': <function idir at 0x75f7a66200>,
1618
+ 'idumps_html': <function idumps_html at 0x75f7af20c0>,
1619
+ 'idumps': <function idumps at 0x75f7a662a0>,
1620
+ 'int_to_int': <function int_to_int at 0x75f7af25c0>,
1621
+ 'ienumerate': <function ienumerate at 0x75f7ad8900>,
1622
+ 'ienv': <function ienv at 0x75f7af2480>,
1623
+ 'iexec': <function iexec at 0x75f7af2660>,
1624
+ 'iinput': <function iinput at 0x75f7af2700>,
1625
+ 'ijoin': <function ijoin at 0x75f7af27a0>,
1626
+ 'iloads_html': <function iloads_html at 0x75f7af2ac0>,
1627
+ 'iloads': <function iloads at 0x75fbea1260>,
1628
+ 'int_to_bin': <function int_to_bin at 0x75f7af2840>,
1629
+ 'int_to_hex': <function int_to_hex at 0x75f7af28e0>,
1630
+ 'int_to_oct': <function int_to_oct at 0x75f7af2b60>,
1631
+ 'is_valid_url': <function is_valid_url at 0x75f7af2de0>,
1632
+ 'iopen': <function iopen at 0x75f788a980>,
1633
+ 'iprint': <function iprint at 0x75f78dd940>,
1634
+ 'is_raw_string': <function is_raw_string at 0x75efb70220>,
1635
+ 'ireplace': <function ireplace at 0x75efb56700>,
1636
+ 'is_html': <function is_html at 0x75efb70180>,
1637
+ 'iscandir': <function iscandir at 0x75efb702c0>,
1638
+ 'isplit': <function isplit at 0x75efb70360>,
1639
+ 'ivars': <function ivars at 0x75efb70400>,
1640
+ 'log': <function log at 0x75efb704a0>,
1641
+ 'oct_to_int': <function oct_to_int at 0x75efb70540>,
1642
+ 'password_generator': <function password_generator at 0x75efb705e0>,
1643
+ 'path_to_module': <function path_to_module at 0x75efb70720>,
1644
+ 'pip_freeze_without_version': <function pip_freeze_without_version at 0x75efb707c0>,
1645
+ 'pip_update_pypipr': <function pip_update_pypipr at 0x75efb70680>,
1646
+ 'poetry_publish': <function poetry_publish at 0x75efb70900>,
1647
+ 'poetry_update_version': <function poetry_update_version at 0x75efb70a40>,
1648
+ 'print_dir': <function print_dir at 0x75efb70b80>,
1649
+ 'print_to_last_line': <function print_to_last_line at 0x75efb70c20>,
1650
+ 'random_bool': <function random_bool at 0x75efb70cc0>,
1651
+ 'repath': <function repath at 0x75efb70e00>,
1652
+ 'restart': <function restart at 0x75efb70ea0>,
1653
+ 'set_timeout': <function set_timeout at 0x75efb70f40>,
1654
+ 'sets_ordered': <function sets_ordered at 0x75efb70fe0>,
1655
+ 'sqlite_backup': <function sqlite_backup at 0x75efb71080>,
1656
+ 'sqlite_delete_table': <function sqlite_delete_table at 0x75efb71120>,
1657
+ 'sqlite_get_all_tables': <function sqlite_get_all_tables at 0x75efb711c0>,
1658
+ 'sqlite_get_data_table': <function sqlite_get_data_table at 0x75efb71260>,
1659
+ 'str_cmp': <function str_cmp at 0x75efb71b20>,
1660
+ 'text_colorize': <function text_colorize at 0x75efb71bc0>,
1661
+ 'tiles': <function tiles at 0x75efb71c60>,
1662
+ 'traceback_filename': <function traceback_filename at 0x75efb71d00>,
1663
+ 'traceback_framename': <function traceback_framename at 0x75efb71da0>},
1662
1664
  'class': {'ComparePerformance': <class 'pypipr.ComparePerformance.ComparePerformance'>,
1663
1665
  'PintUregQuantity': <class 'pint.Quantity'>,
1664
1666
  'RunParallel': <class 'pypipr.RunParallel.RunParallel'>,
1665
1667
  'TextCase': <class 'pypipr.TextCase.TextCase'>},
1666
1668
  'variable': {'LINUX': True,
1667
- 'PintUreg': <pint.registry.UnitRegistry object at 0x75acbe8c50>,
1669
+ 'PintUreg': <pint.registry.UnitRegistry object at 0x75f811fef0>,
1668
1670
  'WINDOWS': False},
1669
1671
  'module': {'asyncio': <module 'asyncio' from '/data/data/com.termux/files/usr/lib/python3.12/asyncio/__init__.py'>,
1670
1672
  'colorama': <module 'colorama' from '/data/data/com.termux/files/home/.cache/pypoetry/virtualenvs/pypipr-ZoJyDxLL-py3.12/lib/python3.12/site-packages/colorama/__init__.py'>,
@@ -1755,9 +1757,26 @@ print(password_generator())
1755
1757
 
1756
1758
  Output:
1757
1759
  ```py
1758
- fX#G7m>$
1760
+ ){\eT\5r
1759
1761
  ```
1760
1762
 
1763
+ ## path_to_module
1764
+
1765
+ `path_to_module(abs_path, indeks=0)`
1766
+
1767
+ Mengubah absolute path file menjadi path modul relatif terhadap cwd (current working directory),
1768
+ dengan opsi untuk memangkas bagian akhir path berdasarkan indeks.
1769
+
1770
+ Parameter:
1771
+ abs_path (str): Path absolut menuju file.
1772
+ indeks (int):
1773
+ - 0 => hasil lengkap hingga file (tanpa ekstensi),
1774
+ - -1 => tanpa nama file, hanya foldernya,
1775
+ - -2 => dua folder di atasnya, dst.
1776
+
1777
+ Returns:
1778
+ str: Path bergaya modul Python (dipisah dengan ".")
1779
+
1761
1780
  ## pip_freeze_without_version
1762
1781
 
1763
1782
  `pip_freeze_without_version(filename=None)`
@@ -1817,7 +1836,7 @@ Output:
1817
1836
  __enter__ : https:/www.google.com
1818
1837
  __fspath__ : https:/www.google.com
1819
1838
  __getstate__ : (None, {'_raw_paths': ['https://www.google.com/'], '_drv': '', '_root': '', '_tail_cached': ['https:', 'www.google.com'], '_str': 'https:/www.google.com'})
1820
- __hash__ : -8098091776194402627
1839
+ __hash__ : 1392798696252938022
1821
1840
  __init__ : None
1822
1841
  __init_subclass__ : None
1823
1842
  __module__ : pathlib
@@ -1829,7 +1848,7 @@ Output:
1829
1848
  __subclasshook__ : NotImplemented
1830
1849
  _drv :
1831
1850
  _flavour : <module 'posixpath' (frozen)>
1832
- _hash : -8098091776194402627
1851
+ _hash : 1392798696252938022
1833
1852
  _lines : https:
1834
1853
  www.google.com
1835
1854
  _lines_cached : https:
@@ -1863,7 +1882,7 @@ _parts_normcase_cached : ['https:', 'www.google.com']
1863
1882
  is_reserved : False
1864
1883
  is_socket : False
1865
1884
  is_symlink : False
1866
- iterdir : <generator object Path.iterdir at 0x75a23c3e00>
1885
+ iterdir : <generator object Path.iterdir at 0x75ef74d2f0>
1867
1886
  joinpath : .
1868
1887
  name :
1869
1888
  parent : https:/www.google.com
@@ -1874,7 +1893,7 @@ _parts_normcase_cached : ['https:', 'www.google.com']
1874
1893
  stem :
1875
1894
  suffix :
1876
1895
  suffixes : []
1877
- walk : <generator object Path.walk at 0x75a2633d80>
1896
+ walk : <generator object Path.walk at 0x75efc3bd80>
1878
1897
  with_segments : .
1879
1898
  ```
1880
1899
 
@@ -1916,7 +1935,7 @@ print(random_bool())
1916
1935
 
1917
1936
  Output:
1918
1937
  ```py
1919
- True
1938
+ False
1920
1939
  ```
1921
1940
 
1922
1941
  ## repath
@@ -1954,7 +1973,7 @@ x.cancel()
1954
1973
 
1955
1974
  Output:
1956
1975
  ```py
1957
- <Timer(Thread-2, started 505155665136)>
1976
+ <Timer(Thread-2, started 506506099952)>
1958
1977
  menghentikan timeout 7
1959
1978
  ```
1960
1979
 
@@ -1972,7 +1991,7 @@ print(list(sets_ordered(array)))
1972
1991
 
1973
1992
  Output:
1974
1993
  ```py
1975
- <generator object sets_ordered at 0x759f3aec20>
1994
+ <generator object sets_ordered at 0x75ef74ecf0>
1976
1995
  [2, 3, 12, 42, 1, 43, 41, 4, 24, 32]
1977
1996
  ```
1978
1997
 
@@ -2094,15 +2113,15 @@ print(ExampleComparePerformance().compare_performance())
2094
2113
 
2095
2114
  Output:
2096
2115
  ```py
2097
- {'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at 0x75a240cac0>,
2116
+ {'a': <generator object ExampleComparePerformance.a.<locals>.<genexpr> at 0x75efa30ac0>,
2098
2117
  'b': (0, 1, 2, 3, 4, 5, 6, 7, 8, 9),
2099
2118
  'c': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
2100
2119
  'd': [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]}
2101
- {'a': 171, 'b': 189, 'c': 100, 'd': 161}
2102
- {'a': 138, 'b': 171, 'c': 100, 'd': 173}
2103
- {'a': 123, 'b': 176, 'c': 100, 'd': 176}
2104
- {'a': 129, 'b': 177, 'c': 100, 'd': 176}
2105
- {'a': 120, 'b': 173, 'c': 99, 'd': 171}
2120
+ {'a': 100, 'b': 187, 'c': 164, 'd': 162}
2121
+ {'a': 100, 'b': 166, 'c': 127, 'd': 167}
2122
+ {'a': 100, 'b': 167, 'c': 115, 'd': 168}
2123
+ {'a': 100, 'b': 167, 'c': 120, 'd': 169}
2124
+ {'a': 100, 'b': 176, 'c': 120, 'd': 176}
2106
2125
  ```
2107
2126
 
2108
2127
  ## PintUregQuantity
@@ -5,7 +5,7 @@ pypipr/PintUregQuantity.py,sha256=ErSZKB-GHShi1zKac30XgFdBwAUrxMo80IQzIjQ2HVc,11
5
5
  pypipr/RunParallel.py,sha256=a7Fa0YrnCeXakdgLTd2BYjB6Ck6vvZ1gIaTS7ZISmSg,6536
6
6
  pypipr/TextCase.py,sha256=v62BsRiJUSOqYZM9BHTKvQtF6rWgaug5F0XirXNlens,2896
7
7
  pypipr/WINDOWS.py,sha256=NMW-94lzdqwfEWv2lF_i2GcSHJFDwWjccFufpymg4-E,83
8
- pypipr/__init__.py,sha256=C30OOH87tRf56r7HDMOXqcvjcMP1eVT-B7vSBvR3ax4,3794
8
+ pypipr/__init__.py,sha256=0kyjPgg0TIfDiiQl7IO-7uMbxt_lZPuxSSsXTMgrf88,3837
9
9
  pypipr/__terminal__.py,sha256=N_NEXa0V5QLb-dkP1Vp_fYKNjE4jGTqkiYNwPPOXZtw,1412
10
10
  pypipr/auto_reload.py,sha256=FGchFBjQs_eT7CmOMLNYoch-17q7ySFOnPx5z1kbH3E,918
11
11
  pypipr/avg.py,sha256=wUtX3x8dgLoODhQLyMB-HRMVo8Ha2yz3cp7lgcUNbr0,218
@@ -43,7 +43,7 @@ pypipr/idumps_html.py,sha256=IdDLF3YB7fKvoCjeQC4pLhrVdeWFpVupnSDeI_TsqEY,1428
43
43
  pypipr/ienumerate.py,sha256=7JBtPt5LVa7lTzbAx0WMoML6pgkx50Qpw9PLgUpp9sc,411
44
44
  pypipr/ienv.py,sha256=DYFz_liUc4yYGKBqgVSLY0GBCsarfmRqVGsMjhTdRbc,657
45
45
  pypipr/iexec.py,sha256=nK_WMRK2LnyZh9i7NpYii_bfDZUKfAsJ5PVf5ZrHuRo,465
46
- pypipr/iinput.py,sha256=hJu6O8J0IImdgqEFpp6uh5MkH6NntexpqJbMcOeN0c4,1158
46
+ pypipr/iinput.py,sha256=FF2mplVAUIkO5Hm2tO4EXgTCUe1hoGO-GedVsk5YOr4,1244
47
47
  pypipr/ijoin.py,sha256=2qi9Dx3t1ksZShC6a15FAJ-A8DnscohZxZFXwYM_x0g,2036
48
48
  pypipr/iloads.py,sha256=eyvSgqDxOXzU5dcPDT8cbtGtUIfjogxOqeQfwIhc92Q,638
49
49
  pypipr/iloads_html.py,sha256=HwpSvnV5PgjtPcXeYUeC_NovQ3jeKvGKkL3s4GfdVr8,4152
@@ -68,6 +68,7 @@ pypipr/ivars.py,sha256=gTSQKis1hp71opy-p9btmvXfxpaIzD1FScNkKdrizyQ,737
68
68
  pypipr/log.py,sha256=aQ9DeFG03xIAUQYR4TiBdh80M6WvxDtNDTSjpKOSXHk,1041
69
69
  pypipr/oct_to_int.py,sha256=IoI_XOFZi6yzmqAirGIP6YWRgghU7IcPWzUk5DO1ZVo,191
70
70
  pypipr/password_generator.py,sha256=O0KagbEEZnwm9OGy71G-wWvW1sJLdAmZNtlT4KKMrN4,357
71
+ pypipr/path_to_module.py,sha256=eAVrm3Qeg2H_GAlmkzeU8f-XO_tKRYuO1MSdT7vTuSU,822
71
72
  pypipr/pip_freeze_without_version.py,sha256=txQ7zn-RCEsO94XK-IhSZtMgDUHvoMJm0kO0j07WEjM,675
72
73
  pypipr/pip_update_pypipr.py,sha256=bKQ-7cReZHwQYcvkm9bVxbexdda1oz7jGXPsjdr-DnQ,147
73
74
  pypipr/poetry_publish.py,sha256=2mebYHdjQ3PKaZsif_r1Nz4N-PEaoozPf4S6sm5nVkw,349
@@ -91,7 +92,7 @@ pypipr/tiles.py,sha256=uSEYqvjBQHIz7pZKtdta1XwFhGrMFieMHOH2DKrlcXc,328
91
92
  pypipr/to_str.py,sha256=vSuspf-ZQldf4enkssa9XH0WMjkmWug51G9ia0K5occ,597
92
93
  pypipr/traceback_filename.py,sha256=4o85J0N8clI0cM6NTGcKZ4zxR9yS7W2NS_bz3J2_PnY,288
93
94
  pypipr/traceback_framename.py,sha256=_mullrAZzMhBFEFVCgdsmkYQmYUkd58o-J-HuMntKyc,291
94
- pypipr-1.0.163.dist-info/METADATA,sha256=xS2kAyU4hiiVagD9iDL6gx5SpbnB9EyYrLRgPDoOAho,57174
95
- pypipr-1.0.163.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
96
- pypipr-1.0.163.dist-info/entry_points.txt,sha256=XEBtOa61BCVW4cVvoqYQnyTcenJ1tzFFB09YnuqlKBY,51
97
- pypipr-1.0.163.dist-info/RECORD,,
95
+ pypipr-1.0.165.dist-info/METADATA,sha256=Y0cPkmWJjBqGhPnr-bR1IaNk-E3ltkgbzAVq67CjZlI,57817
96
+ pypipr-1.0.165.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
97
+ pypipr-1.0.165.dist-info/entry_points.txt,sha256=XEBtOa61BCVW4cVvoqYQnyTcenJ1tzFFB09YnuqlKBY,51
98
+ pypipr-1.0.165.dist-info/RECORD,,