我尝试了很多事情,但出于某些原因我无法让它们工作。我正在尝试使用Python脚本运行MS VS的dumpbin实用程序。
以下是我尝试过的(但对我来说没有起作用):
1.
2.
3.
有人知道如何在Python中正确执行我正在尝试的操作吗(
以下是我尝试过的(但对我来说没有起作用):
1.
tempFile = open('C:\\Windows\\temp\\tempExports.txt', 'w')
command = '"C:/Program Files/Microsoft Visual Studio 8/VC/bin/dumpbin" /EXPORTS ' + dllFilePath
process = subprocess.Popen(command, stdout=tempFile)
process.wait()
tempFile.close()
2.
tempFile = open('C:\\Windows\\temp\\tempExports.txt', 'w')
command = 'C:/Program Files/Microsoft Visual Studio 8/VC/bin/dumpbin /EXPORTS ' + dllFilePath
process = subprocess.Popen(command, stdout=tempFile)
process.wait()
tempFile.close()
3.
tempFile = open('C:\\Windows\\temp\\tempExports.txt', 'w')
process = subprocess.Popen(['C:\\Program Files\\Microsoft Visual Studio 8\\VC\\bin\\dumpbin', '/EXPORTS', dllFilePath], stdout = tempFile)
process.wait()
tempFile.close()
有人知道如何在Python中正确执行我正在尝试的操作吗(
dumpbin /EXPORTS C:\Windows\system32\kernel32.dll > tempfile.txt
)?
'C:\\Program Files\\Microsoft Visual Studio 8\\VC\\bin\\dumpbin.exe'
了吗? - rumpel