je-editor 0.0.119__py3-none-any.whl → 0.0.120__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.
@@ -4,6 +4,7 @@ import subprocess
4
4
  import sys
5
5
  from pathlib import Path
6
6
  from threading import Thread
7
+ from typing import List
7
8
 
8
9
  from PySide6.QtCore import QTimer
9
10
  from PySide6.QtWidgets import QMainWindow, QTextEdit
@@ -14,6 +15,19 @@ from je_editor.utils.exception.exceptions import JEditorException
14
15
  from je_editor.utils.venv_check.check_venv import check_and_choose_venv
15
16
 
16
17
 
18
+ class RunInstanceManager(object):
19
+
20
+ def __init__(self):
21
+ self.instance_list: List[subprocess.Popen] = list()
22
+
23
+ def close_all_instance(self):
24
+ for process in self.instance_list:
25
+ process.terminate()
26
+
27
+
28
+ run_instance_manager = RunInstanceManager()
29
+
30
+
17
31
  class ExecManager(object):
18
32
 
19
33
  def __init__(
@@ -99,6 +113,7 @@ class ExecManager(object):
99
113
  self.timer.setInterval(1)
100
114
  self.timer.timeout.connect(self.pull_text)
101
115
  self.timer.start()
116
+ run_instance_manager.instance_list.append(self.process)
102
117
  except Exception as error:
103
118
  self.code_result.setTextColor(error_color)
104
119
  self.code_result.append(str(error))
@@ -1,7 +1,7 @@
1
1
  from PySide6.QtGui import QAction, QKeySequence, Qt
2
2
  from PySide6.QtWidgets import QMainWindow, QMessageBox
3
3
 
4
- from je_editor.pyside_ui.code_process.code_exec import exec_manage, ExecManager
4
+ from je_editor.pyside_ui.code_process.code_exec import ExecManager, run_instance_manager
5
5
  from je_editor.pyside_ui.file_dialog.save_file_dialog import choose_file_get_save_file_path
6
6
  from je_editor.pyside_ui.shell_process.shell_exec import ShellManager
7
7
 
@@ -74,7 +74,7 @@ def shell_exec(ui_we_want_to_set: QMainWindow) -> None:
74
74
 
75
75
 
76
76
  def stop_program() -> None:
77
- exec_manage.exit_program()
77
+ run_instance_manager.close_all_instance()
78
78
 
79
79
 
80
80
  def clean_result(ui_we_want_to_set: QMainWindow) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: je-editor
3
- Version: 0.0.119
3
+ Version: 0.0.120
4
4
  Summary: JEditor is basic but powerful editor include GPT
5
5
  Author-email: JE-Chen <jechenmailman@gmail.com>
6
6
  License: MIT
@@ -21,7 +21,6 @@ Requires-Dist: PySide6
21
21
  Requires-Dist: qt-material
22
22
  Requires-Dist: yapf
23
23
  Requires-Dist: frontengine
24
- Requires-Dist: pyttsx3
25
24
 
26
25
  # je_editor
27
26
 
@@ -7,7 +7,7 @@ je_editor/pyside_ui/auto_save/auto_save_thread.py,sha256=fta94JKI9siw4zNSTo_JVyd
7
7
  je_editor/pyside_ui/code_editor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  je_editor/pyside_ui/code_editor/code_edit_plaintext.py,sha256=s-uUFewxBYSG8s_RMUD0ggXIvwOMV5KxiurOftpiFx0,9755
9
9
  je_editor/pyside_ui/code_process/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- je_editor/pyside_ui/code_process/code_exec.py,sha256=UOpW3TBzS9S34Lq0PjSIPuw1vQNmiAV7Zj80CQ8Uuhs,7340
10
+ je_editor/pyside_ui/code_process/code_exec.py,sha256=zwvm3Z1rKQQOH-ivCDLfRdDqK4-s7ya3MM9u-1QBKYQ,7724
11
11
  je_editor/pyside_ui/code_result/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  je_editor/pyside_ui/code_result/code_record.py,sha256=5KER4iZ24rC5VaXeOn0FNSpctbIRFZcbguMh1kokFuw,1469
13
13
  je_editor/pyside_ui/colors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -32,7 +32,7 @@ je_editor/pyside_ui/menu/menu_bar/file_menu/build_file_menu.py,sha256=w5iuZxBaak
32
32
  je_editor/pyside_ui/menu/menu_bar/help_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  je_editor/pyside_ui/menu/menu_bar/help_menu/build_help_menu.py,sha256=XV2PnWrdqfcXcYXEjiNiMEaDp5JQaKUHO2nib8LaXyA,1327
34
34
  je_editor/pyside_ui/menu/menu_bar/run_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- je_editor/pyside_ui/menu/menu_bar/run_menu/build_run_menu.py,sha256=iaCWN-ITlSZvSVOi2BpJ9H85ZPcTTb5dY03gOev3NEg,4263
35
+ je_editor/pyside_ui/menu/menu_bar/run_menu/build_run_menu.py,sha256=8eriIuwF6L827dSm9Eay_W8aQOxn6jkraJ6YpUJQuy0,4287
36
36
  je_editor/pyside_ui/menu/menu_bar/venv_menu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
37
  je_editor/pyside_ui/menu/menu_bar/venv_menu/build_venv_menu.py,sha256=YxwK6XArmtYIS15v9imJJM8UELyY_II41s7C_xBG5UI,2427
38
38
  je_editor/pyside_ui/search_ui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -66,8 +66,8 @@ je_editor/utils/redirect_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
66
66
  je_editor/utils/redirect_manager/redirect_manager_class.py,sha256=izziweWPARG9TjvZWNgRYMnZblfHLkSyAaEW4ku9SuE,2057
67
67
  je_editor/utils/venv_check/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
68
  je_editor/utils/venv_check/check_venv.py,sha256=3HjMwqJzqY8Ir6auniyZMlL0h0TAvP3nZkOI-bR4_jA,798
69
- je_editor-0.0.119.dist-info/LICENSE,sha256=YcSMBs2sED35BtlErMkfIDye9Oo-3SYmUJiZJOpa34g,1085
70
- je_editor-0.0.119.dist-info/METADATA,sha256=5mWo8iRPNLUzRYsbifP7HbD1h2mc_O7J_97dSrLawkE,3422
71
- je_editor-0.0.119.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
72
- je_editor-0.0.119.dist-info/top_level.txt,sha256=_9YA7BgxpkmdLs-5V_UQILxClcMRgPyG1a3qaE-Bkcs,10
73
- je_editor-0.0.119.dist-info/RECORD,,
69
+ je_editor-0.0.120.dist-info/LICENSE,sha256=YcSMBs2sED35BtlErMkfIDye9Oo-3SYmUJiZJOpa34g,1085
70
+ je_editor-0.0.120.dist-info/METADATA,sha256=Gw3KKOg6nrezaz9b-C1ZoWm1yAoqpv6r5Sk8d-7bENs,3398
71
+ je_editor-0.0.120.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
72
+ je_editor-0.0.120.dist-info/top_level.txt,sha256=_9YA7BgxpkmdLs-5V_UQILxClcMRgPyG1a3qaE-Bkcs,10
73
+ je_editor-0.0.120.dist-info/RECORD,,