Skip to content

Commit 4976577

Browse files
authored
Merge pull request #70 from Integration-Automation/dev
Dev
2 parents 33490f3 + f3dad15 commit 4976577

8 files changed

Lines changed: 175 additions & 23 deletions

File tree

automation_editor/extend/process_executor/task_process_manager.py

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import os
21
import queue
3-
import shutil
42
import subprocess
53
import sys
64
import threading
@@ -14,8 +12,6 @@
1412
from je_editor.utils.venv_check.check_venv import check_and_choose_venv
1513

1614
from automation_editor.automation_editor_ui.show_code_window.code_window import CodeWindow
17-
from automation_editor.utils.exception.exception_tags import compiler_not_found_error
18-
from automation_editor.utils.exception.exceptions import ITEExecException
1915

2016

2117
class TaskProcessManager(object):
@@ -24,7 +20,7 @@ def __init__(
2420
main_window: CodeWindow,
2521
task_done_trigger_function: typing.Callable = None,
2622
error_trigger_function: typing.Callable = None,
27-
program_buffer_size: int = 1024000,
23+
program_buffer_size: int = 1024,
2824
program_encoding: str = "utf-8"
2925
):
3026
super().__init__()
@@ -57,14 +53,18 @@ def renew_path(self) -> None:
5753

5854
def start_test_process(self, package: str, exec_str: str):
5955
self.renew_path()
60-
self.process = subprocess.Popen(
61-
[
62-
self.compiler_path,
63-
"-m",
64-
package,
65-
"--execute_str",
66-
exec_str
67-
],
56+
args = [
57+
self.compiler_path,
58+
"-m",
59+
package,
60+
"--execute_str",
61+
exec_str
62+
]
63+
if sys.platform not in ["win32", "cygwin", "msys"]:
64+
args = " ".join([f"{self.compiler_path}", f"-m {package}", "--execute_str", f"{exec_str}"])
65+
print(args)
66+
self.process: subprocess.Popen = subprocess.Popen(
67+
args,
6868
stdout=subprocess.PIPE,
6969
stderr=subprocess.PIPE,
7070
shell=True
@@ -144,13 +144,18 @@ def print_and_clear_queue(self):
144144

145145
def read_program_output_from_process(self):
146146
while self.still_run_program:
147-
program_output_data = self.process.stdout.raw.read(self.program_buffer_size).decode(self.program_encoding)
147+
self.process: subprocess.Popen
148+
program_output_data = self.process.stdout.read(self.program_buffer_size).decode(self.program_encoding)
149+
if self.process:
150+
self.process.stdout.flush()
148151
if program_output_data.strip() != "":
149152
self.run_output_queue.put(program_output_data)
150153

151154
def read_program_error_output_from_process(self):
152155
while self.still_run_program:
153-
program_error_output_data = self.process.stderr.raw.read(self.program_buffer_size).decode(
156+
program_error_output_data = self.process.stderr.read(self.program_buffer_size).decode(
154157
self.program_encoding)
158+
if self.process:
159+
self.process.stderr.flush()
155160
if program_error_output_data.strip() != "":
156161
self.run_error_queue.put(program_error_output_data)

stable.toml renamed to dev.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Rename to build stable version
2-
# This is stable version
1+
# Rename to dev version
2+
# This is dev version
33
[build-system]
44
requires = ["setuptools>=61.0"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "automation_editor"
9-
version = "0.0.32"
8+
name = "automation_editor_dev"
9+
version = "0.0.33"
1010
authors = [
1111
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
1212
]
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
{
2+
"version": "auto-py-to-exe-configuration_v1",
3+
"pyinstallerOptions": [
4+
{
5+
"optionDest": "noconfirm",
6+
"value": true
7+
},
8+
{
9+
"optionDest": "filenames",
10+
"value": "/home/jeffrey/Projects/AutomationIDE/exe/start_automation_editor.py"
11+
},
12+
{
13+
"optionDest": "onefile",
14+
"value": false
15+
},
16+
{
17+
"optionDest": "console",
18+
"value": false
19+
},
20+
{
21+
"optionDest": "icon_file",
22+
"value": "/home/jeffrey/Projects/AutomationIDE/exe/je_driver_icon.ico"
23+
},
24+
{
25+
"optionDest": "name",
26+
"value": "AutomationIDE"
27+
},
28+
{
29+
"optionDest": "clean_build",
30+
"value": false
31+
},
32+
{
33+
"optionDest": "strip",
34+
"value": false
35+
},
36+
{
37+
"optionDest": "noupx",
38+
"value": false
39+
},
40+
{
41+
"optionDest": "disable_windowed_traceback",
42+
"value": false
43+
},
44+
{
45+
"optionDest": "uac_admin",
46+
"value": false
47+
},
48+
{
49+
"optionDest": "uac_uiaccess",
50+
"value": false
51+
},
52+
{
53+
"optionDest": "argv_emulation",
54+
"value": false
55+
},
56+
{
57+
"optionDest": "bootloader_ignore_signals",
58+
"value": false
59+
},
60+
{
61+
"optionDest": "datas",
62+
"value": "/home/jeffrey/Projects/AutomationIDE/exe/je_driver_icon.ico:."
63+
},
64+
{
65+
"optionDest": "datas",
66+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/yapf_third_party:yapf_third_party/"
67+
},
68+
{
69+
"optionDest": "datas",
70+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/jupyter_client:jupyter_client/"
71+
},
72+
{
73+
"optionDest": "datas",
74+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/jupyter_client-8.3.1.dist-info:jupyter_client-8.3.1.dist-info/"
75+
},
76+
{
77+
"optionDest": "datas",
78+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/jupyter_core-5.3.1.dist-info:jupyter_core-5.3.1.dist-info/"
79+
},
80+
{
81+
"optionDest": "datas",
82+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/jupyter_core:jupyter_core/"
83+
},
84+
{
85+
"optionDest": "datas",
86+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/qtconsole-5.4.4.dist-info:qtconsole-5.4.4.dist-info/"
87+
},
88+
{
89+
"optionDest": "datas",
90+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/qtconsole:qtconsole/"
91+
},
92+
{
93+
"optionDest": "datas",
94+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/ipython-8.15.0.dist-info:ipython-8.15.0.dist-info/"
95+
},
96+
{
97+
"optionDest": "datas",
98+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/IPython:IPython/"
99+
},
100+
{
101+
"optionDest": "datas",
102+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/debugpy/_vendored/pydevd/pydev_ipython:pydev_ipython/"
103+
},
104+
{
105+
"optionDest": "datas",
106+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/ipython_genutils-0.2.0.dist-info:ipython_genutils-0.2.0.dist-info/"
107+
},
108+
{
109+
"optionDest": "datas",
110+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/ipython_genutils:ipython_genutils/"
111+
},
112+
{
113+
"optionDest": "datas",
114+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/debugpy:debugpy/"
115+
},
116+
{
117+
"optionDest": "datas",
118+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/parso:parso/"
119+
},
120+
{
121+
"optionDest": "datas",
122+
"value": "/home/jeffrey/Projects/AutomationIDE/venv/lib/python3.10/site-packages/jedi:jedi/"
123+
},
124+
{
125+
"optionDest": "pathex",
126+
"value": "/home/jeffrey/Projects/AutomationIDE"
127+
}
128+
],
129+
"nonPyinstallerOptions": {
130+
"increaseRecursionLimit": true,
131+
"manualArguments": ""
132+
}
133+
}
-9.41 KB
Binary file not shown.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Package: AutomationIDE
2+
Version: 1.0.0
3+
Architecture: all
4+
Description: AutomationIDE, python IDE with automation packages.
5+
Maintainer: JE-Chen <jechenmailman@gmail.com>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[Desktop Entry]
2+
Version=1.0.0
3+
Name=AutomationIDE
4+
Comment="Python IDE with automation package"
5+
Exec=/usr/lib/AutomationIDE
6+
Icon=/usr/share/icons/je_driver_icon.ico
7+
Terminal=False
8+
Type=Application
9+
Categories=Development
Binary file not shown.

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Rename to dev version
2-
# This is dev version
1+
# Rename to build stable version
2+
# This is stable version
33
[build-system]
44
requires = ["setuptools>=61.0"]
55
build-backend = "setuptools.build_meta"
66

77
[project]
8-
name = "automation_editor_dev"
9-
version = "0.0.32"
8+
name = "automation_editor"
9+
version = "0.0.33"
1010
authors = [
1111
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
1212
]

0 commit comments

Comments
 (0)