Re: [python-win32] MSI installer or zip file for pywin32?

2010-04-15 Thread Mark Hammond
On 9/04/2010 5:25 AM, Kevin Horn wrote: On Tue, Apr 6, 2010 at 5:26 PM, Mark Hammond mhamm...@skippinet.com.au mailto:mhamm...@skippinet.com.au wrote: On 7/04/2010 6:13 AM, Bill Janssen wrote: Just for the moment, I think I'll see if I can get things working by copying

[python-win32] shutdown remote locked PC

2010-04-15 Thread pacopyc
Hi, I've a problem with locked PCs. I can shutdown them (with WMI), but only if they are unlocked. How can I resolve it? Can you help me? Thank you very much ___ python-win32 mailing list python-win32@python.org

Re: [python-win32] shutdown remote locked PC

2010-04-15 Thread Tim Golden
On 15/04/2010 11:11, pacopyc wrote: Hi, I've a problem with locked PCs. I can shutdown them (with WMI), but only if they are unlocked. How can I resolve it? Can you help me? Have you tried passing flags to the Win32_Shutdown method to indicate a forced shutdown / logoff? I can't try it at the

Re: [python-win32] shutdown remote locked PC

2010-04-15 Thread Kelly Black
On Thu, Apr 15, 2010 at 12:11:03PM +0200, pacopyc wrote: Hi, I've a problem with locked PCs. I can shutdown them (with WMI), but only if they are unlocked. How can I resolve it? Can you help me? I think you can probably take the example here:

[python-win32] problems with subprocess module and env parameter

2010-04-15 Thread Bill Janssen
When I call subprocess.Popen(), I'm getting an error from what I believe is win32process.CreateProcess: Traceback (most recent call last): File TestAdds.py, line 950, in testNoPasswordNoGuardian (UPLIB_MAKE_REPOSITORY, self.port, self.directory)) File TestAdds.py, line 96, in runSubProc

[python-win32] How to get the pywin version number?

2010-04-15 Thread Marc-Andre Belzile
Hi, what is the recommended way of getting the pywin version number from python ? I'm currently using this snipet: import os import distutils import distutils.sysconfig site_packages = distutils.sysconfig.get_python_lib(plat_specific=1) build_no = open(os.path.join(site_packages,

Re: [python-win32] problems with subprocess module and env parameter

2010-04-15 Thread Preston Landers
Your PATH is a Unicode string. I'm not sure offhand if that's acceptable or not, but all the rest of the strings appear to be regular (non-unicode) strings. You could also try: import types for k, v in env.iteritems(): if type(v) is not types.StringType: print k, v hope this helps,

Re: [python-win32] problems with subprocess module and env parameter

2010-04-15 Thread Bill Janssen
Preston Landers pland...@gmail.com wrote: Your PATH is a Unicode string. I'm not sure offhand if that's acceptable or not, but all the rest of the strings appear to be regular (non-unicode) strings. You could also try: import types for k, v in env.iteritems(): if type(v) is not

Re: [python-win32] How to get the pywin version number?

2010-04-15 Thread Mark Hammond
Pythonwin uses something very similar... import distutils.sysconfig site_packages = distutils.sysconfig.get_python_lib(plat_specific=1) try: build_no = open(os.path.join(site_packages, pywin32.version.txt)).read().strip() ver = pywin32 build %s % build_no except EnvironmentError:

Re: [python-win32] problems with subprocess module and env parameter

2010-04-15 Thread Tim Roberts
Bill Janssen wrote: Preston Landers pland...@gmail.com wrote: Ah, great! Thanks, Preston. That was it. Once I'd crunched all the values to non-Unicode, it worked. Hmmm, I'd think maybe the CreateProcess code would do that kind of normalization, or at last raise a more comprehensible