Re: [python-win32] How do I detect a 64 bit version of Windows?

2012-02-18 Thread Brian Curtin
On Sat, Feb 18, 2012 at 21:11, Gelonida N wrote: > On 02/18/2012 09:07 PM, Brian Curtin wrote: >> On Sat, Feb 18, 2012 at 13:22, Gremlin wrote: >> >> import platform >> platform.machine() >> >> That will return "AMD64" on 64 bit. I don't have a 32-bit machine >> available but I believe it returns

Re: [python-win32] How do I detect a 64 bit version of Windows?

2012-02-18 Thread Mark Hammond
You can check for "64 bit" in sys.version (or use the platform module as suggested by Brian) - if it is there it *must* be a 64bit Windows. If it is not there (ie, it is a 32bit Python), then call win32process.IsWow64Process() - if it returns True it is a 64bit windows, otherwise 32bits. Thi

Re: [python-win32] How do I detect a 64 bit version of Windows?

2012-02-18 Thread Gelonida N
On 02/18/2012 09:07 PM, Brian Curtin wrote: > On Sat, Feb 18, 2012 at 13:22, Gremlin wrote: > > import platform > platform.machine() > > That will return "AMD64" on 64 bit. I don't have a 32-bit machine > available but I believe it returns "x86". This suggestion will not work for the OP. It wil

Re: [python-win32] Getting Remote Share User Group Names and Permissions

2012-02-18 Thread Rod Person
On Fri, 17 Feb 2012 20:20:09 + Tim Golden wrote: > On 17/02/2012 18:26, Rod Person wrote: > > > > import win32security as win32s > > > > sd = > > win32s.GetFileSecurity(sh,win32security.GROUP_SECURITY_INFORMATION) > > Assuming that "sh" here is the name of of the share > (eg \\server\share1)

Re: [python-win32] How do I detect a 64 bit version of Windows?

2012-02-18 Thread Brian Curtin
On Sat, Feb 18, 2012 at 13:22, Gremlin wrote: > This may help: > > WIN64 = 'PROGRAMFILES(X86)' in os.environ > > Best regards > > > Von: python-win32-bounces+gremlin=armarize@python.org > [mailto:python-win32-bounces+gremlin=armarize@python.org] Im Auftrag

Re: [python-win32] How do I detect a 64 bit version of Windows?

2012-02-18 Thread Gremlin
This may help: WIN64 = 'PROGRAMFILES(X86)' in os.environ Best regards _ Von: python-win32-bounces+gremlin=armarize@python.org [mailto:python-win32-bounces+gremlin=armarize@python.org] Im Auftrag von Vernon Cole Gesendet: Samstag, 18. Februar 2012 17:53 An: python-win32@

[python-win32] How do I detect a 64 bit version of Windows?

2012-02-18 Thread Vernon Cole
This is a reworded re-post of a question which I just placed to the IronPython list. I repeat it here, because I hope to get a general answer which will work on CPython, too, since the database driver I support works on both implementations. I have code which detects the "width" of the Python I am