Win32All On 64-Bit Operating Systems

Tim Daneliuk tundra at tundraware.com
Wed Mar 17 20:07:14 CET 2010


On 3/17/2010 12:05 PM, Tim Golden wrote:
> 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/

Thanks!

> 
> 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

That's not really so. Windows definitely has the notions of users and groups,
they just don't quite align with the POSIX model exactly.

-- 
----------------------------------------------------------------------------
Tim Daneliuk     tundra at tundraware.com
PGP Key:         http://www.tundraware.com/PGP/




More information about the Python-list mailing list