p3lib 1.1.75__tar.gz → 1.1.76__tar.gz

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.
Files changed (31) hide show
  1. {p3lib-1.1.75 → p3lib-1.1.76}/PKG-INFO +1 -1
  2. {p3lib-1.1.75 → p3lib-1.1.76}/setup.cfg +1 -1
  3. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/ngt.py +27 -8
  4. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib.egg-info/PKG-INFO +1 -1
  5. {p3lib-1.1.75 → p3lib-1.1.76}/LICENSE +0 -0
  6. {p3lib-1.1.75 → p3lib-1.1.76}/README.md +0 -0
  7. {p3lib-1.1.75 → p3lib-1.1.76}/pyproject.toml +0 -0
  8. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/__init__.py +0 -0
  9. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/ate.py +0 -0
  10. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/bokeh_auth.py +0 -0
  11. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/bokeh_gui.py +0 -0
  12. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/boot_manager.py +0 -0
  13. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/conduit.py +0 -0
  14. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/database_if.py +0 -0
  15. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/helper.py +0 -0
  16. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/json_networking.py +0 -0
  17. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/mqtt_rpc.py +0 -0
  18. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/netif.py +0 -0
  19. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/netplotly.py +0 -0
  20. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/pconfig.py +0 -0
  21. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/ssh.py +0 -0
  22. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/table_plot.py +0 -0
  23. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib/uio.py +0 -0
  24. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib.egg-info/SOURCES.txt +0 -0
  25. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib.egg-info/dependency_links.txt +0 -0
  26. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib.egg-info/requires.txt +0 -0
  27. {p3lib-1.1.75 → p3lib-1.1.76}/src/p3lib.egg-info/top_level.txt +0 -0
  28. {p3lib-1.1.75 → p3lib-1.1.76}/tests/test_conduit.py +0 -0
  29. {p3lib-1.1.75 → p3lib-1.1.76}/tests/test_json_networking.py +0 -0
  30. {p3lib-1.1.75 → p3lib-1.1.76}/tests/test_netif.py +0 -0
  31. {p3lib-1.1.75 → p3lib-1.1.76}/tests/test_ssh.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p3lib
3
- Version: 1.1.75
3
+ Version: 1.1.76
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
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = p3lib
3
- version = 1.1.75
3
+ version = 1.1.76
4
4
  author = Paul Austen
5
5
  author_email = pausten.os@gmail.com
6
6
  description = A group of python modules for networking, plotting data, config storage, automating boot scripts, ssh access and user input output.
@@ -114,6 +114,7 @@ class TabbedNiceGui(object):
114
114
  self._progressBarStartMessage = ""
115
115
  self._progressBarExpectedMessageList = []
116
116
  self._expectedProgressBarMessageIndex = 0
117
+ self._expectedProgressBarMsgCount = 0
117
118
  self._programVersion = TabbedNiceGui.GetProgramVersion()
118
119
 
119
120
  self._logPath = None
@@ -430,26 +431,39 @@ class TabbedNiceGui(object):
430
431
  # Increment the progress bar
431
432
  self._progress.set_value( self._progress.value + self._progressStepValue )
432
433
 
433
- def _startProgress(self, durationSeconds=0, startMessage=None, expectedMsgList=[]):
434
+ def _startProgress(self, durationSeconds=0, startMessage=None, expectedMsgList=[], expectedMsgCount=0):
434
435
  """@brief Start a timer that will update the progress bar.
435
436
  The progress bar can simply update on a timer every second with durationSeconds set to the expected length
436
- of the task if startMessage is unset and startMessage = None and expectedMessageCount = 0.
437
+ of the task.
437
438
 
438
- Alternatively if durationSeconds is set and startMessage (expectedMessageCount = 0) is set to some text that
439
- we expect to receive in the log before the progress timer (as detailed above) is triggered.
439
+ If startMessage is set to a text string the progress time will not start until the log message area contains
440
+ the start message.
440
441
 
441
442
  Alternatively if expectedMsgList contains a list of strings we expect to receive then the progress bar is
442
- updated as each message is received. The messages may be the entire line of a log message or parts of a log message line.
443
+ updated as each message is received. The messages may be the entire line of a log message or parts of a
444
+ log message line.
445
+
446
+ Alternatively if expectedMsgCount is set to a value > 0 then the progress bar is updated as each message is
447
+ added to the log and reaches 100% when the number of messages added to the log file reaches the expectedMsgCount.
448
+
443
449
  @param startMessage The text of the log message we expect to receive to trigger the progress bar timer start.
444
- @param expectedMsgList A list of the expected log file messages."""
450
+ @param expectedMsgList A list of the expected log file messages.
451
+ @param expectedMsgCount A int value that defines the number of log messages we expect to receive for normal progress
452
+ completion."""
445
453
  self._progressValue = 0
446
454
  self._progressBarStartMessage = ""
447
455
  self._progressBarExpectedMessageList = []
448
456
  self._expectedProgressBarMessageIndex = 0
457
+ self._expectedProgressBarMsgCount = 0
449
458
  self._updateProgressOnTimer = False
450
459
  self._progress.set_value( self._progressValue )
460
+ # If the caller wants to the progress bar to update as the log file message count increases.
461
+ if expectedMsgCount > 0:
462
+ self._expectedProgressBarMsgCount = expectedMsgCount
463
+ self._progressStepValue = TabbedNiceGui.MAX_PROGRESS_VALUE/float(self._expectedProgressBarMsgCount)
464
+
451
465
  # If the caller wants to update the progress bar on expected messages.
452
- if len(expectedMsgList):
466
+ elif len(expectedMsgList):
453
467
  #Use the text of log messages to increment the progress bar.
454
468
  self._expectedProgressBarMessageIndex = 0
455
469
  self._progressBarExpectedMessageList = expectedMsgList
@@ -477,8 +491,13 @@ class TabbedNiceGui(object):
477
491
  def _updateProgressBar(self, msg):
478
492
  """@brief Update the progress bar if required when a log message is received. This is called as each message is added to the log.
479
493
  @param msg The log message received."""
494
+ # If we update the progress bar as each message is received until we have a log with self._expectedProgressBarMsgCount many messages.
495
+ if self._expectedProgressBarMsgCount > 0:
496
+ self._progressValue = self._progressValue + self._progressStepValue
497
+ self._progress.set_value( self._progressValue )
498
+
480
499
  # If we have a list of log messages to update the progress bar.
481
- if len(self._progressBarExpectedMessageList) > 0:
500
+ elif len(self._progressBarExpectedMessageList) > 0:
482
501
  if self._expectedProgressBarMessageIndex < len(self._progressBarExpectedMessageList):
483
502
  # Get the message we expect to receive next
484
503
  expectedMsg = self._progressBarExpectedMessageList[self._expectedProgressBarMessageIndex]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p3lib
3
- Version: 1.1.75
3
+ Version: 1.1.76
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes