Re: [python-win32] Check if user has windows administrator

2008-01-14 Thread Mark Hammond
I should have been clearer - I need to come up with a way of integrating that into distutils somehow. I could make a local patch, but that is error prone and makes it hard for others to reproduce my builds. Having said that though, it is possible I will do exactly that if it starts truly holding

Re: [python-win32] Check if user has windows administrator

2008-01-14 Thread Michel Claveau
Hi! > force bdist_wininst executables to request elevation ? Sorry, not a real answer, (rather information). On Vista, install is detected by Vista, and run automatically with elevation. In theory. Because, in practice, it's true, or it's false, sometimes... Perso, for my install softs, I us

Re: [python-win32] Check if user has windows administrator

2008-01-14 Thread Mark Hammond
> Follow-up question. > > Why does type-ahead in PythonWin not show more functions after > ctypes.windll. ? > > Is this because of late-binding??? pythonwin basically just does a dir() of the name and the class, with special support for COM objects. See _AutoComplete() in pywin/scintilla/view.p

Re: [python-win32] Check if user has windows administrator

2008-01-14 Thread Tony Cappellini
Follow-up question. Why does type-ahead in PythonWin not show more functions after ctypes.windll. ? Is this because of late-binding??? Message: 3 Date: Mon, 14 Jan 2008 21:29:39 +0200 From: "Graeme Glass" <[EMAIL PROTECTED]> Subject: Re: [python-win32] Check if user has windows administrator

Re: [python-win32] Check if user has windows administrator privilege

2008-01-14 Thread Johri, Mayank (GTI)
Patrick, this might help you. http://support.microsoft.com/kb/q118626/ Thanks and Regards, Mayank Johri Merrill Lynch & Co. Ph: 212.647.3076 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick Li Sent: Monday, January 1

Re: [python-win32] HRGN, RGNDATA, RGNDATAHEADER

2008-01-14 Thread Tim Roberts
Henry Baxter wrote: > > I created a region from a series of points, used the region, and > everything works perfectly. I'm interested to know if you know of a > better way to do what I'm doing though, since you are obviously quite > knowledgeable :) > > I have an application with a graphical bac

Re: [python-win32] HRGN, RGNDATA, RGNDATAHEADER

2008-01-14 Thread Henry Baxter
Thanks Tim, all of that makes a lot of sense. I created a region from a series of points, used the region, and everything works perfectly. I'm interested to know if you know of a better way to do what I'm doing though, since you are obviously quite knowledgeable :) I have an application with a gr

Re: [python-win32] HRGN, RGNDATA, RGNDATAHEADER

2008-01-14 Thread Tim Roberts
Henry Baxter wrote: > > I'm having some trouble working with window 'regions'. I need to > initialize some memory for the region and work with it. > > I have copied my best approach so far, but I know I don't know what > I'm doing when it comes to the 'Buffer' field in RGNDATA. MSDN > describes

Re: [python-win32] Starting a .exe py2exe program in background mode.

2008-01-14 Thread Larry Bates
João Abrantes wrote: > Hello everyone. > I have made a python program and converted into an executable using > py2exe. Now I want him to start on windows startup without showing the > DOS Window... I have registered the program on windows startup registry key: > > key = _winreg.OpenKey(_winr

[python-win32] HRGN, RGNDATA, RGNDATAHEADER

2008-01-14 Thread Henry Baxter
Hello, I'm having some trouble working with window 'regions'. I need to initialize some memory for the region and work with it. I have copied my best approach so far, but I know I don't know what I'm doing when it comes to the 'Buffer' field in RGNDATA. MSDN describes what HRGN points to (a RGNDA

Re: [python-win32] Check if user has windows administrator privilege

2008-01-14 Thread Simon Dahlbacka
> > import ctypes > print ctypes.windll.shell32.IsUserAnAdmin() > > (Courtesy of Thomas Heller - from a posting back in 2006) > > I have no idea if it will work on Vista. You will need to try it. > It kinda works on Vista. If you're running from an elevated console then it will return 1, othervise

Re: [python-win32] Check if user has windows administrator privilege

2008-01-14 Thread Graeme Glass
On Jan 14, 2008 8:55 PM, Patrick Li <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know if there's a way to programmatically check to see if a > user has windows administrator privilege? I need this to work in WinXP and > Vista. > > Thanks in advance, > Patrick > > > ___

[python-win32] Check if user has windows administrator privilege

2008-01-14 Thread Patrick Li
Hi, Does anyone know if there's a way to programmatically check to see if a user has windows administrator privilege? I need this to work in WinXP and Vista. Thanks in advance, Patrick ___ python-win32 mailing list python-win32@python.org http://mail.p

Re: [python-win32] Finding users home directories

2008-01-14 Thread Giampaolo Rodola'
2008/1/14, Tim Golden <[EMAIL PROTECTED]>: > Giampaolo Rodola' wrote: > > 2008/1/12, Tim Golden <[EMAIL PROTECTED]>: > >> Giampaolo Rodola' wrote: > >>> I'm trying to use the pywin32 extension to find out the users home > >>> directories. > >>> Currently I found a way for doing that but it require

Re: [python-win32] How to use OpenOffice with win32com - saving andevent handling?

2008-01-14 Thread Michel Claveau
Hi! I have a class (not finished, but run OK), for drive OOo from PyWin32. See below. @+ Michel Claveau # # -*- coding: cp1252 -*- # # by Michel Claveau Informatique # http://mclaveau.com # import types import time import o

Re: [python-win32] Finding users home directories

2008-01-14 Thread Tim Golden
Giampaolo Rodola' wrote: > 2008/1/12, Tim Golden <[EMAIL PROTECTED]>: >> Giampaolo Rodola' wrote: >>> I'm trying to use the pywin32 extension to find out the users home >>> directories. >>> Currently I found a way for doing that but it requires to validate the >>> user by providing its username +

[python-win32] How to use OpenOffice with win32com - saving and event handling?

2008-01-14 Thread Wojtek P
Hello :) I use python code to connect to MS Word and OpenOffice from python application.I have script code for Word, but i can't find any script to event handling for OpenOffice (by COM interface) :/ I need connect to events: OnQuit OnDocumentOpen OnDocumentBeforeSave OnDocumentBeforeClos

Re: [python-win32] Finding users home directories

2008-01-14 Thread Giampaolo Rodola'
2008/1/12, Tim Golden <[EMAIL PROTECTED]>: > Giampaolo Rodola' wrote: > > I'm trying to use the pywin32 extension to find out the users home > > directories. > > Currently I found a way for doing that but it requires to validate the > > user by providing its username + password: > > > > def get_ho

[python-win32] Suitability of PyWin32 to manipulate windows

2008-01-14 Thread Torbjørn Kristoffersen
Hello, I'm not very familiar with Windows programming, so I would very much like some advice here. My goal is to start two programs from Python in Windows. These two windows will be maximized and cover the entire screen. Is Pywin32 capable of keeping track of these two programs, and control them

Re: [python-win32] Custom control, WS_CHILD

2008-01-14 Thread Henry Baxter
Very cool :) Thank you Thomas On Jan 13, 2008 11:14 PM, Thomas Heller <[EMAIL PROTECTED]> wrote: > Henry Baxter schrieb: > > Thanks for the tip, venster not only has a neat way to resolve this > issue, > > but plenty of other really useful things (lists of windows constants and > > other stuff th