Win32All On 64-Bit Operating Systems

Tim Golden mail at timgolden.me.uk
Wed Mar 17 18:05:48 CET 2010


On 17/03/2010 16:32, Tim Daneliuk wrote:
> I have a pure-Python program developed on a POSIX platform (FreeBSD) that
> I'd like to make fully compatible with Windows systems as well.  The only
> conflict arises insofar as this program makes considerable use of the
> stat UID and GID values, as well as their corresponding user- and group
> names.  Since Windows has not grp and pwd modules, I need to synthesize
> this.
>
> In the past, I've solved this problem by detecting the presence of Win32All.
> If present, I do the necessary magic to return the true UID/name, GID/name
> info from Windows itself.  If not, I return UID/GID as provided by an
> os.stat call and use the phoby names "winuser" and "wingroup" respectively.
>
> Now for the question:  Is there even an instance of Win32All for 64-bit
> OSs like Vista and Win7?  If not, I'm inclined not bother with it at all
> and just return the phony values as placeholders because I do not want
> different features on 32- and 64-bit platforms.

Looks like it:

   http://sourceforge.net/projects/pywin32/files/

but, frankly, I wouldn't bother with the uid/gid thing on
Windows. It's nearly meaningless most of the time. Just
return placeholders.

TJG



More information about the Python-list mailing list