Hello,
the "chartObj" is not a Chart object it is a shape see
>> from win32com.client import Dispatch
>>> Excel = Dispatch("Excel.Application")
>>> WB = Excel.Workbooks.Add()
>>> Shape = WB.Sheets[0].Shapes.AddChart()
>>> Shap
Massi wrote:
> > Hi everyone,
> >
> > in my script I need to execute multiple separated loading of the same
> > dll library, in order to handle the internal variables with different
> > threads.
> > Consider the followin piece of code:
> >
> > lib1 = cdll.LoadLibrary("MyLib.dll"))
> > lib2 = cdll.L
Hello Gerrit,
there is no problem in the file, but in the description of the Visio API. The
place where the error occurs is during the definition
of the parameters of the corresponding Python methods. The information for the
names comes from the typelibrary of visio. Probably there is a
non e
: python-list@python.org
Subject: Re: pydepend (checking dependencies like jdepend) ?
On Jan 4, 1:57 pm, "Stefan Schukat" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> try to look at py2exe. This module scans all dependencies to pack them
> into one executable.
my intention
Hi,
try to look at py2exe. This module scans all dependencies to pack them
into one executable.
Stefan
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Bernhard Merkle
Sent: Friday, January 04, 2008 1:14 PM
To: python-list@python.org
Subject: py
Hello Thomas,
excel registers its COM objects with REGCLS_SINGLEUSE that means one COM
object is created
per process. In Solidworks it seems that that they register with
REGCLS_MULTIPLEUSE, which means
on process can serve more than one COM object. Hence you have no chance
to get multiple insta
"Characters" is a parameterized property. So you can't call it without a
generated wrapper.
see inside the wrapper:
# Result is of type Characters
# The method GetCharacters is actually a property, but must be
used as a method to correctly pass the arguments
def GetCharacte
You probably need to include the common Control Manifest to supprt
themes
see in the py2exe\samples\advanced directory for an example how to do
it.
Stefan
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Andrea Gavana
> Sent: Tuesday, Nov
Hello,
you just forgot to initialize the COM runtime for the separate thread.
try following:
def __init__(self,matlab_command):
self.matlab_command = matlab_command
threading.Thread.__init__(self)
def run(self):
import pythoncom
pythoncom.CoInitiali
For this use case the PyGILState API was introduced.
e.g. try
PyGILState_STATE state = PyGILState_Ensure()
run python code
PyGILState_Release(state)
Stefan
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Bryan
> Sent: Monday, October
(). However I was able to execute my_ie.Navigate("google.com"). But that was not I wanted. I am not
knowing where the error is.... Please let me know the solution ASAP...
Teja.P
On 10/13/06, Stefan
Schukat <[EMAIL PROTECTED]>
wrote:
Reading
from your last pos
Reading from your last posts you are using COM objects. Therefore you
should not "kill" the thread since this
would lead to reference leaks. So there are only two ways left:
1. Program a specific interpreter and not use python.exe which
implements an access to PyThreadState_SetAsyncExc
2. Check in
Hello,
you have to use the low level API methods for access and then the
methods of
IDispatch since the win32com gateway only supports late bound calls for
dispatch
interfaces.
e.g.
IDispatch* pDisp;
CoCreateInstance( ... CLSID_Leelay, , IID_IDispatch,
...&pDisp);
It seems that the ocx only works in a GUI environment. Perhaps you could
try to embed
the ocx in a pythonwin dialog which you create invisible since the
dialog is then
a control container
see "Python24\Lib\site-packages\pythonwin\pywin\Demos\ocx\ocxtest.py"
Stefan
> -Original Messag
Hi,
when you are running in Python the PyInitialize() is not called and
therefore you don't have a valid threadstate since the call in win32com
uses the standard idiom
Py_BEGIN_ALLOW_THREADS()
CallComServer
Py_END_ALLOW_THREADS()
You could use PyNewInterpreter to get a valid state, but this w
Hello Alistair,
which version of pythoncom you are using? In the newer versions there is
an support
for a "native" safearray (the data type Excel is providing). In older
versions the complete
array was converted to a tuple which is very time and memory consuming.
during this
conversion you could
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Tim Golden
> Sent: Friday, April 28, 2006 11:45 AM
> To: python-list@python.org
> Subject: RE: Get all attributes of a com object
>
> [snip]
>
> The only thing is that you can't always build a prox
Hello,
you only get information about a COM object when you have a wrapper.
But you are using the dynamic invoke (Dispatch). So try the typelibrary
browser
in Pythonwin or use the generated wrapper with makepy or
gencache.EnsureDispatch.
But dir will give you only the methods and internal class
Hi,
the feature you expierenced are parameterized properties. This is only
supported
by VB and could only be emulated in python. If you use makepy/gencache
to generate a wrapper
the appropriate Set methods are created:
oR.SetItem(1,2, "4")
Stefan
> -Original Message-
> From:
win32com does only support late bound interfaces in python scripts.
To support early bound interfaces a pyd has to be created. If you want
to script early bound interfaces try ctypes.com aka. comtypes from
Thomas Heller.
Stefan
> -Original Message-
> From: [EMAIL PROTECTED]
> [
Hi,
you get best performance if you make your servers local servers, since
then every
interpreter runs in ist own process. If you make it an inproc server you
synchronize
all threads/CPUs with the GIL. Even better multithreading support you
will get
if you mark your server to run in an multithre
Hello,
you have to put the ocx in a container window (e.g. a dialog or the IE).
Without this the media player just acts like a normal COM object.
Example for the dialog you can find in
[Pythonroot]\Lib\site-packages\pythonwin\pywin\Demos\ocx
Bye
Stefan
> -Original
You have to wrap the python object with a COM object:
def Get_Obj(self):
return win32com.server.util.wrap(an_object)
Stefan
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Philippe C. Martin
> Sent: Thursday, July 21, 2005 1:42 AM
Use the Record Method from win32com.client
object = win32com.client.Dispatch("Server.Object")
IPAddress = win32com.client.Record("IPADDRESS_STRUCT", object)
IPAddress.b1 = 192
IPAddress.b2 = 168
IPAddress.b3 = 0
IPAddress.b4 = 1
object.connect(IPAddress)
Stefan
> -Original Message-
A patch is available at sourceforge:
https://sourceforge.net/tracker/index.php?func=detail&aid=1195096&group_id=78018&atid=551956.
Stefan
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> jelle
> Sent: Friday, April 29, 2005 4:56 PM
> To: pyth
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> jelle
> Sent: Tuesday, April 26, 2005 12:31 PM
> To: python-list@python.org
> Subject: how to pass an array to a VB array via COM
>
>
> Hi,
>
> I'm trying to script Rhino -the nurbs modeller, not the
Just use
obj = win32com.client.Dispatch(obj)
Stefan
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Oy Politics
> Sent: Wednesday, March 16, 2005 11:51 PM
> To: python-list@python.org
> Subject: COM connection point
>
>
> Hello:
>
> I
Hi,
there is no real solution if you are using a standard local server.
The server is as a COM object reference counted. So if the
reference count reaches 0 (no client) it will shutdown itself which
is done by design. If you want a different behavior you should write
either a service which export
... and pythoncom.CoUninitialize()
My preferred way is:
def run():
pythoncom.CoInitialize()
try:
ie =
win32com.client.Dispatch('InternetExplorer.Application.1')
finally:
# Trigger the release of the object since after
CoUninitialize
29 matches
Mail list logo