运行exe。pythonapi中的文件

2024-09-30 18:27:13 发布

您现在位置:Python中文网/ 问答频道 /正文

我目前正在为Plaxis编写一个python脚本,它使用远程API python环境。 我想知道我是否能运行exe。API环境中本地计算机中的文件。我试过用通常的方法来经营一家公司exe.NET文件在Python脚本中,但没有成功。非常感谢你的帮助! 这是我的密码:

from plxscripting.easy import *
s_i, g_i = new_server('localhost', 10000, password='123456')

i = "1"

a = int(16)

b = int(16)

address= "E:\\python practics\\test" + str(i) + ".p2dx"


g_i.save(address)

g_i.gotostages()

import subprocess

RmdNumGen = "E:\\python practics\\random numebr generator.exe"

process = subprocess.Popen(RmdNumGen, stdin=PIPE, stdout=PIPE, creationflags=0x08000000)

p.communicate(a,b)

g_i.InitialPhase.ShouldCalculate = True
g_i.Phase_1.ShouldCalculate = True

g_i.calculate()

exit()

Tags: 文件import脚本apitrue环境addressexe