Python and win32api
samschul at pacbell.net
Wed Oct 17 22:47:13 CEST 2001
olav.viken at kmss.no wrote in message news:<9qk64l$i3e$1 at oslo-nntp.eunet.no>...
> This is what i'm trying to do with a simple Python script:
> - Retrive the operating system on the computer the script is running
> - Retrive the service pack installed
> - Retrive the native language of the OS installed.
> The first two is easy, but last one is giving me problems.
> This is from Microsoft knowledgebase
> HOWTO: Determine Default Language ID of Windows 95 or WinNT
> Which says in part:
> | SUMMARY
> | Some applications need to get the operating system's language ID.
> | GetSystemDefaultLangID doesn't work, because the user can change it
> | in the Control Panel. [...]
> | Under both Windows NT and Windows 95, you can get the language
> | information in the FileVersionInfo of User.exe by calling
> | GetFileVersionInfo, and then VerQueryValue (on
> | on the VersionInfo block of the operating system's User.exe.
> | NOTE: This method is the most reliable. It works well under both Windows
> | NT and Windows 95. This method also works for Windows 3.1.
> I can't find the GetFileVersionInfo method under win32api, and I can't find
> another way of telling the language.
See the following URL for Sam Rushing's CALLDLL module that is part of
Windll. There is a version for Python 2.1
Also get Dynwin at this URL
"http://www.nightmare.com/~rushing/dynwin/" for support functions.
More information about the Python-list