Re: [python-win32] pywin32 on Nano Server

2015-09-08 Thread Mark Hammond
On 7/09/2015 2:19 AM, Alessandro Pilotti wrote: Hi all, I’m getting some Python based projects to work on Microsoft Nano Server, in particular OpenStack Hyper-V / Windows componens and Cloudbase-Init / Cloud-Init for Windows. Python 3.4 x64 and Python 2.7 x64 currently work fine on Nano

Re: [python-win32] PyIMAPIProp.GetPropList() and Py_None ref count

2015-08-24 Thread Mark Hammond
On 13/08/2015 8:20 PM, Nick Czeczulin wrote: I noticed that every call to PyIMAPIProp.GetPropList() causes the ref count for Py_None to increase by one. Can someone comment on whether the following patch seems correct, or if more might be needed? At face value it looks wrong, but I'm not sure

Re: [python-win32] Issues with tkinter, COM servers and Python 3.x

2015-05-20 Thread Mark Hammond
On 19/05/2015 9:02 AM, Tim Roberts wrote: Diego Vélez Torres wrote: I finally was able to fix this issue in my code. Thanks for your advise. Now I want to share with the community exactly what I did by posting the whole __init__ method of tkinter's __init__.py file: def __init__(self,

Re: [python-win32] Is there anyway to pass a VBA object to a Python COM Server and perform operations?

2015-05-12 Thread Mark Hammond
On 13/05/2015 2:32 AM, Diego Vélez Torres wrote: Set App_Caller = Application.Caller TheGrap = PythonCom.PlaceGraphic(Param1, Param2, App_Caller) Meanwhile in the COM code I do something like this: def PlaceGraphic(self, param1, param2, app_caller):

[python-win32] Re: I need to make a COM object with py2exe. Please HELP!

2015-05-05 Thread Mark Hammond
On 5/05/2015 10:14 AM, Diego Vélez Torres wrote: So TIM: Now that I know how to build COM servers, can you please give my lights how can I make a stand alone one using py2exe? I need to install in computers were the clients may not even know that Python exists. py2exe comes with some sample

Re: [python-win32] Oldest Python version for pywin32?

2015-04-15 Thread Mark Hammond
Hi Tim, I still build for 2.5 and 3.1, but really only because they do still build. If there's a reasonable reason to drop support for some I doubt it will hurt many people - the sourceforge page should show you download stats, but last I looked 2.5 was rarely used then, and that was some

Re: [python-win32] Possible memory leak in pywin32

2015-01-20 Thread Mark Hammond
It's certainly possible, but tracking a pywin32 leak down from such scant information is not really possible. If you can tweak your program to narrow down a leak we might have more luck - eg, add pointless loops that repeat the same operation a thousand times in various places, see how they

Re: [python-win32] How to set value for multi-valued property using mapi?

2015-01-04 Thread Mark Hammond
On 5/01/2015 11:16 AM, Nick Czeczulin wrote: Kapil Dolas wrote: Thank you for replying. I tried example given by you and it worked. All MV properties are working in the same way, except ones of type PT_MV_BINARY. Can you give me example for setting PT_MV_BINARY values? I think you will

Re: [python-win32] pythoncom

2014-10-16 Thread Mark Hammond
On 16/10/2014 12:50 AM, John Sampson wrote: The interface has a function which returns a string from an array of strings as it is supposed to in Windows 64-bit, or if called from VBA. In 32-bit Windows Python it returns the number of the item in the array instead. So to be clear - you have a

Re: [python-win32] Issues building pywin32 from source

2014-10-09 Thread Mark Hammond
You probably need to run pywin32_postinstall.py -install as many of the .pyd etc files don't know how to locate pywintypesxx.dll when it is just in the build dir. HTH, MArk On 8/10/2014 4:44 AM, Bharath Ramesh wrote: I cloned the pywin32 repository and I am trying to build version 219

Re: [python-win32] Visual Studio Project

2014-06-16 Thread Mark Hammond
On 16/06/2014 9:18 PM, Joss Gray wrote: How do you debug pywin32 Using Visual Studio - there's no need to build under VS to use it as a debugger. Mark. On Mon, Jun 16, 2014 at 5:21 AM, Mark Hammond skippy.hamm...@gmail.com mailto:skippy.hamm...@gmail.com wrote: On 13/06/2014 4:52

Re: [python-win32] Visual Studio Project

2014-06-15 Thread Mark Hammond
On 13/06/2014 4:52 AM, Joss Gray wrote: Is there a visual studio project for pywin32? Nope - it must be built using setup.py in the root of the source distro. Mark ___ python-win32 mailing list python-win32@python.org

Re: [python-win32] python3 and extended mapi

2014-06-10 Thread Mark Hammond
It would be great if you could open a bug at sourceforge... Mark On 9/06/2014 11:07 PM, Christian K. wrote: Hi, I was very pleased to see that retrieving properties of a MAPI object yields either a str or bytes type depending on whether the _A or _W property was queried and entryids are

Re: [python-win32] win32serviceutil: ImportError: DLL load failed: The specified module could not be found

2014-05-26 Thread Mark Hammond
I see on python-list that this was solved by running the postInstall script manually. However, I'm surprised that is necessary - build 219 has a work-around for Python 3.4 not running the post-install script, so that should work. I'll try and look into how this might have happened, but if

Re: [python-win32] Not able to paste file in windows explorer using SetClipboardData

2014-05-22 Thread Mark Hammond
I'd suggest you experiment with EnumClipboardFormats() and see all the formats actually in the clipboard - I'm guessing there is another format preferred over CF_HDROP. Similarly, you probably want to call EmptyClipboard so the other formats which refer to the initial image are removed (and

Re: [python-win32] has the COM interface capability changed since 1999

2014-05-14 Thread Mark Hammond
I also meant to mention that pythoncom has grown support for vtable-based *incoming* interfaces - eg, used by content-sinks/event-handlers - so if Dragon has partial support for IDispatch-based interfaces you might be OK. Mark On 14/05/2014 3:37 PM, Mark Hammond wrote: On 13/05/2014 2:57 PM

Re: [python-win32] has the COM interface capability changed since 1999

2014-05-13 Thread Mark Hammond
On 13/05/2014 2:57 PM, Eric S. Johansson wrote: back in 1999ish, joel gould wrote the following and I want to know if it is still true. am planning on converting the 2.7ish natlink to 3.X some time over the next year. need to decide if I should leave the C++ code alone or can we go pure python?

[python-win32] Fwd: Re: Yet another person confused on static versus dynamic dispatch

2014-05-12 Thread Mark Hammond
not describe itself, the dynamic binding takes effect, and since my working workaround to static is the method of specifying what kind of object is it a priori that I get a static binding. On Sun, May 11, 2014 at 7:39 PM, Mark Hammond skippy.hamm...@gmail.comwrote: On 9/05/2014 1:14 AM, Red Gator

Re: [python-win32] Yet another person confused on static versus dynamic dispatch

2014-05-11 Thread Mark Hammond
On 9/05/2014 1:14 AM, Red Gator wrote: Sure I can do that. But after this debacle I find I need to know why. * Why does my object come up as win32com.gen_py.None.Map when it should come up as 'win32com.gen_py.fiddly-GUID-bits.Map or even

[python-win32] [ANN] pywin32 build 219 released

2014-05-03 Thread Mark Hammond
Hi all, I'm happy to announce the release of pywin32 build 219. This release has addressed a number of bugs with previous builds, has added a number of new features (thanks mainly to Roger Upole), has a new version of adodbapi (thanks to Vernon Cole) and has improved support for installing

Re: [python-win32] Global ActiveScripting object not visible

2014-04-28 Thread Mark Hammond
On 26/04/2014 8:17 AM, Łukasz Jakubowski wrote: Hello, OK, so now the thing is clear (from DO authors): The actual problem was very simple really - inside Opus the global script objects were initialised in two steps: Call the script engine's AddNamedItem method to add the object to its

Re: [python-win32] Link to source code missing.

2014-04-28 Thread Mark Hammond
On 22/04/2014 12:25 AM, Vernon D. Cole wrote: On the sourceforge.net/projects/pywin32 http://sourceforge.net/projects/pywin32 web page, the Code tab, and all pointers and links to the hg repository seem to have disappeared. I a change of some kind in the works? (or announced and my Alzheimer's

Re: [python-win32] Global ActiveScripting object not visible

2014-04-16 Thread Mark Hammond
\scintilla.dll C:\Python34\Lib\site-packages\pywin32_system32\pythoncom34.dll C:\Python34\Lib\site-packages\pywin32_system32\pywintypes34.dll C:\Python34\Lib\site-packages\win32\perfmondata.dll Regards, Łukasz Dnia Wed, 16 Apr 2014 04:23:18 +0200, Mark Hammond skippy.hamm...@gmail.com napisał: You

Re: [python-win32] context_menu.py crashing Explorer

2014-04-16 Thread Mark Hammond
As far as seeing the print statements, you can modify the source file to have import win32traceutil at the top, and in another console run python -m win32traceutil - the print statements from the source file should them appear in the console running win32traceutil. However, I don't think this

Re: [python-win32] Could not load excelAddin demos

2014-04-15 Thread Mark Hammond
You might like to try using the 32bit builds of python and pywin32. HTH, Mark On 14/04/2014 2:48 AM, Pierre Mallard wrote: Hello, I'm running on Windows8.1 64 bits, Excell 2013, Python 3.4 and pywin32-218.win-amd64-py3.4 That might be a newbee question but I'm running out of idea to fix

Re: [python-win32] Global ActiveScripting object not visible

2014-04-15 Thread Mark Hammond
You could try registering the python engine for debugging - change to win32comext/axscript/client and run python pyscript.py --debug - a message should be printed that the object is registered for debugging. Then, run python -m win32traceutil - this will run a python program where debug

Re: [python-win32] pywin32, virtual environments and com dlls

2014-03-31 Thread Mark Hammond
On 1/04/2014 9:43 AM, David Cournapeau wrote: Hi, By default, when pywin32 is installed from the .exe, the *com dlls are instsalled in %WINDOWSDIR%. If the exe is installed in a virtualenv, they are installed in the virtualenv itself, and nothing gets written in %WINDOWSDIR%. Is there any

Re: [python-win32] Pythonwin IDE hangs on tool menu edits -and workaround

2014-03-31 Thread Mark Hammond
On 31/03/2014 5:16 PM, Peter Fraser wrote: Hello Pywinonauts Pythonwin (pywin32 build218 python 2.7.6) is hanging after I edit the tools menu (or rather; whenever I go to the Tools menu tab of PythonWin Options and hit OK -I don't need to actually edit anything to provoke the problem) It

Re: [python-win32] Getting an app to run from/in the windows system tray

2014-03-04 Thread Mark Hammond
Check out win32\Demos\win32gui_taskbar.py - it shows how to do the taskbar thing. As far as hiding the main part of the interface, you just close those windows after creating the taskbar icon. On 5/03/2014 2:33 PM, Jacob Kruger wrote: In other words, would like to be able to hide the main

Re: [python-win32] Need help creating a wheel of pywin32

2014-03-02 Thread Mark Hammond
On 1/03/2014 5:35 PM, Vye wrote: Is there a way I can create a wheel by using the prebuilt binaries since they are just zip archives? I would prefer to do it this way. For your purposes, just extracting (via zip) the files in the pre-built binaries should get you going. Depending on exactly

Re: [python-win32] Error[windows 8.1 machine]: The ordinal 782 could not be located in the dynamic link library C:\Windows\System32\urlmon.dll

2014-02-27 Thread Mark Hammond
FTR, the original poster just emailed me to say he neglected to mention this problem is with a py2exe built binary - py2exe has a known problem where it sometimes copies DLLs it shouldn't - so nothing to see here :) Mark On 28/02/2014 4:44 PM, Raghavendra Prasad NL wrote: I am using

Re: [python-win32] Building pywin32 adsi support

2014-01-24 Thread Mark Hammond
On 21/01/2014 9:23 PM, Tim Golden wrote: I'm trying to bring my active_directory module up to scratch with Python 3. I'm hitting a couple of effective showstoppers. First: I can't even build pywin32 for any revision past 337015e6d473, which is when the IConverterSession stuff went in. I've

Re: [python-win32] Building pywin32 adsi support

2014-01-21 Thread Mark Hammond
On 21/01/2014 9:23 PM, Tim Golden wrote: I'm trying to bring my active_directory module up to scratch with Python 3. I'm hitting a couple of effective showstoppers. First: I can't even build pywin32 for any revision past 337015e6d473, which is when the IConverterSession stuff went in. I've

Re: [python-win32] Access coclass interface?

2014-01-20 Thread Mark Hammond
The problem is that the DLL isn't registered (or not registered in a way it can be used in your current config). First, check the bitted-ness of the library matches Python - eg, if you have a 64bit version of Python, the DLL will also need to be 64 bits (and ditto for 32 bits). If that

Re: [python-win32] CastTo interface from other library

2014-01-20 Thread Mark Hammond
On 21/01/2014 7:46 AM, Pieter Aarnoutse wrote: Any chance we can have some functionality like that in the release? Please submit a patch to sourceforge, and we'll see what we can do. Please be sure to make it is a patch rather than the full version of the modified function. Cheers, Mark

Re: [python-win32] Compiling Python as a static .exe

2014-01-20 Thread Mark Hammond
[oops - resending with CC to python-win32 list] On 21/01/2014 12:12 AM, Russell Wallace wrote: Hi, I'm trying to compile Python 2.7.6 as a statically linked 64-bit Windows executable, and I'm getting a weird error message. As per

Re: [python-win32] Bypassing gen_py, accessing makepy-generated class directly

2013-12-17 Thread Mark Hammond
[oops - resend with cc to list] It should be fine if the typelib itself doesn't register, so long as the objects themselves are registered. You should still run makepy over the typelib normally (so the generated file is still in the normal directory), but generating it to its own file should

Re: [python-win32] Bypassing gen_py, accessing makepy-generated class directly

2013-12-17 Thread Mark Hammond
oops 2 :) - where I said -i I meant -o Mark On 17/12/2013 10:13 PM, Mark Hammond wrote: [oops - resend with cc to list] It should be fine if the typelib itself doesn't register, so long as the objects themselves are registered. You should still run makepy over the typelib normally (so

Re: [python-win32] Callback RemQueryInterface gives E_NOINTERFACE

2013-12-15 Thread Mark Hammond
On 15/12/2013 8:28 AM, Jim Bell wrote: I've been though all the demos and scoured the web, and am stumped. But I think I'm close. I have a 3rd-party .dll/.tlb. I run makepy.py and it works fine. I need to pass a callback interface, which they define, into one of their functions. Here's where

Re: [python-win32] pywintypes.com_error: (-2147221164

2013-12-15 Thread Mark Hammond
On 15/12/2013 10:37 PM, WangMengNan(桌面事业部) wrote: Hi,All: Sorry to bother you. I have a python2.7 program,my pc's environment is win7,32bit.I want to use win32com,and I have installed win32com for python2.7. When I worte the codexls = client.Dispatch(Excel.Application),an error happened:

Re: [python-win32] pywin32 programming error on Win7 with shell.SHGetDesktopFolder, desktop.BindToObject, desktop.GetDisplayNameOf

2013-11-16 Thread Mark Hammond
The 3rd google result for SHOpenFolderAndSelectItems points back at an example from this mailing list - https://mail.python.org/pipermail/python-win32/2012-September/012531.html Mark On 16/11/2013 1:57 PM, redstone-cold wrote: I actually want to use SHOpenFolderAndSelectItems() here ,but

Re: [python-win32] Understanding Access Denied when calling win32process.TerminateProcess() from Run As Administrator prompt

2013-11-14 Thread Mark Hammond
On 14/11/2013 8:52 PM, Tim Golden wrote: Hopefully someone else has (a) more time right now and/or (b) more knowledge at their fingertips to give you a better answer. If no-one I had a quick peek at the CRT spawn source code, and can't explain why it behaves differently on winxp vs 7. The

Re: [python-win32] pywin32 setup.py forgets win32/lib

2013-11-10 Thread Mark Hammond
On 11/11/2013 10:23 AM, Christian Tismer wrote: Hi Mark, Yes, I understand very well, knowing the patching dance so much more than I'd like to... In fact, 'win32/lib' is a folder, actually the only one which is not also a package, and exactly this one does not show up in the install logs. I

Re: [python-win32] embedded python can't import win32api

2013-09-05 Thread Mark Hammond
modules you depend on) into a directory and installing it. You probably don't need to bother with any installation tasks - eg, nothing will need to be registered etc - it should just work. Mark On Sep 4, 2013, at 8:58 PM, Mark Hammond skippy.hamm...@gmail.com wrote: I suspect the problem

Re: [python-win32] WMPlayer.OCX COM object: player window is not opened

2013-08-07 Thread Mark Hammond
On 28/07/2013 7:23 PM, lambda wrote: I'm trying to instantiate and use a Windows Media Player COM object. I can do that and all seems fine, but the player window is not opened. Here's my code: The code didn't come through, but can be seen on nabble. Unfortunately, you are dealing with an

Re: [python-win32] Question: Who killed a windows service

2013-07-23 Thread Mark Hammond
The Windows system event log should have this information. Mark On 23/07/2013 8:21 PM, Hans Rakotomanga wrote: Hi, I have a pywin32 service running on a shared computer. Now and then it gets killed by another user, for good reason mostly, but I would like to ask the person who does this why

Re: [python-win32] New win32com.client.VARIANT object

2013-06-30 Thread Mark Hammond
It is in the latest pywin32 build from sourceforge.net/prjects/pywin32 - I'm not sure what the current version of ActivePython includes. Also, note that it is not a module, it's an object in the win32com.client module. Mark On 22/06/2013 5:59 PM, feng.xu wrote: Dear Mark: Where can i get

Re: [python-win32] Passing Args through PythonService.exe

2013-06-30 Thread Mark Hammond
On 21/06/2013 6:06 AM, Michael Manfre wrote: Is it possible to pass args through PythonService.exe on to the ServiceFramework class? The only arg that I ever see come through the init is a tuple containing only the _svc_name_. I need to install many services for celery workers and having to

Re: [python-win32] Building pywin32 msi installers

2013-06-20 Thread Mark Hammond
, and the rest seemed appropriate, but I don't know if Mark Hammond would agree, and if there ever was a patch number, this would not work.) I have used the patch version in the past - mainly when I've found one single package was uploaded incorrectly due to a build issue rather than due to a bug

Re: [python-win32] Killing a subprocess spawned by a service

2013-06-18 Thread Mark Hammond
The other solutions I can think of are likely heavier and harder than arranging to spawn the child without shell=1 - so I'd suggest tackling that. Or *maybe* - you could do something like spawning a thread in the child process to read from stdin - that's likely to block until the cmd.exe

Re: [python-win32] adodbapi and .hgeol

2013-06-17 Thread Mark Hammond
On 14/06/2013 7:00 PM, Vernon D. Cole wrote: I found the following on [pywin32-checkins] this morning: diff -r 4ded0a838f8c -r 1594b8c27383 .hgeol --- a/.hgeolMon Apr 29 10:01:40 2013 -0400 +++ b/.hgeolThu Jun 13 18:29:09 2013 +1000 @@ -2,4 +2,8 @@ **.dsp = CRLF

Re: [python-win32] PySBinaryArray??

2013-06-04 Thread Mark Hammond
It's just a list/sequence of strings (in py2k) or bytes (in py3k). In this context, IIRC, it's just the entryids of the messages to move... HTH, Mark On 5/06/2013 2:16 PM, Aubin LaBrosse wrote: Hello, List, I’m new to pywin32 and have been able to use it quite sufficiently with the help of

Re: [python-win32] Strange order of OnEnter/LeaveScript site methods in application hosting Python active scripting engine

2013-05-30 Thread Mark Hammond
, line 585, in _invokeex_ 3.01194453 return func(*args) 3.01194453 File C:\Python27\lib\site-packages\win32comext\axscript\client\framework.py, line 580, in SetScriptSite 3.01194453 self.lcid = site.GetLCID() 3.01194453AttributeError: 'NoneType' object has no attribute 'GetLCID' 2013/5/30 Mark

Re: [python-win32] win32com support for pointer in-parameters

2013-05-28 Thread Mark Hammond
Yeah, pywin32 will see a byref ui1 and pass the address of an integer filled with the value of the integer objects. However, I'm not really sure what you are expecting this to do - passing the address of a Python integer object clearly isn't correct - or to put it another way - what exact are

Re: [python-win32] win32com getElementsByClassName error

2013-05-23 Thread Mark Hammond
Are you using IE9? It looks like that is causing some problems which I've not dug into. See https://sourceforge.net/p/pywin32/bugs/608/ for another example of a very similar error... On 24/05/2013 9:46 AM, Anthony Andriano wrote: I'm trying to navigate through in intranet site using python.

Re: [python-win32] how to create a instance of PyIMAPISession by hand

2013-05-08 Thread Mark Hammond
On 8/05/2013 11:29 PM, Christian K. wrote: The following code has been suggested to me to get a handle to Outlook's mapi session. from win32com.client import Dispatch from win32com.mapi import mapi app = Dispatch('Outlook.Application') app.GetNamespace('MAPI').Session.MAPIOBJECT The

Re: [python-win32] Memory Leak in Threaded COM Object

2013-05-06 Thread Mark Hammond
On 4/05/2013 8:04 AM, Michael Watson wrote: I am creating a COM client within a thread and performing several operations with this client. Each thread is spawned from a server that uses Python's |socketserver| module which has built-in threading support. When I am loading and using this COM

Re: [python-win32] Excel + pyinstaller: missing a constant: xlTopToBottom

2013-04-29 Thread Mark Hammond
On 30/04/2013 2:21 AM, Niemann, Hartmut wrote: Hello! The following snippet from win32com.client import constants as xl_constants wbook.ActiveSheet.Range('A3:N' + str(row + 1)).Sort( Key1 = wbook.ActiveSheet.Range('B3'), Orientation = xl_constants.xlTopToBottom, DataOption1 =

Re: [python-win32] python-win32 Digest, Vol 121, Issue 12

2013-04-25 Thread Mark Hammond
than Re: Contents of python-win32 digest... Today's Topics: 1. Re: pywin32 and virtualenv (Mark Hammond) -- Message: 1 Date: Mon, 22 Apr 2013 12:44:19 +1000 From: Mark Hammond skippy.hamm...@gmail.com To: Dinesh B Vadhia

Re: [python-win32] pywin32 and virtualenv

2013-04-21 Thread Mark Hammond
On 19/04/2013 7:19 PM, Dinesh B Vadhia wrote: Ignoring virtualenv initially. On a Windows 8 machine, installed Python 2.7.4 64-bit system-wide. Installed Python 2.7.4 32-bit into a separate folder. Ran pywin32-218.win32-amd64--py2.7.exe successfully. Ran pywin32-218.win32-py2.7.exe in the Python

Re: [python-win32] survey question: should data from database columns of type adGUID be returned as instances of class uuid?

2013-04-15 Thread Mark Hammond
FWIW, the most recent build of pywin32 has had less 2.4 downloads (15) than 2.3 (23), so dropping 2.4 can certainly be done as soon as there is some concrete advantage. [hrm - but those download figures are suspect - I'm guessing sourceforge has recently reset them - but I think 2.4 is as

Re: [python-win32] Windows Service: Not Starting at Boot

2013-04-09 Thread Mark Hammond
Hi again Stan! On 8/04/2013 11:52 PM, Stan wrote: (Also WMI, SQLAlchemy, anyjson, psycopg2, etc) ... The service wrapper script is based on the example in examples\advanced\service.py, and writes to the eventlog. During testing it appears that simply /importing/ my main class will cause the

Re: [python-win32] Dropping support for Python 2.3?

2013-03-26 Thread Mark Hammond
I've been happy to drop support for a couple of years, but while it kept working I kept building it :) I can't recall if 2.4 is built with vc6 too - if so, we might as well kill that too. Cheers, Mark. On 26/03/2013 8:33 PM, Vernon D. Cole wrote: Perhaps it is time... I found a copy of

Re: [python-win32] Python 2.6: Windows Scripting Host (WSH) compatible debugger

2013-02-17 Thread Mark Hammond
Hrm - I can't explain that. A quick check of the 218 release shows that .pyd file exists in both the 2.7 and 3.3 builds, both 32 and 64bit versions (I didn't check all of them, but I'm guessing they are in the rest too) What version of Python and pywin32 are you using? If you are using

Re: [python-win32] Python 2.6: Windows Scripting Host (WSH) compatible debugger

2013-02-14 Thread Mark Hammond
Can you try: import win32com.axscript.axscript import win32com.axdebug.axdebug And see if that works? If so, maybe try and edit win32com\axscript\client\framework.py, find the error message you reported and print some details of the exception to try and determine why it can't find that

Re: [python-win32] Python 2.6: Windows Scripting Host (WSH) compatible debugger

2013-02-14 Thread Mark Hammond
On 15/02/2013 10:32 AM, Udo Weik wrote: Hello Mark, import win32com.axscript.axscript import win32com.axdebug. And see if that works? If so, maybe try and edit win32com\axscript\client\framework.py, find the error message you reported and print some details of the exception to try and

Re: [python-win32] Python 2.6: Windows Scripting Host (WSH) compatible debugger

2013-02-13 Thread Mark Hammond
On 13/02/2013 3:17 AM, Udo Weik wrote: Hello Mark, thanks for your answer. Debugging should work out of the box - what problems are you seeing? I'm using a Delphi-component. That component checks whether the ActiveX debug interface is available (Windows Scripting Host, WSH). When I start my

Re: [python-win32] Python 2.6: Windows Scripting Host (WSH) compatible debugger

2013-02-10 Thread Mark Hammond
Debugging should work out of the box - what problems are you seeing? Mark On 11/02/2013 3:07 AM, Udo Weik wrote: Hello, I want to use the standard Python 2.6 distribution from www.python.org as a Windows Scripting Host (WSH) scripting language. Is there any way to get debugging working with

Re: [python-win32] Python Finalisation

2013-01-20 Thread Mark Hammond
Unfortunately there are a number of problems repeatedly initializing and finalizing Python, hence the code you saw in pywin32 that no longer attempts to support it. The short-story is simply that doing this is not supported using pywin32 (at least until the issues in Python are fixed via the

Re: [python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-18 Thread Mark Hammond
=testValue123' Given the source code, that last line is expected (ie, every value will return 'testValue123'). I'm at a bit of a loss on the problem you are seeing. Mark On 19/12/2012 1:10 AM, Dave Calkins wrote: On 12/17/2012 8:25 PM, Mark Hammond wrote: So after running makepy, a work-around

Re: [python-win32] COM server registering, but getting The specified module could not be found on dispatch

2012-12-18 Thread Mark Hammond
On 19/12/2012 2:39 AM, Russell Warren wrote: On Mon, Dec 17, 2012 at 10:25 PM, Mark Hammond mhamm...@skippinet.com.au mailto:mhamm...@skippinet.com.au wrote: The VS2008 redistributables should probably be in the same directory (ie, msvc*90*.dll in system32) or else they might

Re: [python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-17 Thread Mark Hammond
, Dave Calkins wrote: On 12/16/2012 6:17 PM, Mark Hammond wrote: I'm the vendor of the object :) As I mentioned, I just created this small test app which reproduces the issue having just those 3 simple methods. However, I'm not able to talk to it via Python. Is the source to this available

Re: [python-win32] COM server registering, but getting The specified module could not be found on dispatch

2012-12-17 Thread Mark Hammond
On 18/12/2012 6:27 AM, Russell Warren wrote: Update - it seems to be the pythoncom27.dll somehow. I tried deleting the InprocServer32 key and my com server works now. Assuming you installed Python for all users, the pythoncom27.dll being used should be the one in the system32 directory, and

Re: [python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-16 Thread Mark Hammond
On 17/12/2012 12:54 AM, Dave Calkins wrote: On 12/16/2012 12:46 AM, Mark Hammond wrote: That's very strange. pywin32 *will* be passing a second param - a byref bstr. byref params do work in general, so you might need to contact the vendor of the object for help. Cheers, Mark I'm

Re: [python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-15 Thread Mark Hammond
On 15/12/2012 12:56 AM, Dave Calkins wrote: On 12/13/2012 10:39 PM, Mark Hammond wrote: This is the form you should use, but the method name you are trying to call is GetSettingValue, not GetSettingName, hence the AttributeError. Mark Ah, yes. Good catch! Unfortunately, correcting

Re: [python-win32] Calling an OLE Automation (IDispatch) server which uses out params

2012-12-13 Thread Mark Hammond
On 13/12/2012 11:36 AM, Dave Calkins wrote: I'd like to be able to call an OLE Automation (IDispatch) server from python to automate an existing application. I'm not at liberty to change the existing automation interface provided by the application so I need to get it to work with what the app

Re: [python-win32] a question about word addin , IRibbonExtensibility, GetCustomUI, getImage, IPicture

2012-12-13 Thread Mark Hammond
I've lost some of the context here, but there is a pythoncom.ObjectFromAddress that looks like it does exactly what you want - check out the pywin32 docs for details... HTH, Mark On 14/12/2012 11:04 AM, Gilles Baggieri wrote: Mark Hammond skippy.hammond at gmail.com writes: I'm

[python-win32] Fwd: Re: Win32 service not calling SvcShutdown()

2012-11-06 Thread Mark Hammond
On Nov 4, 2012, at 8:33 PM, Mark Hammond mhamm...@skippinet.com.au wrote: [re-adding python-win32] On 5/11/2012 12:21 PM, Rob McGillivray wrote: Mark, You are correct. I wrote to a file and the SvcShutdown() event is being fired. My question is … surely the event log service would only

Re: [python-win32] Win32 service not calling SvcShutdown()

2012-11-04 Thread Mark Hammond
On 4/11/2012 1:20 PM, Rob McGillivray wrote: Hi All, For the life of me I cannot figure out why SvcShutdown() is not being called when the OS shuts down. All the other SCM notifications (pause/continue/stop) work just fine. I have searched high low for solutions, but nothing. What appears to

Re: [python-win32] Win32 service not calling SvcShutdown()

2012-11-04 Thread Mark Hammond
[re-adding python-win32] On 5/11/2012 12:08 PM, Rob McGillivray wrote: Hi Mark, Much appreciate the feedback! Many thanks. I'll try writing something to a file and check this out … I never thought that the event log service could/would stop(?). Doesn't the event log service run continuously

Re: [python-win32] Win32 service not calling SvcShutdown()

2012-11-04 Thread Mark Hammond
dev books on my shelf. :-) Kind regards, Rob On Nov 4, 2012, at 7:35 PM, Mark Hammond skippy.hamm...@gmail.com wrote: On 4/11/2012 1:20 PM, Rob McGillivray wrote: Hi All, For the life of me I cannot figure out why SvcShutdown() is not being called when the OS shuts down. All the other SCM

[python-win32] [ANN] pywin32 build 218 released.

2012-10-28 Thread Mark Hammond
Hi all, I'm happy to announce the release of pywin32 build 218. This release has addressed a number of issues with previous builds, has improved support for Python 3.3 and a number of new features - I've appended the change log at the end of this mail. Downloads are available at:

Re: [python-win32] Getting Error Pure Virtual Function Call R6025 Error

2012-10-03 Thread Mark Hammond
is the stack when this happens, but that is probably very hard to grab without MSVC or possibly one of the sysinternals tools... Cheers, Mark Best Regards, Vamsi. On Fri, Sep 28, 2012 at 5:52 AM, Mark Hammond skippy.hamm...@gmail.com wrote: I'm afraid there isn't enough information provided

Re: [python-win32] Getting Error Pure Virtual Function Call R6025 Error

2012-09-27 Thread Mark Hammond
I'm afraid there isn't enough information provided here for us to help. At face value, it sounds like a problem in the HP QTP COM libraries. Mark On 25/09/2012 2:14 PM, vamsi krishna wrote: Hi, Running on Windows 2003 Server X64,Python 2.5 (32-bit) I am having problems using

Re: [python-win32] mxDateTime problem with embedded Python

2012-08-25 Thread Mark Hammond
On 25/08/2012 11:28 AM, Will Sadkin wrote: On 24/08/2012 4:00 AM, Will Sadkin wrote: Hi all, I have a bit of a stumper. We have a C++ program in which we embed a release python interpreter, so that both our C++ and python programs can share a single codebase, written in Python. When

Re: [python-win32] mxDateTime problem with embedded Python

2012-08-23 Thread Mark Hammond
CRT. Unless, of course, that embedding component attempts to directly call Python... As I said, I'm not sure how to confirm this, nor what to do about it, and I'm hoping Mark Hammond may have some suggestions. I have a different bug in this program that I really need to track down

Re: [python-win32] Python COM server throws 'module' object has no attribute 'VARIANT'

2012-08-06 Thread Mark Hammond
recently to pywin32, so if the failing machine has an older version it will fail. HTH, Mark Do you have any suggestions as to what I can test? Thanks, Paul On Mon, Aug 6, 2012 at 11:41 AM, Mark Hammond skippy.hamm...@gmail.com mailto:skippy.hamm...@gmail.com wrote: I don't quite understand

Re: [python-win32] Python COM server throws 'module' object has no attribute 'VARIANT'

2012-08-05 Thread Mark Hammond
I don't quite understand this code. The server is using win32com (ie, not comtypes), but the client code seems to be using comtypes rather than win32com (but it's hard to tell as the client code is missing the imports etc). But at face value it appears one of the machines might have an older

Re: [python-win32] ImportError: DLL load failed

2012-07-16 Thread Mark Hammond
\Pythonwin. Regards, Jane *From:* Mark Hammond skippy.hamm...@gmail.com *To:* Jane Chen janechen_1...@yahoo.com *Cc:* python-win32@python.org python-win32@python.org *Sent:* Thursday, July 12, 2012 6:39 PM *Subject:* Re

Re: [python-win32] problem After compiling with py2exe on a com class

2012-07-16 Thread Mark Hammond
On 17/07/2012 8:37 AM, Matteo Boscolo wrote: Hi all, I got a com server that is crated inside a cad application. if i run the following code(That is a method of my com class): def showWindows(self): show a qt windows with a button try:

Re: [python-win32] ImportError: DLL load failed

2012-07-12 Thread Mark Hammond
On 13/07/2012 10:45 AM, Jane Chen wrote: Hi all, I would like to add python win32 to Portable Python distribution with PyGTK for Windows http://fnch.users.sourceforge.net/portablepygtkwindows.html I installed the pywin32 in the python\Lib\site-packages folder. PC #1 can find win32api.pyd. After

Re: [python-win32] How to invoke Python program from Windows service?

2012-06-22 Thread Mark Hammond
Services are pretty tricky - you might be better off arranging for the Python script to write sys.stderr somewhere useful and seeing what the traceback says - you'll almost certainly strike the same problem after you get a pywin32 based one close to working. Mark On 22/06/2012 9:19 PM,

Re: [python-win32] How to invoke Python program from Windows service?

2012-06-21 Thread Mark Hammond
On 22/06/2012 6:25 AM, Funke, Matt wrote: I’m relatively new to the world of Windows programming, but I have a Python program I’d like to run every once in a while from a Windows service. I’ve gotten the service itself to run as it’s supposed to, but attempts to run the program with a DOS

Re: [python-win32] Connecting to a running COM server

2012-06-20 Thread Mark Hammond
On 19/06/2012 5:35 AM, Ανδρέας Πορευόπουλος wrote: Hello, I am new to windows programming and I am trying to connect to a local erp application server which has a registered com interface and provides methods for an external program to communicate with it. With Delphi one can do following and

Re: [python-win32] Installing pywin32 for Python 2.7 AMD64

2012-06-17 Thread Mark Hammond
On 16/06/2012 2:20 AM, Ferdinand Sousa wrote: Hi List, First off, it's good to be back after 3 years!! I was dusting off some old scripts I had written using pywin32. (Python 2.5 era I think). It uses the win32con and win32api modules. Now I'm trying to use the same scripts with Python 2.7

Re: [python-win32] DIR reports file timestamp and size, but os.path.getctime(), os.path.getsize() raise WindowsError [Error 5] Access is denied

2012-05-22 Thread Mark Hammond
On 22/05/2012 10:02 AM, pyt...@bdurham.com wrote: Wondering if any of you have stumbled across the following behavior: I'm doing a recursive directory listing of my Windows folder and I can access the timestamps and file sizes of all files except the following 6 files: In the

Re: [python-win32] calling a dll after python 2.3 pywin32-208

2012-05-20 Thread Mark Hammond
failed) - Every subsequent time I called the dll it fails ??? - Something happened in the environment after the first call and I have no clue ??? Ed On Mon, May 14, 2012 at 8:50 AM, Mark Hammond mhamm...@skippinet.com.auwrote: [re-adding python-win32 - please keep replies on list] On 14/05

Re: [python-win32] Adding a notification icon from a service

2012-05-17 Thread Mark Hammond
On 18/05/2012 9:00 AM, Alan Trick wrote: Hi, I have two smallish python modules, one which runs a service, and the other which puts a notification icon with a trivial menu on the windows panel (these modules are quite similar to existing examples in pywin32). Both of these modules work fine by

Re: [python-win32] calling a dll after python 2.3 pywin32-208

2012-05-14 Thread Mark Hammond
. If I uninstall the newer Python and re-install Python 2.3 and pywin32-208 all is OK again. It is definitely environmental as opposed to the code. Well - it's *someone's* code :) To be clear, 2.3 + pywin32 209 fails? Mark Thanks, Ed On Sun, May 13, 2012 at 9:07 PM, Mark Hammond

Re: [python-win32] calling a dll after python 2.3 pywin32-208

2012-05-13 Thread Mark Hammond
You haven't given us enough information to help. What error do you see? What is the most recent combination of Python and pywin32 that works? Mark On 12/05/2012 10:31 PM, EdShallow wrote: Hi Folks, I have an ActiveX COM dll generated by VisualBasic 6 in WinXP. I can call it and use

<    1   2   3   4   5   6   7   8   9   >