pyx3270 0.1.5__tar.gz → 0.1.6__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 (40) hide show
  1. {pyx3270-0.1.5 → pyx3270-0.1.6}/PKG-INFO +1 -1
  2. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyproject.toml +1 -1
  3. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/__init__.py +1 -1
  4. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/emulator.py +13 -1
  5. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270.egg-info/PKG-INFO +1 -1
  6. {pyx3270-0.1.5 → pyx3270-0.1.6}/README.md +0 -0
  7. {pyx3270-0.1.5 → pyx3270-0.1.6}/docs/gen_tree.py +0 -0
  8. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/__main__.py +0 -0
  9. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/bin/linux/s3270 +0 -0
  10. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/bin/linux/x3270 +0 -0
  11. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/bin/start.bin +0 -0
  12. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/bin/start.bin.bak +0 -0
  13. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/bin/windows/wc3270.exe +0 -0
  14. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/bin/windows/ws3270.exe +0 -0
  15. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/cli.py +0 -0
  16. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/exceptions.py +0 -0
  17. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/hook/__init__.py +0 -0
  18. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/hook/hook-pyx3270.py +0 -0
  19. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/iemulator.py +0 -0
  20. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/logging_config.py +0 -0
  21. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/offline.py +0 -0
  22. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/py.typed +0 -0
  23. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/server.py +0 -0
  24. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/state.py +0 -0
  25. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/tn3270.py +0 -0
  26. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270/x3270_commands.py +0 -0
  27. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270.egg-info/SOURCES.txt +0 -0
  28. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270.egg-info/dependency_links.txt +0 -0
  29. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270.egg-info/entry_points.txt +0 -0
  30. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270.egg-info/requires.txt +0 -0
  31. {pyx3270-0.1.5 → pyx3270-0.1.6}/pyx3270.egg-info/top_level.txt +0 -0
  32. {pyx3270-0.1.5 → pyx3270-0.1.6}/setup.cfg +0 -0
  33. {pyx3270-0.1.5 → pyx3270-0.1.6}/site/gen_tree.py +0 -0
  34. {pyx3270-0.1.5 → pyx3270-0.1.6}/tests/__init__.py +0 -0
  35. {pyx3270-0.1.5 → pyx3270-0.1.6}/tests/conftest.py +0 -0
  36. {pyx3270-0.1.5 → pyx3270-0.1.6}/tests/test_cli.py +0 -0
  37. {pyx3270-0.1.5 → pyx3270-0.1.6}/tests/test_emulator.py +0 -0
  38. {pyx3270-0.1.5 → pyx3270-0.1.6}/tests/test_exceptions.py +0 -0
  39. {pyx3270-0.1.5 → pyx3270-0.1.6}/tests/test_offline.py +0 -0
  40. {pyx3270-0.1.5 → pyx3270-0.1.6}/tests/test_server.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyx3270
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Uma interface comum utilizada para automações de terminais 3270 da IBM.
5
5
  Author-email: MatheusLPolidoro <mattpolidoro4@gmail.com>
6
6
  Project-URL: Documentation, https://matheuslpolidoro.github.io/pyx3270/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyx3270"
3
- version = "0.1.5"
3
+ version = "0.1.6"
4
4
  description = "Uma interface comum utilizada para automações de terminais 3270 da IBM."
5
5
  authors = [{name = "MatheusLPolidoro", email = "mattpolidoro4@gmail.com"}]
6
6
  readme = "README.md"
@@ -16,5 +16,5 @@ from pyx3270.emulator import X3270
16
16
  from pyx3270.offline import PyX3270Manager
17
17
 
18
18
  __author__ = 'MatheusLPolidoro'
19
- __version__ = '0.1.5'
19
+ __version__ = '0.1.6'
20
20
  __all__ = ['X3270', 'replay', 'record', 'PyX3270Manager']
@@ -740,6 +740,7 @@ class X3270(AbstractEmulator, X3270Cmd):
740
740
  self.port = None
741
741
  self.tls = None
742
742
  self.mode_3270 = None
743
+ self.last_command_time = None
743
744
  logger.debug('X3270 inicializado')
744
745
 
745
746
  def _create_app(self) -> None:
@@ -774,6 +775,7 @@ class X3270(AbstractEmulator, X3270Cmd):
774
775
  cmd = Command(self.app, cmdstr)
775
776
  cmd.execute()
776
777
  self.status = Status(cmd.status_line)
778
+ self.last_command_time = time()
777
779
  logger.debug(f'Comando executado, status: {self.status}')
778
780
  return cmd
779
781
  except NotConnectedException:
@@ -812,10 +814,20 @@ class X3270(AbstractEmulator, X3270Cmd):
812
814
  self.app.close()
813
815
  self.is_terminated = True
814
816
  logger.info('Emulador terminado com sucesso')
815
-
817
+
816
818
  def is_connected(self) -> bool:
817
819
  logger.debug('Verificando estado de conexão')
818
820
  try:
821
+ # Verifica tempo desde o último comando
822
+ if self.last_command_time:
823
+ elapsed = time() - self.last_command_time
824
+ if elapsed > 600:
825
+ logger.warning(
826
+ f'Tempo de inatividade excedido: '
827
+ f'{elapsed:.2f} segundos'
828
+ )
829
+ return False
830
+
819
831
  self.query('ConnectionState')
820
832
  is_connected = self.status.connection_state.startswith(b'C(')
821
833
  logger.info(f'Estado de conexão: {is_connected}')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyx3270
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Uma interface comum utilizada para automações de terminais 3270 da IBM.
5
5
  Author-email: MatheusLPolidoro <mattpolidoro4@gmail.com>
6
6
  Project-URL: Documentation, https://matheuslpolidoro.github.io/pyx3270/
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
File without changes