File version on Windows

Bryan belred1 at yahoo.com
Thu May 22 22:34:43 EDT 2003


wouldn't ctypes work just as well?

"Roger Upole" <rupole at hotmail.com> wrote in message
news:3ecd46b3_1 at corp-news.newsgroups.com...
> You can use win32com to get file versions:
> import win32com.client
> fo=win32com.client.Dispatch('Scripting.filesystemobject')
> print fo.GetFileVersion('c:\\winnt\\system32\\cmd.exe')
>   hth
>      Roger
>
> "Eugene C." <hc_74 at yahoo.com> wrote in message
> news:N8bza.47312$h42.24602 at twister.nyc.rr.com...
> >
> > "Steve Holden" <sholden at holdenweb.com> wrote in message
> > news:0Naza.124120$3n5.74832 at news2.central.cox.net...
> > > "Eugene C." <hc_74 at yahoo.com> wrote ...
> > >
> > > > Hey all. I've been browsing the Python documents and the Internet
for
> > > > information on retrieving the version of a file on Windows-based
> > machines.
> > > > It seems there is a Win32API method called GetFileVersionInfo()
which
> > > > retrieves the version information from a file. However, the win32api
> > > module
> > > > (from win32all extensions) which comes with ActiveState Python does
> not
> > > > include this method. Anyone have any ideas how I can get file
version
> > > info?
> > > > Thanks much!
> > > >
> > >
> > > My usual answer to questions like this is "grovel to Mark Hammond",
but
> a
> > > lot will depend on how much paying work he currently has :-)
> > >
> > > Otherwise you'll have to add the necessary code yourself -- win32all
is
> > open
> > > source, after all.
> > >
> > > regards
> > > --
> > > Steve Holden
http://www.holdenweb.com/
> > > Python Web Programming
http://pydish.holdenweb.com/pwp/
> > >
> > >
> > >
> > *sigh* If I only knew C/C++....ah well, guess I'll have to wait till
> someone
> > does it. Thanks anyway Steve. Btw, great book PWP!
> >
> >
>
>






More information about the Python-list mailing list