使用Python从DLL中提取程序集版本

编程入门 行业动态 更新时间:2024-10-23 01:39:34
本文介绍了使用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.

在此页面上: 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中提取程序集版本

本文发布于:2023-11-13 14:30:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1584580.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:版本   程序   Python   DLL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!