pyx3270 0.1.4__py3-none-any.whl → 0.1.6__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.
- pyx3270/__init__.py +1 -1
- pyx3270/bin/linux/s3270 +0 -0
- pyx3270/emulator.py +13 -1
- {pyx3270-0.1.4.dist-info → pyx3270-0.1.6.dist-info}/METADATA +1 -1
- {pyx3270-0.1.4.dist-info → pyx3270-0.1.6.dist-info}/RECORD +8 -8
- {pyx3270-0.1.4.dist-info → pyx3270-0.1.6.dist-info}/WHEEL +0 -0
- {pyx3270-0.1.4.dist-info → pyx3270-0.1.6.dist-info}/entry_points.txt +0 -0
- {pyx3270-0.1.4.dist-info → pyx3270-0.1.6.dist-info}/top_level.txt +0 -0
pyx3270/__init__.py
CHANGED
pyx3270/bin/linux/s3270
CHANGED
|
Binary file
|
pyx3270/emulator.py
CHANGED
|
@@ -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.
|
|
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,8 +1,8 @@
|
|
|
1
1
|
docs/gen_tree.py,sha256=DQbnAfFVeeMT2mZMzByKVdM1Qm_O0q3mRrzKqKfSQ5M,11374
|
|
2
|
-
pyx3270/__init__.py,sha256=
|
|
2
|
+
pyx3270/__init__.py,sha256=pTdfrdRxSKB1vULiK7nkyI7enJHLI8BhERGYzupvCIc,1226
|
|
3
3
|
pyx3270/__main__.py,sha256=YyGX6Wbn7bgOvXjHIeGf8Z2so8MEtXXMRcaJnqR8tU4,70
|
|
4
4
|
pyx3270/cli.py,sha256=_Vrmg-p1i889q9zS-k7IBS6_OHDMWtTt2b6-Mx5Esdk,4571
|
|
5
|
-
pyx3270/emulator.py,sha256=
|
|
5
|
+
pyx3270/emulator.py,sha256=jKotPhKYe7UCZW0IquG1WMYUQXCqp6B28kl4vot-aKA,32310
|
|
6
6
|
pyx3270/exceptions.py,sha256=TtM9LugE5m4E01vI9PnzCE-BRMqigiWvoeGTLTDDbfo,607
|
|
7
7
|
pyx3270/iemulator.py,sha256=tVEFNlZMSww2LsfdXZgmg2XJtT716uGvOHyU7G_UXBU,3081
|
|
8
8
|
pyx3270/logging_config.py,sha256=k5sYSlaAe-_hkMR2V37eXRiQ4aPNRm6R7az1iEZ4IH4,1667
|
|
@@ -14,7 +14,7 @@ pyx3270/tn3270.py,sha256=-trKVI3uimpte6_IzYjwGv4UpGIEacKjI1knQFunNi0,6640
|
|
|
14
14
|
pyx3270/x3270_commands.py,sha256=A65TZmjYakx9U8iiw60InxgVHkFc6XN2mYiFYiJQV8Y,9088
|
|
15
15
|
pyx3270/bin/start.bin,sha256=HcQargbf60Mi902TLm1cYk9XfhoOq5ktCk7fhka3oZg,831
|
|
16
16
|
pyx3270/bin/start.bin.bak,sha256=v1thzPr4nUjqNMlSPT9P9aY4RJuRa4mvE0b9es-cfvQ,831
|
|
17
|
-
pyx3270/bin/linux/s3270,sha256=
|
|
17
|
+
pyx3270/bin/linux/s3270,sha256=2hIg5zTQ47okqtMUyiObLQWCdGLQw0uOw3NyuvWhfKk,2880816
|
|
18
18
|
pyx3270/bin/linux/x3270,sha256=udKhVgQZDEu6_QQ37GeoH4zZwFQaw0x7OYw80Kh6-58,1719552
|
|
19
19
|
pyx3270/bin/windows/wc3270.exe,sha256=gYE5ge5cgLlwkd1R5GG2WWAlQt_veXCydb8rARtP3lI,3570888
|
|
20
20
|
pyx3270/bin/windows/ws3270.exe,sha256=eearMtLt-VtQrODep-PMxLZglVR5gb7-Le6OX3-tw_E,2904696
|
|
@@ -28,8 +28,8 @@ tests/test_emulator.py,sha256=fpmKiGN1pyEN470XstCG8EsEpnaqFrBQ76tSp5_Sdas,69346
|
|
|
28
28
|
tests/test_exceptions.py,sha256=pvpwEUFEEju2CgBR3QPpm6wspiwzP1jp5K7gX9Pagrw,1226
|
|
29
29
|
tests/test_offline.py,sha256=bkwHMoevAl3UEj8UmclM4adSm0kujjNNX83Dlx1nBpM,5572
|
|
30
30
|
tests/test_server.py,sha256=FlJ_gEhRtoESc1m9EKCfJRXeGJnMRyoUtKF1VkOYhBY,23608
|
|
31
|
-
pyx3270-0.1.
|
|
32
|
-
pyx3270-0.1.
|
|
33
|
-
pyx3270-0.1.
|
|
34
|
-
pyx3270-0.1.
|
|
35
|
-
pyx3270-0.1.
|
|
31
|
+
pyx3270-0.1.6.dist-info/METADATA,sha256=qVFCW0qSf_j9nlhS_nz3eVIWDb6wlbAWfkM3q_YBiv0,3417
|
|
32
|
+
pyx3270-0.1.6.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
33
|
+
pyx3270-0.1.6.dist-info/entry_points.txt,sha256=9kg9FaegDY2FXCVplltQGAmMiWia1LnnsPF7c1uQpa0,105
|
|
34
|
+
pyx3270-0.1.6.dist-info/top_level.txt,sha256=ptTDzZHpMHYKlnFM01XeuAnLhdlYO2NZQeER6hp3euA,24
|
|
35
|
+
pyx3270-0.1.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|