p3lib 1.1.117__py2.py3-none-any.whl → 1.1.119__py2.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.
- p3lib/helper.py +2 -2
- p3lib/ngt.py +21 -2
- {p3lib-1.1.117.dist-info → p3lib-1.1.119.dist-info}/METADATA +4 -3
- {p3lib-1.1.117.dist-info → p3lib-1.1.119.dist-info}/RECORD +6 -6
- {p3lib-1.1.117.dist-info → p3lib-1.1.119.dist-info}/WHEEL +1 -1
- {p3lib-1.1.117.dist-info → p3lib-1.1.119.dist-info}/LICENSE +0 -0
p3lib/helper.py
CHANGED
@@ -389,7 +389,8 @@ def getAbsFile(filename):
|
|
389
389
|
@param filename The name of the icon file.
|
390
390
|
@return The abs path of the file or None if not found."""
|
391
391
|
file_found = None
|
392
|
-
|
392
|
+
startup_path = os.getenv("PWD", os.getcwd())
|
393
|
+
abs_filename = os.path.join(startup_path, filename)
|
393
394
|
if os.path.isfile(abs_filename):
|
394
395
|
file_found = abs_filename
|
395
396
|
|
@@ -414,7 +415,6 @@ def getAbsFile(filename):
|
|
414
415
|
if 'site-packages' in path:
|
415
416
|
site_packages_path = path
|
416
417
|
abs_filename = os.path.join(site_packages_path, filename)
|
417
|
-
print(f"PJA: abs_filename={abs_filename}, FOUND={os.path.isfile(abs_filename)}")
|
418
418
|
if os.path.isfile(abs_filename):
|
419
419
|
file_found = abs_filename
|
420
420
|
|
p3lib/ngt.py
CHANGED
@@ -858,6 +858,12 @@ class local_file_picker(ui.dialog):
|
|
858
858
|
:param show_hidden_files: Whether to show hidden files.
|
859
859
|
"""
|
860
860
|
super().__init__()
|
861
|
+
self._selected_drive = None
|
862
|
+
# If on a Windows platform attempt to separate the drive and the directory
|
863
|
+
if platform.system() == 'Windows' and directory and len(directory) >= 2:
|
864
|
+
if directory[0].isalpha() and directory[1] == ':':
|
865
|
+
self._selected_drive = directory[:2]
|
866
|
+
directory = directory[2:] + "\\\\"
|
861
867
|
|
862
868
|
self.path = Path(directory).expanduser()
|
863
869
|
if upper_limit is None:
|
@@ -884,7 +890,13 @@ class local_file_picker(ui.dialog):
|
|
884
890
|
if platform.system() == 'Windows':
|
885
891
|
import win32api
|
886
892
|
drives = win32api.GetLogicalDriveStrings().split('\000')[:-1]
|
887
|
-
|
893
|
+
drive = drives[0]
|
894
|
+
# If the caller passed a drive letter select this drive
|
895
|
+
if self._selected_drive:
|
896
|
+
for drive in drives:
|
897
|
+
if drive.startswith(self._selected_drive):
|
898
|
+
break
|
899
|
+
self.drives_toggle = ui.toggle(drives, value=drive, on_change=self.update_drive)
|
888
900
|
|
889
901
|
def update_drive(self):
|
890
902
|
self.path = Path(self.drives_toggle.value).expanduser()
|
@@ -917,4 +929,11 @@ class local_file_picker(ui.dialog):
|
|
917
929
|
if self.path.is_dir() and not self._select_folder_checkbox.value:
|
918
930
|
self.update_grid()
|
919
931
|
else:
|
920
|
-
|
932
|
+
selected = str(self.path)
|
933
|
+
# If Windows platform add the drive letter to the path
|
934
|
+
if platform.system() == 'Windows':
|
935
|
+
if selected.startswith('\\'):
|
936
|
+
selected=selected[1:]
|
937
|
+
selected = self.drives_toggle.value + selected
|
938
|
+
|
939
|
+
self.submit([selected])
|
@@ -1,8 +1,7 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: p3lib
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.119
|
4
4
|
Summary: A group of python modules for networking, plotting data, config storage, automating boot scripts, ssh access and user input output.
|
5
|
-
Home-page: https://github.com/pjaos/p3lib
|
6
5
|
License: MIT
|
7
6
|
Author: Paul Austen
|
8
7
|
Author-email: pjaos@gmail.com
|
@@ -19,6 +18,8 @@ Classifier: Programming Language :: Python :: 3.9
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.10
|
20
19
|
Classifier: Programming Language :: Python :: 3.11
|
21
20
|
Classifier: Programming Language :: Python :: 3.12
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
22
|
+
Project-URL: Homepage, https://github.com/pjaos/p3lib
|
22
23
|
Project-URL: Repository, https://github.com/pjaos/p3lib
|
23
24
|
Description-Content-Type: text/markdown
|
24
25
|
|
@@ -7,18 +7,18 @@ p3lib/conduit.py,sha256=jPkjdtyCx2I6SFqcEo8y2g7rgnZ-jNY7oCuYIETzT5Q,6046
|
|
7
7
|
p3lib/database_if.py,sha256=XKu1w3zftGbj4Rh54wrWJnoCtqHkhCzJUPN2S70XIKg,11915
|
8
8
|
p3lib/file_io.py,sha256=A7_GKYPlmjRjq6U1YuWhmB0OhLhNm6cWQfQX8qfgYTk,5041
|
9
9
|
p3lib/gnome_desktop_app.py,sha256=zl9SKRBV8ipVg2faCs_gbAr8c42J1N_pntbFGG2BMiE,6694
|
10
|
-
p3lib/helper.py,sha256=
|
10
|
+
p3lib/helper.py,sha256=jkcC07kfEDbrWOxVu60x0vmYORSR0kyWWlcDmP_Sbf8,17563
|
11
11
|
p3lib/json_networking.py,sha256=6u4s1SmypjTYPnSxHP712OgQ3ZJaxOqIkgHQ1J7Qews,9738
|
12
12
|
p3lib/login.html,sha256=DADTJGuvWQ-LTO4X6SaFdqK7JMW03DAa3lRieGD0d6g,2748
|
13
13
|
p3lib/mqtt_rpc.py,sha256=6LmFA1kR4HSJs9eWbOJORRHNY01L_lHWjvtE2fmY8P8,10511
|
14
14
|
p3lib/netif.py,sha256=3QV5OGdHhELIf4MBj6mx5MNCtVeZ7JXoNEkeu4KzCaE,9796
|
15
15
|
p3lib/netplotly.py,sha256=PMDx-w1jtRVW6Od5u_kuKbBxNpTS_Y88mMF60puMxLM,9363
|
16
|
-
p3lib/ngt.py,sha256=
|
16
|
+
p3lib/ngt.py,sha256=YQdAr8mvBka6QS9ZeG_WWh9rmtF7Tg8VXBpjYqp6eK0,43349
|
17
17
|
p3lib/pconfig.py,sha256=wGC6UJAIBksRjwKTfaw3Y6vAMkgey0QC2nhkCtqj1MQ,37738
|
18
18
|
p3lib/ssh.py,sha256=OyoAQ_h1L2RfkjTAChDrvLFfl4Fe_gBNdX5rvK-wKiw,42125
|
19
19
|
p3lib/table_plot.py,sha256=RPncwVlGUkkx5Fw0dHQedXo0TSPlTi__VrJBDzaMsuI,32116
|
20
20
|
p3lib/uio.py,sha256=Aaxc99XiE3d2f9vLjaN-bZsckoNxay5t0ujdK6PXGrw,23265
|
21
|
-
p3lib-1.1.
|
22
|
-
p3lib-1.1.
|
23
|
-
p3lib-1.1.
|
24
|
-
p3lib-1.1.
|
21
|
+
p3lib-1.1.119.dist-info/LICENSE,sha256=igqTy5u0kVWM1n-NUZMvAlinY6lVjAXKoag0okkS8V8,1067
|
22
|
+
p3lib-1.1.119.dist-info/METADATA,sha256=hkGUXMo9YNIYxrwSPzmJ4XScwP0mypGXUdHafjsjAVg,1382
|
23
|
+
p3lib-1.1.119.dist-info/WHEEL,sha256=5druYqcII7zHXzX7qmN0TH895Jg3yuTtfjMgJIVBrKE,92
|
24
|
+
p3lib-1.1.119.dist-info/RECORD,,
|
File without changes
|