擅长:python、mysql、java
<p>您可以从<a href="https://github.com/mhammond/pywin32" rel="nofollow noreferrer">https://github.com/mhammond/pywin32</a>使用<code>pyWin32</code>模块:</p>
<pre><code>from win32com.client import Dispatch
ver_parser = Dispatch('Scripting.FileSystemObject')
info = ver_parser.GetFileVersion(path)
if info == 'No Version Information Available':
info = None
</code></pre>