我正在尝试使用python从DLL中提取一些版本信息.我读了这个问题: Python Windows文件版本属性
I'm trying to extract some version information from a DLL using python. I read this question: Python windows File Version attribute
这很有帮助,但我还需要从DLL中获取汇编版本".当我右键单击并查看版本"选项卡时,它就在那里,但不确定如何使用python提取它.
It was helpful, but I also need to get the 'Assembly version' from the DLL. It's there when I right click and look on the versions tab, but not sure how I extract this with python.
在此页面上: timgolden.me.uk/python/win32_how_do_i/get_dll_version.html
蒂姆·金(Tim Golden)说:
Tim Golden says:
您可以使用稍微凌乱的 演示中与语言相关的代码 与pywin32一起找到 下方框中的字符串.
You can use the slightly more messy language-dependent code in the demos which come with pywin32 to find the strings in the box beneath it.
有人可以向我指出可能有用的示例吗?我查看了win32api目录,但没有什么明显的.我在那里找到解决方案吗?
Can someone point me to the example that might be useful? I looked in the win32api directories but there's nothing obvious. Would I find a solution there?
推荐答案我不确定您是否可以使用本机代码获得此信息.获取程序集信息的通常方法是运行.Net代码(例如C#).因此,我猜测为了能够从python执行相同的操作,您需要运行一些.Net python解释器.参见例如 pythonnet.github.io/
I'm not sure you can get at this information by using native code. The usual way of obtaining the assembly info is by running .Net code (e.g. C#). So I'm guessing in order to be able to do the same from python you'll need to run some .Net python interpreter. See for example pythonnet.github.io/
更多推荐
使用Python从DLL中提取程序集版本
发布评论