atomicshop 2.17.0__py3-none-any.whl → 2.17.2__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.
Potentially problematic release.
This version of atomicshop might be problematic. Click here for more details.
- atomicshop/__init__.py +1 -1
- atomicshop/archiver/search_in_archive.py +1 -11
- atomicshop/venvs.py +28 -0
- {atomicshop-2.17.0.dist-info → atomicshop-2.17.2.dist-info}/METADATA +1 -1
- {atomicshop-2.17.0.dist-info → atomicshop-2.17.2.dist-info}/RECORD +8 -7
- {atomicshop-2.17.0.dist-info → atomicshop-2.17.2.dist-info}/LICENSE.txt +0 -0
- {atomicshop-2.17.0.dist-info → atomicshop-2.17.2.dist-info}/WHEEL +0 -0
- {atomicshop-2.17.0.dist-info → atomicshop-2.17.2.dist-info}/top_level.txt +0 -0
atomicshop/__init__.py
CHANGED
|
@@ -35,16 +35,6 @@ def _get_unique_filename(directory, filename):
|
|
|
35
35
|
return unique_filename
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
def _is_zip_file(file, zip_obj):
|
|
39
|
-
with zip_obj.open(file) as file_data:
|
|
40
|
-
return zips.is_zip_zipfile(file_data.read())
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def _is_7z_file(file, sevenz_obj):
|
|
44
|
-
with sevenz_obj.open(file) as file_data:
|
|
45
|
-
return sevenzs.is_7z(file_data.read())
|
|
46
|
-
|
|
47
|
-
|
|
48
38
|
def _match_file_name(target, current, case_sensitive):
|
|
49
39
|
if case_sensitive:
|
|
50
40
|
return current.endswith(target)
|
|
@@ -139,7 +129,7 @@ def _search_in_archive(
|
|
|
139
129
|
if callback_matched:
|
|
140
130
|
_handle_file_extraction(item, extract_file_to_path, archived_file_bytes)
|
|
141
131
|
else:
|
|
142
|
-
if recursive and (
|
|
132
|
+
if recursive and (zips.is_zip_zipfile(archived_file_bytes) or sevenzs.is_7z(archived_file_bytes)):
|
|
143
133
|
_search_archive_content(
|
|
144
134
|
archived_file_bytes, file_names, results, found_set, case_sensitive, return_first_only,
|
|
145
135
|
recursive, callback_functions, extract_file_to_path)
|
atomicshop/venvs.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import os
|
|
3
|
+
from typing import Union
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def is_running_venv() -> Union[str, None]:
|
|
7
|
+
"""
|
|
8
|
+
Check if the script is running in a virtual environment.
|
|
9
|
+
|
|
10
|
+
:return: string of the virtual environment path if it is running in a virtual environment, None otherwise.
|
|
11
|
+
"""
|
|
12
|
+
if hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix):
|
|
13
|
+
return sys.prefix
|
|
14
|
+
else:
|
|
15
|
+
return None
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def add_venv_to_path():
|
|
19
|
+
"""
|
|
20
|
+
Add the virtual environment to the PATH environment variable.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
venv_environment = is_running_venv()
|
|
24
|
+
if venv_environment:
|
|
25
|
+
# We're in a virtual environment, so modify the PATH
|
|
26
|
+
venv_bin = os.path.join(venv_environment, 'bin')
|
|
27
|
+
# Prepend the virtual environment's bin directory to the existing PATH
|
|
28
|
+
os.environ['PATH'] = f"{venv_bin}:{os.environ['PATH']}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
atomicshop/__init__.py,sha256=
|
|
1
|
+
atomicshop/__init__.py,sha256=fZxhx9GigOSbMFUY_dyKq_MeAvWRB0kkmUwCZ3ILy2A,123
|
|
2
2
|
atomicshop/_basics_temp.py,sha256=6cu2dd6r2dLrd1BRNcVDKTHlsHs_26Gpw8QS6v32lQ0,3699
|
|
3
3
|
atomicshop/_create_pdf_demo.py,sha256=Yi-PGZuMg0RKvQmLqVeLIZYadqEZwUm-4A9JxBl_vYA,3713
|
|
4
4
|
atomicshop/_patch_import.py,sha256=ENp55sKVJ0e6-4lBvZnpz9PQCt3Otbur7F6aXDlyje4,6334
|
|
@@ -43,6 +43,7 @@ atomicshop/tempfiles.py,sha256=uq1ve2WlWehZ3NOTXJnpBBMt6HyCdBufqedF0HyzA6k,2517
|
|
|
43
43
|
atomicshop/timer.py,sha256=7Zw1KRV0acHCRATMnanyX2MLBb63Hc-6us3rCZ9dNlY,2345
|
|
44
44
|
atomicshop/urls.py,sha256=aJ0NGS9qqaKeqjkkWBs80jaBBg6MYBiPuLIyPGxscVc,1557
|
|
45
45
|
atomicshop/uuids.py,sha256=JSQdm3ZTJiwPQ1gYe6kU0TKS_7suwVrHc8JZDGYlydM,2214
|
|
46
|
+
atomicshop/venvs.py,sha256=D9lwOoObkYoRx-weuoAmbvN-RdSHhVm4DE9TVl-utAs,903
|
|
46
47
|
atomicshop/virtualization.py,sha256=LPP4vjE0Vr10R6DA4lqhfX_WaNdDGRAZUW0Am6VeGco,494
|
|
47
48
|
atomicshop/web.py,sha256=GLdTXgMxg1_0UQaXC4bOvARVyuFg7SPIeJdsCHV8rNE,11662
|
|
48
49
|
atomicshop/websocket_parse.py,sha256=bkOwiXCNw5bQg1J4KOG7es5kUGysyX2NdfFFVBceSzg,16662
|
|
@@ -76,7 +77,7 @@ atomicshop/addons/process_list/compiled/Win10x64/process_list.exp,sha256=cbvukIT
|
|
|
76
77
|
atomicshop/addons/process_list/compiled/Win10x64/process_list.lib,sha256=T2Ncs0MwKlAaCq8UKFMvfQAfcJdDx-nWiHVBfglrLIU,2112
|
|
77
78
|
atomicshop/archiver/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
78
79
|
atomicshop/archiver/_search_in_zip.py,sha256=dd8qFSvIhcKmtnPj_uYNJFPmMwZp4tZys0kKgTw_ACw,8385
|
|
79
|
-
atomicshop/archiver/search_in_archive.py,sha256=
|
|
80
|
+
atomicshop/archiver/search_in_archive.py,sha256=tCbYZZ53oJrdjatj8_AYre6AZujuii4wRF42PH9falY,11865
|
|
80
81
|
atomicshop/archiver/sevenz_app_w.py,sha256=BWcJb4f7jZEiETDBKyNLE0f5YLFPQx6B91_ObEIXWf8,3007
|
|
81
82
|
atomicshop/archiver/sevenzs.py,sha256=5i_C50-deC1Cz_GQdMGofV2jeMPbbGWAvih-QnA72cg,1370
|
|
82
83
|
atomicshop/archiver/shutils.py,sha256=BomnK7zT-nQXA1z0i2R2aTv8eu88wPx7tf2HtOdbmEc,1280
|
|
@@ -318,8 +319,8 @@ atomicshop/wrappers/socketw/ssl_base.py,sha256=kmiif84kMhBr5yjQW17p935sfjR5JKG0L
|
|
|
318
319
|
atomicshop/wrappers/socketw/statistics_csv.py,sha256=SDYI1cN0oaapvPeLxSXiJrelTy6xbZl-bopR0jAjVGE,3149
|
|
319
320
|
atomicshop/wrappers/winregw/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
320
321
|
atomicshop/wrappers/winregw/winreg_network.py,sha256=zZQfps-CdODQaTUADbHAwKHr5RUg7BLafnKWBbKaLN4,8728
|
|
321
|
-
atomicshop-2.17.
|
|
322
|
-
atomicshop-2.17.
|
|
323
|
-
atomicshop-2.17.
|
|
324
|
-
atomicshop-2.17.
|
|
325
|
-
atomicshop-2.17.
|
|
322
|
+
atomicshop-2.17.2.dist-info/LICENSE.txt,sha256=lLU7EYycfYcK2NR_1gfnhnRC8b8ccOTElACYplgZN88,1094
|
|
323
|
+
atomicshop-2.17.2.dist-info/METADATA,sha256=zpoROqa6g64vizJD01vVwLmwAaztvWVl_nmBKaceXL4,10499
|
|
324
|
+
atomicshop-2.17.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
325
|
+
atomicshop-2.17.2.dist-info/top_level.txt,sha256=EgKJB-7xcrAPeqTRF2laD_Np2gNGYkJkd4OyXqpJphA,11
|
|
326
|
+
atomicshop-2.17.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|