p3lib 1.1.94__tar.gz → 1.1.96__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.94 → p3lib-1.1.96}/PKG-INFO +1 -1
  2. {p3lib-1.1.94 → p3lib-1.1.96}/setup.cfg +1 -1
  3. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/boot_manager.py +29 -13
  4. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib.egg-info/PKG-INFO +1 -1
  5. {p3lib-1.1.94 → p3lib-1.1.96}/LICENSE +0 -0
  6. {p3lib-1.1.94 → p3lib-1.1.96}/README.md +0 -0
  7. {p3lib-1.1.94 → p3lib-1.1.96}/pyproject.toml +0 -0
  8. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/__init__.py +0 -0
  9. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/ate.py +0 -0
  10. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/bokeh_auth.py +0 -0
  11. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/bokeh_gui.py +0 -0
  12. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/conduit.py +0 -0
  13. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/database_if.py +0 -0
  14. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/helper.py +0 -0
  15. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/json_networking.py +0 -0
  16. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/mqtt_rpc.py +0 -0
  17. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/netif.py +0 -0
  18. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/netplotly.py +0 -0
  19. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/ngt.py +0 -0
  20. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/pconfig.py +0 -0
  21. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/ssh.py +0 -0
  22. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/table_plot.py +0 -0
  23. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib/uio.py +0 -0
  24. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib.egg-info/SOURCES.txt +0 -0
  25. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib.egg-info/dependency_links.txt +0 -0
  26. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib.egg-info/requires.txt +0 -0
  27. {p3lib-1.1.94 → p3lib-1.1.96}/src/p3lib.egg-info/top_level.txt +0 -0
  28. {p3lib-1.1.94 → p3lib-1.1.96}/tests/test_conduit.py +0 -0
  29. {p3lib-1.1.94 → p3lib-1.1.96}/tests/test_json_networking.py +0 -0
  30. {p3lib-1.1.94 → p3lib-1.1.96}/tests/test_netif.py +0 -0
  31. {p3lib-1.1.94 → p3lib-1.1.96}/tests/test_ssh.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p3lib
3
- Version: 1.1.94
3
+ Version: 1.1.96
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.94
3
+ version = 1.1.96
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.
@@ -27,46 +27,62 @@ class BootManager(object):
27
27
  parser.add_argument(BootManager.CHECK_CMD_OPT, help="Check the status of an auto started icons_gw instance.", action="store_true", default=False)
28
28
 
29
29
  @staticmethod
30
- def HandleOptions(uio, options, enable_syslog):
30
+ def HandleOptions(uio, options, enable_syslog, appName=None, restartSeconds=1):
31
31
  """@brief Handle one of the bot manager command line options if the
32
32
  user passed it on the cmd line.
33
33
  @param uio A UIO instance.
34
34
  @param options As returned from parser.parse_args() where parser
35
35
  is an instance of argparse.ArgumentParser.
36
36
  @param enable_syslog True to enable systemd syslog output.
37
+ @param appName The name of the app. This is used as the service name. If not set then
38
+ the name of the initially executed python file is used.
39
+ @param restartSeconds The number of seconds to sleep before restarting a service that has stopped (default=1).
37
40
  @return True if handled , False if not."""
38
41
  handled = False
39
42
  if options.check_auto_start:
40
- BootManager.CheckAutoStartStatus(uio)
43
+ BootManager.CheckAutoStartStatus(uio, appName)
41
44
  handled = True
42
45
 
43
46
  elif options.enable_auto_start:
44
- BootManager.EnableAutoStart(uio, enable_syslog)
47
+ BootManager.EnableAutoStart(uio, enable_syslog, appName, restartSeconds)
45
48
  handled = True
46
49
 
47
50
  elif options.disable_auto_start:
48
- BootManager.DisableAutoStart(uio)
51
+ BootManager.DisableAutoStart(uio, appName)
49
52
  handled = True
50
53
 
51
54
  return handled
52
55
 
53
56
  @staticmethod
54
- def EnableAutoStart(uio, enable_syslog):
55
- """@brief Enable this program to auto start when the computer on which it is installed starts."""
56
- bootManager = BootManager(uio=uio, ensureRootUser=True)
57
+ def EnableAutoStart(uio, enable_syslog, appName, restartSeconds):
58
+ """@brief Enable this program to auto start when the computer on which it is installed starts.
59
+ @param uio A UIO instance.
60
+ @param options As returned from parser.parse_args() where parser
61
+ is an instance of argparse.ArgumentParser.
62
+ @param enable_syslog True to enable systemd syslog output.
63
+ @param appName The name of the app. This is used as the service name. If not set then
64
+ the name of the initially executed python file is used.
65
+ @param restartSeconds The number of seconds to sleep before restarting a service that has stopped (default=1)."""
66
+ bootManager = BootManager(uio=uio, ensureRootUser=True, appName=appName, restartSeconds=restartSeconds)
57
67
  arsString = " ".join(sys.argv)
58
68
  bootManager.add(argString=arsString, enableSyslog=enable_syslog)
59
69
 
60
70
  @staticmethod
61
- def DisableAutoStart(uio):
62
- """@brief Enable this program to auto start when the computer on which it is installed starts."""
63
- bootManager = BootManager(uio=uio, ensureRootUser=True)
71
+ def DisableAutoStart(uio, appName):
72
+ """@brief Enable this program to auto start when the computer on which it is installed starts.
73
+ @param uio A UIO instance.
74
+ @param appName The name of the app. This is used as the service name. If not set then
75
+ the name of the initially executed python file is used."""
76
+ bootManager = BootManager(uio=uio, ensureRootUser=True, appName=appName)
64
77
  bootManager.remove()
65
78
 
66
79
  @staticmethod
67
- def CheckAutoStartStatus(uio):
68
- """@brief Check the status of a process previously set to auto start."""
69
- bootManager = BootManager(uio=uio)
80
+ def CheckAutoStartStatus(uio, appName):
81
+ """@brief Check the status of a process previously set to auto start.
82
+ @param uio A UIO instance.
83
+ @param appName The name of the app. This is used as the service name. If not set then
84
+ the name of the initially executed python file is used."""
85
+ bootManager = BootManager(uio=uio, appName=appName)
70
86
  lines = bootManager.getStatus()
71
87
  if lines and len(lines) > 0:
72
88
  for line in lines:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: p3lib
3
- Version: 1.1.94
3
+ Version: 1.1.96
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