Skip to content

Commit

Permalink
pyefun配合易函数视窗编程系统更新
Browse files Browse the repository at this point in the history
  • Loading branch information
ll committed Jul 12, 2021
1 parent 84df5d3 commit cf73495
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyefun/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
# from pyefun.encoding.ebase64.ebase64 import *
# from pyefun.encoding.url.url import *

__version__ = '1.0.27'
__version__ = '1.0.28'
9 changes: 5 additions & 4 deletions pyefun/compile/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ def 结束进程和子进程(pid):
日志.输出("kill parent proc: {} failed".format(parent_process.name))


def 运行命令(cmd, 输出=False, 环境变量PATH="", timeout=120):
def 运行命令(cmd, 输出=False, 环境变量PATH="", timeout=120, cwd=""):
global pid

if (cwd == ""):
cwd = efun.路径优化(efun.取运行目录() + "/bulidLib")
my_env = os.environ.copy()
if 环境变量PATH == "":
环境变量PATH = 编译器配置.默认编译器路径
Expand All @@ -69,7 +70,7 @@ def 运行命令(cmd, 输出=False, 环境变量PATH="", timeout=120):
stdin=subprocess.PIPE,
env=my_env,
close_fds=True,
cwd=efun.路径优化(efun.取运行目录() + "/bulidLib")
cwd=cwd
)
日志.输出(cmd)
pid = proc.pid
Expand Down Expand Up @@ -169,7 +170,7 @@ def 运行设计好的文件(文件路径):
filename=文件路径,
)
日志.输出("运行 {}".format(cmd))
ret = 运行命令(cmd, True)
ret = 运行命令(cmd, True, cwd=efun.文件_取目录(文件路径))
日志.输出("运行完毕 {}".format(cmd))


Expand Down

0 comments on commit cf73495

Please sign in to comment.