我正在尝试使用pyodbc连接到数据库。我可以使用ODBC数据源通过runas
命令进行连接,但我似乎无法执行相同的python脚本。你知道吗
示例:
# this works
runas /netonly /user:domain\username "C:\Windows\System32\odbcad32.exe"
# this does not
runas /netonly /user:domain\username "C:\path\to\python.exe C:\path\to\script.py"
尝试执行python脚本时,窗口会快速打开和关闭。 在脚本中有一个无限打印,以确保脚本正在执行。你知道吗
#script.py
import time
while True:
print("running")
time.sleep(5)
目前没有回答
相关问题 更多 >
编程相关推荐