p3lib 1.1.70__py3-none-any.whl → 1.1.72__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/ssh.py +10 -0
- p3lib/table_plot.py +13 -13
- {p3lib-1.1.70.dist-info → p3lib-1.1.72.dist-info}/METADATA +3 -3
- {p3lib-1.1.70.dist-info → p3lib-1.1.72.dist-info}/RECORD +7 -7
- {p3lib-1.1.70.dist-info → p3lib-1.1.72.dist-info}/WHEEL +1 -1
- {p3lib-1.1.70.dist-info → p3lib-1.1.72.dist-info}/LICENSE +0 -0
- {p3lib-1.1.70.dist-info → p3lib-1.1.72.dist-info}/top_level.txt +0 -0
p3lib/ssh.py
CHANGED
@@ -122,6 +122,7 @@ class SSH(object):
|
|
122
122
|
PRIVATE_KEY_FILE_LIST = ["id_rsa", "id_dsa", 'id_ecdsa']
|
123
123
|
PUBLIC_KEY_FILE_LIST = ["id_rsa.pub", "id_dsa.pub", 'id_ecdsa.pub']
|
124
124
|
LOCAL_SSH_CONFIG_PATH = os.path.join(os.path.expanduser("~"), ".ssh")
|
125
|
+
DEFAULT_REMOTE_SSH_CONFIG_FOLDER = "~/.ssh"
|
125
126
|
DEFAULT_REMOTE_SSH_AUTH_KEYS_FILE = "~/.ssh/authorized_keys"
|
126
127
|
DROPBEAR_DIR = "/etc/dropbear"
|
127
128
|
DROPBEAR_AUTH_KEYS_FILE = "%s/authorized_keys" % (DROPBEAR_DIR)
|
@@ -520,8 +521,17 @@ class SSH(object):
|
|
520
521
|
|
521
522
|
cmd = "test -d %s" % (SSH.DROPBEAR_DIR)
|
522
523
|
rc, stdoutLines, stderrLines = self.runCmd(cmd, throwError=False)
|
524
|
+
# If the ssh server uses dropbear
|
523
525
|
if rc == 0:
|
524
526
|
authKeysFile = SSH.DROPBEAR_AUTH_KEYS_FILE
|
527
|
+
else:
|
528
|
+
# Check for the users ssh config folder
|
529
|
+
cmd = "test -d %s" % (SSH.DEFAULT_REMOTE_SSH_CONFIG_FOLDER)
|
530
|
+
rc, stdoutLines, stderrLines = self.runCmd(cmd, throwError=False)
|
531
|
+
if rc != 0:
|
532
|
+
# If the remote ssh config folder does not exist, create it
|
533
|
+
cmd = f"mkdir {SSH.DEFAULT_REMOTE_SSH_CONFIG_FOLDER}"
|
534
|
+
rc, stdoutLines, stderrLines = self.runCmd(cmd, throwError=True)
|
525
535
|
|
526
536
|
return authKeysFile
|
527
537
|
|
p3lib/table_plot.py
CHANGED
@@ -131,7 +131,7 @@ class Table2DPlotServer(object):
|
|
131
131
|
else:
|
132
132
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.WINDOW_TTLE} must be > 0 and <= 250 characters in length: {wTitle}"}
|
133
133
|
|
134
|
-
|
134
|
+
elif Table2DPlotServer.XAXIS_TYPE in rxDict:
|
135
135
|
xAxisType = rxDict[Table2DPlotServer.XAXIS_TYPE]
|
136
136
|
if xAxisType in Table2DPlotServer.VALID_X_AXIS_TYPES:
|
137
137
|
self.server.parent.staticPlotParams.xAxisType = xAxisType
|
@@ -139,70 +139,70 @@ class Table2DPlotServer(object):
|
|
139
139
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.XAXIS_TYPE} invalid: {xAxisType}"}
|
140
140
|
|
141
141
|
|
142
|
-
|
142
|
+
elif Table2DPlotServer.PLOT_PANEL_HEIGHT in rxDict:
|
143
143
|
pHeight = rxDict[Table2DPlotServer.PLOT_PANEL_HEIGHT]
|
144
144
|
if pHeight > 10 and pHeight < 2048:
|
145
145
|
self.server.parent.staticPlotParams.plotPanelHeight = pHeight
|
146
146
|
else:
|
147
147
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.PLOT_PANEL_HEIGHT} invalid: {pHeight} must be > 10 and < 2048"}
|
148
148
|
|
149
|
-
|
149
|
+
elif Table2DPlotServer.LINE_PLOT in rxDict:
|
150
150
|
lPlot = rxDict[Table2DPlotServer.LINE_PLOT]
|
151
151
|
if lPlot in (True, False):
|
152
152
|
self.server.parent.staticPlotParams.linePlot = lPlot
|
153
153
|
else:
|
154
154
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.LINE_PLOT} invalid, must be True of False not {lPlot}"}
|
155
155
|
|
156
|
-
|
156
|
+
elif Table2DPlotServer.PLOT_LINE_WIDTH in rxDict:
|
157
157
|
plWidth = rxDict[Table2DPlotServer.PLOT_LINE_WIDTH]
|
158
158
|
if plWidth > 0 and plWidth < 100:
|
159
159
|
self.server.parent.staticPlotParams.plotLineWidth = plWidth
|
160
160
|
else:
|
161
161
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.PLOT_LINE_WIDTH} invalid, must be > 0 and < 100 not {plWidth}"}
|
162
162
|
|
163
|
-
|
163
|
+
elif Table2DPlotServer.SCATTER_PLOT_DOT_SIZE in rxDict:
|
164
164
|
spDotSize = rxDict[Table2DPlotServer.SCATTER_PLOT_DOT_SIZE]
|
165
165
|
if spDotSize > 0 and spDotSize < 250:
|
166
166
|
self.server.parent.staticPlotParams.scatterPlotDotSize = spDotSize
|
167
167
|
else:
|
168
168
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.SCATTER_PLOT_DOT_SIZE} invalid, must be > 0 and < 250 not {spDotSize}"}
|
169
169
|
|
170
|
-
|
170
|
+
elif Table2DPlotServer.THEME in rxDict:
|
171
171
|
theme = rxDict[Table2DPlotServer.THEME]
|
172
172
|
if theme in Table2DPlotServer.VALID_THEMES:
|
173
173
|
self.server.parent.staticPlotParams.theme = theme
|
174
174
|
else:
|
175
175
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.XAXIS_TYPE} invalid: {theme}"}
|
176
176
|
|
177
|
-
|
177
|
+
elif Table2DPlotServer.X_AXIS_NAME in rxDict:
|
178
178
|
xAxisName = rxDict[Table2DPlotServer.X_AXIS_NAME]
|
179
179
|
if isinstance(xAxisName,str) and len(xAxisName) > 0 and len(xAxisName) <= 150:
|
180
180
|
self.server.parent.staticPlotParams.xAxisName = xAxisName
|
181
181
|
else:
|
182
182
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.X_AXIS_NAME} must be > 0 and <= 150 characters in length: {xAxisName}"}
|
183
183
|
|
184
|
-
|
184
|
+
elif Table2DPlotServer.HTML_FILE in rxDict:
|
185
185
|
htmlFile = rxDict[Table2DPlotServer.HTML_FILE]
|
186
186
|
if isinstance(htmlFile,str) and len(htmlFile) > 0 and len(htmlFile) <= 250:
|
187
187
|
self.server.parent.staticPlotParams.htmlFile = htmlFile
|
188
188
|
else:
|
189
189
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.HTML_FILE} must be > 0 and <= 250 characters in length: {htmlFile}"}
|
190
190
|
|
191
|
-
|
191
|
+
elif Table2DPlotServer.DISABLE_RESULT in rxDict:
|
192
192
|
disableResult = rxDict[Table2DPlotServer.DISABLE_RESULT]
|
193
193
|
if disableResult in (True, False):
|
194
194
|
self.server.parent.staticPlotParams.disableResult = disableResult
|
195
195
|
else:
|
196
196
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.DISABLE_RESULT} invalid, must be True of False not {disableResult}"}
|
197
197
|
|
198
|
-
|
198
|
+
elif Table2DPlotServer.RESULT_WIDTH in rxDict:
|
199
199
|
resultWidth = rxDict[Table2DPlotServer.RESULT_WIDTH]
|
200
200
|
if resultWidth > 10 and resultWidth < 2048:
|
201
201
|
self.server.parent.staticPlotParams.resultWidth = resultWidth
|
202
202
|
else:
|
203
203
|
errorDict = {Table2DPlotServer.ERROR: f"{Table2DPlotServer.RESULT_WIDTH} invalid: {resultWidth} must be > 10 and < 2048"}
|
204
204
|
|
205
|
-
|
205
|
+
elif Table2DPlotServer.RESULT_TITLE in rxDict:
|
206
206
|
resultTitle = rxDict[Table2DPlotServer.RESULT_TITLE]
|
207
207
|
if isinstance(resultTitle,str) and len(resultTitle) > 0 and len(resultTitle) <= 250:
|
208
208
|
self.server.parent.staticPlotParams.resultTitle = resultTitle
|
@@ -211,14 +211,14 @@ class Table2DPlotServer(object):
|
|
211
211
|
|
212
212
|
# Set static parameters stop
|
213
213
|
|
214
|
-
|
214
|
+
elif Table2DPlotServer.SET_RESULT in rxDict:
|
215
215
|
guiMsg = GUIMessage()
|
216
216
|
guiMsg.type = GUIMessage.RESULT_DATA_TYPE
|
217
217
|
guiMsg.data = rxDict[Table2DPlotServer.SET_RESULT]
|
218
218
|
if self.server.parent._bokeh2DTablePlotter:
|
219
219
|
self.server.parent._bokeh2DTablePlotter.sendMessage(guiMsg)
|
220
220
|
|
221
|
-
|
221
|
+
elif Table2DPlotServer.TABLE_COLUMNS in rxDict:
|
222
222
|
self.server.parent.createNewPlot(rxDict[Table2DPlotServer.TABLE_COLUMNS])
|
223
223
|
|
224
224
|
elif Table2DPlotServer.TABLE_ROW in rxDict:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: p3lib
|
3
|
-
Version: 1.1.
|
3
|
+
Version: 1.1.72
|
4
4
|
Summary: A group of python modules for networking, plotting data, config storage, automating boot scripts, ssh access and user input output.
|
5
5
|
Home-page: https://github.com/pjaos/p3lib
|
6
6
|
Author: Paul Austen
|
@@ -12,8 +12,8 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Requires-Python: >=3.8
|
13
13
|
Description-Content-Type: text/markdown
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: paramiko
|
16
|
-
Requires-Dist: pillow
|
15
|
+
Requires-Dist: paramiko>=2.9.3
|
16
|
+
Requires-Dist: pillow>=9.2.0
|
17
17
|
|
18
18
|
# A Python3 library
|
19
19
|
A group of python modules for networking, plotting data, config storage, automating boot scripts, ssh access and user input output.
|
@@ -11,11 +11,11 @@ p3lib/mqtt_rpc.py,sha256=6LmFA1kR4HSJs9eWbOJORRHNY01L_lHWjvtE2fmY8P8,10511
|
|
11
11
|
p3lib/netif.py,sha256=3QV5OGdHhELIf4MBj6mx5MNCtVeZ7JXoNEkeu4KzCaE,9796
|
12
12
|
p3lib/netplotly.py,sha256=PMDx-w1jtRVW6Od5u_kuKbBxNpTS_Y88mMF60puMxLM,9363
|
13
13
|
p3lib/pconfig.py,sha256=_ri9w3aauHXZp8u2YLYHBVroFR_iCqaTCwj_MRa3rHo,30153
|
14
|
-
p3lib/ssh.py,sha256
|
15
|
-
p3lib/table_plot.py,sha256=
|
14
|
+
p3lib/ssh.py,sha256=JiO9MY98zf3uqbonygJi_F9X0eAAgHAINCTeBuYXpCY,39511
|
15
|
+
p3lib/table_plot.py,sha256=dRPZ9rFpwE9Dpyqrvbm5t2spVaPSHrx_B7KvfWVND3g,32166
|
16
16
|
p3lib/uio.py,sha256=hMarPnYXnqVF23HUIeDfzREo7TMdBjrupXMY_ffuCbI,23133
|
17
|
-
p3lib-1.1.
|
18
|
-
p3lib-1.1.
|
19
|
-
p3lib-1.1.
|
20
|
-
p3lib-1.1.
|
21
|
-
p3lib-1.1.
|
17
|
+
p3lib-1.1.72.dist-info/LICENSE,sha256=igqTy5u0kVWM1n-NUZMvAlinY6lVjAXKoag0okkS8V8,1067
|
18
|
+
p3lib-1.1.72.dist-info/METADATA,sha256=Ls1Hl5rIvy8fuzOJj1HF2zp3ccNx72WJunsCKmVpgyg,918
|
19
|
+
p3lib-1.1.72.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
20
|
+
p3lib-1.1.72.dist-info/top_level.txt,sha256=SDCpXYh-19yCFp4Z8ZK4B-3J4NvTCJElZ42NPgcR6-U,6
|
21
|
+
p3lib-1.1.72.dist-info/RECORD,,
|
File without changes
|
File without changes
|