je-editor 0.0.213__tar.gz → 0.0.214__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.
- {je_editor-0.0.213 → je_editor-0.0.214}/PKG-INFO +1 -1
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/code_process/code_exec.py +27 -11
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/shell_process/shell_exec.py +29 -14
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/editor/editor_widget.py +9 -3
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/main_editor.py +12 -6
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/python_env_menu/build_venv_menu.py +9 -3
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor.egg-info/PKG-INFO +1 -1
- {je_editor-0.0.213 → je_editor-0.0.214}/pyproject.toml +1 -1
- {je_editor-0.0.213 → je_editor-0.0.214}/LICENSE +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/README.md +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/__main__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/code_scan/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/code_scan/ruff_thread.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/code_scan/watchdog_implement.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/code_scan/watchdog_thread.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/browser/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/browser/browser_download_window.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/browser/browser_serach_lineedit.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/browser/browser_view.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/browser/browser_widget.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/auto_save/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/auto_save/auto_save_manager.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/auto_save/auto_save_thread.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/code_format/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/code_format/pep8_format.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/code_process/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/plaintext_code_edit/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/plaintext_code_edit/code_edit_plaintext.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/running_process_manager.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/shell_process/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/syntax/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/syntax/python_syntax.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/syntax/syntax_setting.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/textedit_code_result/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/textedit_code_result/code_record.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/variable_inspector/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/variable_inspector/inspector_gui.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/ai_dialog/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/ai_dialog/set_ai_dialog.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/file_dialog/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/file_dialog/create_file_dialog.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/file_dialog/open_file_dialog.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/file_dialog/save_file_dialog.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/search_ui/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/search_ui/search_error_box.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/search_ui/search_text_box.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/console_widget/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/console_widget/console_gui.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/console_widget/qprocess_adapter.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/dock/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/dock/destroy_dock.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/editor/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/editor/editor_widget_dock.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/editor/process_input.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/ipython_widget/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/ipython_widget/rich_jupyter.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/dock_menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/dock_menu/build_dock_menu.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/file_menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/file_menu/build_file_menu.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/help_menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/help_menu/build_help_menu.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/language_menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/language_menu/build_language_server.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/python_env_menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/run_menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/run_menu/build_run_menu.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/build_debug_menu.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/build_program_menu.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/build_shell_menu.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/run_menu/under_run_menu/utils.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/set_menu_bar.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/style_menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/style_menu/build_style_menu.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/tab_menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/text_menu/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/text_menu/build_text_menu.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/save_settings/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/save_settings/setting_utils.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/save_settings/user_color_setting_file.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/save_settings/user_setting_file.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/system_tray/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/system_tray/extend_system_tray.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/start_editor.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/encodings/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/encodings/python_encodings.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/exception/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/exception/exception_tags.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/exception/exceptions.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/file/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/file/open/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/file/open/open_file.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/file/save/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/file/save/save_file.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/json/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/json/json_file.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/json_format/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/json_format/json_process.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/logging/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/logging/loggin_instance.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/multi_language/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/multi_language/english.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/multi_language/multi_language_wrapper.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/multi_language/traditional_chinese.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/redirect_manager/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/redirect_manager/redirect_manager_class.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/venv_check/__init__.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/venv_check/check_venv.py +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor.egg-info/SOURCES.txt +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor.egg-info/dependency_links.txt +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor.egg-info/requires.txt +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/je_editor.egg-info/top_level.txt +0 -0
- {je_editor-0.0.213 → je_editor-0.0.214}/setup.cfg +0 -0
@@ -8,6 +8,7 @@ from threading import Thread
|
|
8
8
|
from typing import Union
|
9
9
|
|
10
10
|
from PySide6.QtCore import QTimer
|
11
|
+
from PySide6.QtGui import QTextCharFormat
|
11
12
|
from PySide6.QtWidgets import QTextEdit
|
12
13
|
|
13
14
|
from je_editor.pyside_ui.code.running_process_manager import run_instance_manager
|
@@ -43,6 +44,7 @@ class ExecManager(object):
|
|
43
44
|
self.main_window: EditorWidget = main_window
|
44
45
|
self.compiler_path = None
|
45
46
|
self.code_result: Union[QTextEdit, None] = None
|
47
|
+
self.code_result_cursor: Union[QTextEdit.textCursor, None] = None
|
46
48
|
self.timer: Union[QTimer, None] = None
|
47
49
|
self.still_run_program = True
|
48
50
|
self.process: Union[subprocess.Popen, None] = None
|
@@ -86,7 +88,6 @@ class ExecManager(object):
|
|
86
88
|
f"exec_prefix: {exec_prefix}")
|
87
89
|
try:
|
88
90
|
self.exit_program()
|
89
|
-
self.code_result.setTextColor(actually_color_dict.get("normal_output_color"))
|
90
91
|
self.code_result.setPlainText("")
|
91
92
|
file_path = Path(exec_file_name)
|
92
93
|
reformat_os_file_path = str(file_path.absolute())
|
@@ -127,7 +128,11 @@ class ExecManager(object):
|
|
127
128
|
)
|
128
129
|
self.read_program_error_output_from_thread.start()
|
129
130
|
# show which file execute
|
130
|
-
self.code_result.
|
131
|
+
text_cursor = self.code_result.textCursor()
|
132
|
+
text_format = QTextCharFormat()
|
133
|
+
text_format.setForeground(actually_color_dict.get("normal_output_color"))
|
134
|
+
text_cursor.insertText(self.compiler_path + " " + reformat_os_file_path, text_format)
|
135
|
+
text_cursor.insertBlock()
|
131
136
|
# start tkinter_ui update
|
132
137
|
# start timer
|
133
138
|
self.timer = QTimer(self.main_window)
|
@@ -135,9 +140,11 @@ class ExecManager(object):
|
|
135
140
|
self.timer.timeout.connect(self.pull_text)
|
136
141
|
self.timer.start()
|
137
142
|
except Exception as error:
|
138
|
-
self.code_result.
|
139
|
-
|
140
|
-
|
143
|
+
text_cursor = self.code_result.textCursor()
|
144
|
+
text_format = QTextCharFormat()
|
145
|
+
text_format.setForeground(actually_color_dict.get("normal_output_color"))
|
146
|
+
text_cursor.insertText(str(error), text_format)
|
147
|
+
text_cursor.insertBlock()
|
141
148
|
if self.process is not None:
|
142
149
|
self.process.terminate()
|
143
150
|
|
@@ -151,19 +158,24 @@ class ExecManager(object):
|
|
151
158
|
jeditor_logger.info("ExecManager pull_text")
|
152
159
|
# Pull text from queue and put in code result area
|
153
160
|
try:
|
154
|
-
self.code_result.setTextColor(actually_color_dict.get("normal_output_color"))
|
155
161
|
if not self.run_output_queue.empty():
|
156
162
|
output_message = self.run_output_queue.get_nowait()
|
157
163
|
output_message = str(output_message).strip()
|
158
164
|
if output_message:
|
159
|
-
self.code_result.
|
160
|
-
|
165
|
+
text_cursor = self.code_result.textCursor()
|
166
|
+
text_format = QTextCharFormat()
|
167
|
+
text_format.setForeground(actually_color_dict.get("normal_output_color"))
|
168
|
+
text_cursor.insertText(output_message, text_format)
|
169
|
+
text_cursor.insertBlock()
|
161
170
|
if not self.run_error_queue.empty():
|
162
171
|
error_message = self.run_error_queue.get_nowait()
|
163
172
|
error_message = str(error_message).strip()
|
164
173
|
if error_message:
|
165
|
-
self.code_result.
|
166
|
-
|
174
|
+
text_cursor = self.code_result.textCursor()
|
175
|
+
text_format = QTextCharFormat()
|
176
|
+
text_format.setForeground(actually_color_dict.get("error_output_color"))
|
177
|
+
text_cursor.insertText(error_message, text_format)
|
178
|
+
text_cursor.insertBlock()
|
167
179
|
except queue.Empty:
|
168
180
|
pass
|
169
181
|
if self.process.returncode == 0:
|
@@ -185,7 +197,11 @@ class ExecManager(object):
|
|
185
197
|
self.print_and_clear_queue()
|
186
198
|
if self.process is not None:
|
187
199
|
self.process.terminate()
|
188
|
-
self.code_result.
|
200
|
+
text_cursor = self.code_result.textCursor()
|
201
|
+
text_format = QTextCharFormat()
|
202
|
+
text_format.setForeground(actually_color_dict.get("normal_output_color"))
|
203
|
+
text_cursor.insertText(f"Program exit with code {self.process.returncode}", text_format)
|
204
|
+
text_cursor.insertBlock()
|
189
205
|
self.process = None
|
190
206
|
|
191
207
|
# Pull all remain string on queue and add to code result area
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/shell_process/shell_exec.py
RENAMED
@@ -10,6 +10,7 @@ from threading import Thread
|
|
10
10
|
from typing import Union, Callable
|
11
11
|
|
12
12
|
from PySide6.QtCore import QTimer
|
13
|
+
from PySide6.QtGui import QTextCharFormat
|
13
14
|
from PySide6.QtWidgets import QTextEdit
|
14
15
|
|
15
16
|
from je_editor.pyside_ui.code.running_process_manager import run_instance_manager
|
@@ -48,8 +49,8 @@ class ShellManager(object):
|
|
48
49
|
self.timer: Union[QTimer, None] = None
|
49
50
|
self.still_run_shell: bool = True
|
50
51
|
self.process = None
|
51
|
-
self.run_output_queue: queue = queue.Queue()
|
52
|
-
self.run_error_queue: queue = queue.Queue()
|
52
|
+
self.run_output_queue: queue.Queue = queue.Queue()
|
53
|
+
self.run_error_queue: queue.Queue = queue.Queue()
|
53
54
|
self.program_encoding: str = shell_encoding
|
54
55
|
self.program_buffer: int = program_buffer
|
55
56
|
self.after_done_function = after_done_function
|
@@ -75,7 +76,7 @@ class ShellManager(object):
|
|
75
76
|
else:
|
76
77
|
raise JEditorException(je_editor_init_error)
|
77
78
|
|
78
|
-
def exec_shell(self, shell_command: [str, list]) -> None:
|
79
|
+
def exec_shell(self, shell_command: Union[str, list]) -> None:
|
79
80
|
"""
|
80
81
|
:param shell_command: shell command will run
|
81
82
|
:return: if error return result and True else return result and False
|
@@ -83,13 +84,16 @@ class ShellManager(object):
|
|
83
84
|
jeditor_logger.info(f"ShellManager exec_shell, shell_command: {shell_command}")
|
84
85
|
try:
|
85
86
|
self.exit_program()
|
86
|
-
self.code_result.setTextColor(actually_color_dict.get("normal_output_color"))
|
87
87
|
self.code_result.setPlainText("")
|
88
88
|
if sys.platform in ["win32", "cygwin", "msys"]:
|
89
89
|
args = shell_command
|
90
90
|
else:
|
91
91
|
args = shlex.split(shell_command)
|
92
|
-
self.code_result.
|
92
|
+
text_cursor = self.code_result.textCursor()
|
93
|
+
text_format = QTextCharFormat()
|
94
|
+
text_format.setForeground(actually_color_dict.get("normal_output_color"))
|
95
|
+
text_cursor.insertText(str(args), text_format)
|
96
|
+
text_cursor.insertBlock()
|
93
97
|
self.process = subprocess.Popen(
|
94
98
|
args=args,
|
95
99
|
stdout=subprocess.PIPE,
|
@@ -116,9 +120,11 @@ class ShellManager(object):
|
|
116
120
|
self.timer.timeout.connect(self.pull_text)
|
117
121
|
self.timer.start()
|
118
122
|
except Exception as error:
|
119
|
-
self.code_result.
|
120
|
-
|
121
|
-
|
123
|
+
text_cursor = self.code_result.textCursor()
|
124
|
+
text_format = QTextCharFormat()
|
125
|
+
text_format.setForeground(actually_color_dict.get("error_output_color"))
|
126
|
+
text_cursor.insertText(str(error), text_format)
|
127
|
+
text_cursor.insertBlock()
|
122
128
|
if self.process is not None:
|
123
129
|
self.process.terminate()
|
124
130
|
|
@@ -126,19 +132,24 @@ class ShellManager(object):
|
|
126
132
|
def pull_text(self) -> None:
|
127
133
|
jeditor_logger.info("ShellManager pull_text")
|
128
134
|
try:
|
129
|
-
self.code_result.setTextColor(actually_color_dict.get("normal_output_color"))
|
130
135
|
if not self.run_output_queue.empty():
|
131
136
|
output_message = self.run_output_queue.get_nowait()
|
132
137
|
output_message = str(output_message).strip()
|
133
138
|
if output_message:
|
134
|
-
self.code_result.
|
135
|
-
|
139
|
+
text_cursor = self.code_result.textCursor()
|
140
|
+
text_format = QTextCharFormat()
|
141
|
+
text_format.setForeground(actually_color_dict.get("normal_output_color"))
|
142
|
+
text_cursor.insertText(output_message, text_format)
|
143
|
+
text_cursor.insertBlock()
|
136
144
|
if not self.run_error_queue.empty():
|
137
145
|
error_message = self.run_error_queue.get_nowait()
|
138
146
|
error_message = str(error_message).strip()
|
139
147
|
if error_message:
|
140
|
-
self.code_result.
|
141
|
-
|
148
|
+
text_cursor = self.code_result.textCursor()
|
149
|
+
text_format = QTextCharFormat()
|
150
|
+
text_format.setForeground(actually_color_dict.get("error_output_color"))
|
151
|
+
text_cursor.insertText(error_message, text_format)
|
152
|
+
text_cursor.insertBlock()
|
142
153
|
except queue.Empty:
|
143
154
|
pass
|
144
155
|
if self.process.returncode == 0:
|
@@ -168,7 +179,11 @@ class ShellManager(object):
|
|
168
179
|
self.print_and_clear_queue()
|
169
180
|
if self.process is not None:
|
170
181
|
self.process.terminate()
|
171
|
-
self.code_result.
|
182
|
+
text_cursor = self.code_result.textCursor()
|
183
|
+
text_format = QTextCharFormat()
|
184
|
+
text_format.setForeground(actually_color_dict.get("normal_output_color"))
|
185
|
+
text_cursor.insertText(f"Shell command exit with code {self.process.returncode}", text_format)
|
186
|
+
text_cursor.insertBlock()
|
172
187
|
self.process = None
|
173
188
|
|
174
189
|
def print_and_clear_queue(self) -> None:
|
@@ -2,6 +2,8 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
from typing import TYPE_CHECKING
|
4
4
|
|
5
|
+
from PySide6.QtGui import QTextCharFormat
|
6
|
+
|
5
7
|
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
6
8
|
from je_editor.utils.multi_language.multi_language_wrapper import language_wrapper
|
7
9
|
|
@@ -38,7 +40,7 @@ class EditorWidget(QWidget):
|
|
38
40
|
self.checker: Union[PEP8FormatChecker, None] = None
|
39
41
|
self.current_file = None
|
40
42
|
self.tree_view_scroll_area = None
|
41
|
-
self.project_treeview = None
|
43
|
+
self.project_treeview: Union[QTreeView, None] = None
|
42
44
|
self.project_treeview_model = None
|
43
45
|
self.python_compiler = None
|
44
46
|
self.main_window = main_window
|
@@ -64,6 +66,7 @@ class EditorWidget(QWidget):
|
|
64
66
|
# code edit and code result plaintext
|
65
67
|
self.code_edit = CodeEditor(self)
|
66
68
|
self.code_result = CodeRecord()
|
69
|
+
self.code_result_cursor = self.code_result.textCursor()
|
67
70
|
self.code_edit_scroll_area = QScrollArea()
|
68
71
|
self.code_edit_scroll_area.setWidgetResizable(True)
|
69
72
|
self.code_edit_scroll_area.setViewportMargins(0, 0, 0, 0)
|
@@ -74,7 +77,6 @@ class EditorWidget(QWidget):
|
|
74
77
|
self.code_result_scroll_area.setWidget(self.code_result)
|
75
78
|
# Code format checker
|
76
79
|
self.format_check_result = CodeRecord()
|
77
|
-
self.format_check_result.setTextColor(actually_color_dict.get("warning_output_color"))
|
78
80
|
# Debugger
|
79
81
|
self.debugger_result = CodeRecord()
|
80
82
|
# Code result tab
|
@@ -192,7 +194,11 @@ class EditorWidget(QWidget):
|
|
192
194
|
self.checker.check_all_format()
|
193
195
|
self.format_check_result.setPlainText("")
|
194
196
|
for error in self.checker.error_list:
|
195
|
-
self.format_check_result.
|
197
|
+
text_cursor = self.format_check_result.textCursor()
|
198
|
+
text_format = QTextCharFormat()
|
199
|
+
text_format.setForeground(actually_color_dict.get("error_output_color"))
|
200
|
+
text_cursor.insertText(error, text_format)
|
201
|
+
text_cursor.insertBlock()
|
196
202
|
self.checker.error_list.clear()
|
197
203
|
else:
|
198
204
|
message_box = QMessageBox()
|
@@ -6,7 +6,7 @@ from typing import Dict, Type
|
|
6
6
|
|
7
7
|
import jedi.settings
|
8
8
|
from PySide6.QtCore import QTimer, QEvent
|
9
|
-
from PySide6.QtGui import QFontDatabase, QIcon, Qt
|
9
|
+
from PySide6.QtGui import QFontDatabase, QIcon, Qt, QTextCharFormat
|
10
10
|
from PySide6.QtWidgets import QMainWindow, QWidget, QTabWidget, QMessageBox
|
11
11
|
from frontengine import FrontEngineMainUI
|
12
12
|
from qt_material import QtStyleTools
|
@@ -16,7 +16,7 @@ from je_editor.pyside_ui.code.auto_save.auto_save_manager import init_new_auto_s
|
|
16
16
|
from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
|
17
17
|
from je_editor.pyside_ui.main_ui.menu.set_menu_bar import set_menu_bar
|
18
18
|
from je_editor.pyside_ui.main_ui.save_settings.user_color_setting_file import write_user_color_setting, \
|
19
|
-
read_user_color_setting, update_actually_color_dict
|
19
|
+
read_user_color_setting, update_actually_color_dict, actually_color_dict
|
20
20
|
from je_editor.pyside_ui.main_ui.save_settings.user_setting_file import user_setting_dict, read_user_setting, \
|
21
21
|
write_user_setting
|
22
22
|
from je_editor.pyside_ui.main_ui.system_tray.extend_system_tray import ExtendSystemTray
|
@@ -141,14 +141,20 @@ class EditorMain(QMainWindow, QtStyleTools):
|
|
141
141
|
output_message = redirect_manager_instance.std_out_queue.get_nowait()
|
142
142
|
output_message = str(output_message).strip()
|
143
143
|
if output_message:
|
144
|
-
|
145
|
-
|
144
|
+
text_cursor = self.code_result.textCursor()
|
145
|
+
text_format = QTextCharFormat()
|
146
|
+
text_format.setForeground(actually_color_dict.get("normal_output_color"))
|
147
|
+
text_cursor.insertText(output_message, text_format)
|
148
|
+
text_cursor.insertBlock()
|
146
149
|
if not redirect_manager_instance.std_err_queue.empty():
|
147
150
|
error_message = redirect_manager_instance.std_err_queue.get_nowait()
|
148
151
|
error_message = str(error_message).strip()
|
149
152
|
if error_message:
|
150
|
-
|
151
|
-
|
153
|
+
text_cursor = self.code_result.textCursor()
|
154
|
+
text_format = QTextCharFormat()
|
155
|
+
text_format.setForeground(actually_color_dict.get("error_output_color"))
|
156
|
+
text_cursor.insertText(error_message, text_format)
|
157
|
+
text_cursor.insertBlock()
|
152
158
|
break
|
153
159
|
|
154
160
|
def startup_setting(self) -> None:
|
@@ -2,6 +2,8 @@ from __future__ import annotations
|
|
2
2
|
|
3
3
|
from typing import TYPE_CHECKING
|
4
4
|
|
5
|
+
from je_editor.pyside_ui.main_ui.save_settings.user_color_setting_file import actually_color_dict
|
6
|
+
|
5
7
|
from je_editor.pyside_ui.main_ui.editor.editor_widget import EditorWidget
|
6
8
|
from je_editor.pyside_ui.main_ui.save_settings.user_setting_file import user_setting_dict
|
7
9
|
from je_editor.utils.logging.loggin_instance import jeditor_logger
|
@@ -11,7 +13,7 @@ if TYPE_CHECKING:
|
|
11
13
|
import os
|
12
14
|
from pathlib import Path
|
13
15
|
|
14
|
-
from PySide6.QtGui import QAction, QKeySequence
|
16
|
+
from PySide6.QtGui import QAction, QKeySequence, QTextCharFormat
|
15
17
|
from PySide6.QtWidgets import QMessageBox, QInputDialog, QFileDialog
|
16
18
|
|
17
19
|
from je_editor.pyside_ui.code.shell_process.shell_exec import ShellManager
|
@@ -76,8 +78,12 @@ def create_venv(ui_we_want_to_set: EditorMain) -> None:
|
|
76
78
|
create_venv_shell.exec_shell(
|
77
79
|
[f"{create_venv_shell.compiler_path}", "-m", "venv", "venv"]
|
78
80
|
)
|
79
|
-
widget.code_result.
|
80
|
-
|
81
|
+
text_cursor = widget.code_result.textCursor()
|
82
|
+
text_format = QTextCharFormat()
|
83
|
+
text_format.setForeground(actually_color_dict.get("normal_output_color"))
|
84
|
+
text_cursor.insertText(
|
85
|
+
language_wrapper.language_word_dict.get("python_env_menu_creating_venv_message"), text_format)
|
86
|
+
text_cursor.insertBlock()
|
81
87
|
else:
|
82
88
|
message_box = QMessageBox()
|
83
89
|
message_box.setText(
|
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
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/browser/browser_download_window.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/browser/browser_serach_lineedit.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/auto_save/auto_save_manager.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/auto_save/auto_save_thread.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/plaintext_code_edit/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/textedit_code_result/__init__.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/textedit_code_result/code_record.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/variable_inspector/__init__.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/code/variable_inspector/inspector_gui.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/ai_dialog/set_ai_dialog.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/file_dialog/create_file_dialog.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/file_dialog/open_file_dialog.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/file_dialog/save_file_dialog.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/search_ui/search_error_box.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/dialog/search_ui/search_text_box.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/console_widget/__init__.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/console_widget/console_gui.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/editor/editor_widget_dock.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/ipython_widget/__init__.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/ipython_widget/rich_jupyter.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/dock_menu/__init__.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/file_menu/__init__.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/help_menu/__init__.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/language_menu/__init__.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/python_env_menu/__init__.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/run_menu/__init__.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/run_menu/build_run_menu.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/style_menu/__init__.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/tab_menu/__init__.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/tab_menu/build_tab_menu.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/menu/text_menu/__init__.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/save_settings/__init__.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/pyside_ui/main_ui/save_settings/setting_utils.py
RENAMED
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
|
File without changes
|
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/multi_language/multi_language_wrapper.py
RENAMED
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/multi_language/traditional_chinese.py
RENAMED
File without changes
|
File without changes
|
{je_editor-0.0.213 → je_editor-0.0.214}/je_editor/utils/redirect_manager/redirect_manager_class.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|