使用Python从DLL中提取程序集版本 [英] Extract Assembly Version from DLL using Python

查看:137
本文介绍了使用Python从DLL中提取程序集版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用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.

在此页面上: http://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解释器.参见例如 http://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 http://pythonnet.github.io/

这篇关于使用Python从DLL中提取程序集版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆