Re: [python-win32] Word FormField types

2008-02-04 Thread Kelie
Graessle, Glenn (FC COE honeywell.com> writes: > Is there an import > file that defines the FormField types symbolically? > from win32com.client import constants print constants.xlAscending print constants.wdFieldFormCheckBox ___ python-win32 ma

Re: [python-win32] Word FormField types

2008-02-04 Thread Graeme Glass
On Feb 5, 2008 12:01 AM, Graessle, Glenn (FC COE) < [EMAIL PROTECTED]> wrote: > Is there an import file that defines the FormField types symbolically? > > For example, Word Checkbox has the value of 71 for it's type. > > > *Glenn Graessle* > Flight Controls CoE > Honeywell International, Inc. >

Re: [python-win32] Executing eval function in VBscript

2008-02-04 Thread Mark Hammond
You probably want to take a copy of interp.py and modify it so that when a dictionary is returned, you return something like the Python.Dictionary object (see win32com\servers\dictionary.py). You can create such an object via something like: >>> from win32com.servers.dictionary import Dictiona

Re: [python-win32] Executing eval function in VBscript

2008-02-04 Thread Janakiraman Mohanakrishnan
yes i want to have python functionality in excel, iam trying to call python functions from VBscript, more like evaluating a python expression say dictionary or list in VBscript For evaluating a python expression , python has some library functions like eval which takes python expressions in stri

Re: [python-win32] Executing eval function in VBscript

2008-02-04 Thread Tony Cappellini
http://msdn2.microsoft.com/en-us/library/aa227633(VS.60).aspx On Feb 4, 2008 6:30 PM, bob gailer <[EMAIL PROTECTED]> wrote: > > Tony Cappellini wrote: > > Date: Mon, 04 Feb 2008 10:05:11 -0500 > > From: bob gailer <[EMAIL PROTECTED]> > > Subject: Re: [python-win32] Executing eval function in VBsc

Re: [python-win32] Executing eval function in VBscript

2008-02-04 Thread Tony Cappellini
I may have a type in my previous posts. I have only used it with VB6 (not .NET) http://msdn2.microsoft.com/en-us/library/aa227400.aspx On Feb 4, 2008 6:30 PM, bob gailer <[EMAIL PROTECTED]> wrote: > > Tony Cappellini wrote: > > Date: Mon, 04 Feb 2008 10:05:11 -0500 > > From: bob gailer <[EMAIL PR

Re: [python-win32] Executing eval function in VBscript

2008-02-04 Thread bob gailer
Tony Cappellini wrote: > Date: Mon, 04 Feb 2008 10:05:11 -0500 > From: bob gailer <[EMAIL PROTECTED]> > Subject: Re: [python-win32] Executing eval function in VBscript > To: Janakiraman Mohanakrishnan <[EMAIL PROTECTED]> > Cc: python-win32@python.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-04 Thread Tim Johnson
There were several bugs there that could possibly have been related, but I submitted it as bug 74669 . On Feb 4, 2008 6:07 PM, Tim Johnson <[EMAIL PROTECTED]> wrote: > I'll go ahead and file a bug with ActiveState and see what they say. > > > On

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-04 Thread Tim Johnson
I'll go ahead and file a bug with ActiveState and see what they say. On Feb 4, 2008 5:44 PM, Mark Hammond <[EMAIL PROTECTED]> wrote: > I suspect it is simply because ActivePython doesn't register these > objects (and my be why python isn't also working with the script host for > some users). Th

Re: [python-win32] Can win32com handle this one?

2008-02-04 Thread Mark Hammond
> > > > ob = win32com.client.Dispatch(s.GetProvider()) > > > > to see if it does support IDispatch, > > Hmm, thanks, I guess it doesn't: > > 'PyIUnknown' object has no attribute 'GetTypeInfo' > > > in which case you could then start calling methods etc on it. Oops - it looks like I should

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-04 Thread Mark Hammond
I suspect it is simply because ActivePython doesn't register these objects (and my be why python isn't also working with the script host for some users). The pywin32 distribution registers these objects automatically. Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ti

Re: [python-win32] Can win32com handle this one?

2008-02-04 Thread David Abrahams
on Mon Feb 04 2008, "Mark Hammond" wrote: >> I have a couple of type libraries that I've run makepy on. >> >> The first can be loaded with >> >> s = win32com.client.Dispatch('nameof.Lib1') >> >> I have verified that the above gets the ILib1Session object, which >> the documentation for that

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-04 Thread Tim Johnson
That was it. I'm using ActivePython 32-bit, but I just remembered that this is a 64-bit machine, so maybe that's why it wasn't set up, or is that something you usually have to do manually? On Feb 4, 2008 4:18 PM, Mark Hammond <[EMAIL PROTECTED]> wrote: > It might be necessary to execute win32co

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-04 Thread Mark Hammond
It might be necessary to execute win32com\servers\interp.py to register the object (which inturn might not work if you installed Python without admin privs or selected "just for me") Mark From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tim Johnson Sent: Tuesday, 5 February

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-04 Thread Tim Roberts
Tim Johnson wrote: > I started out just trying it via vbscript, but when I use the code you > provided I get > > Run-time error '429': > > ActiveX component can't create object. > > I'm guessing there's a .dll or something not registered somewhere. > I'll do some more digging. If you will

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-04 Thread Tim Johnson
I started out just trying it via vbscript, but when I use the code you provided I get Run-time error '429': ActiveX component can't create object. I'm guessing there's a .dll or something not registered somewhere. I'll do some more digging. On Feb 4, 2008 4:01 PM, Tim Roberts <[EMAIL PROTECTED

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-04 Thread Tim Roberts
Tim Johnson wrote: > My machine doesn't seem to recognize Python.Interpreter. Is there > some prerequisite that I could be missing? What did you try? I just went into the Excel VBA editor and created a function with this: Dim x As Object Set x = CreateObject("Python.Interpreter") It s

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-04 Thread Tim Johnson
My machine doesn't seem to recognize Python.Interpreter. Is there some prerequisite that I could be missing? On Feb 4, 2008 1:21 AM, Tim Golden <[EMAIL PROTECTED]> wrote: > Pallavi Apotikar wrote: > > I am sorry, instead of "file", I should have said "a python function". > > > > Is it possible t

Re: [python-win32] makepy exception

2008-02-04 Thread Reinhammar Maria
Hi again, An answer of sorts.. The original problem disappeared when I took some care about *the order* of generation of several .tlb's What I did not reveal in my original post was that I have *many* tlb's associated with SmarTeam. The following snippet shows a successful makepy on the form

Re: [python-win32] Can win32com handle this one?

2008-02-04 Thread Mark Hammond
> I have a couple of type libraries that I've run makepy on. > > The first can be loaded with > > s = win32com.client.Dispatch('nameof.Lib1') > > I have verified that the above gets the ILib1Session object, which > the documentation for that library says is the entry point for > everything. >

Re: [python-win32] How to create a com_record?

2008-02-04 Thread Mark Hammond
> guid = win32com.client.Record("GUID", some_ob) > I don't have the some_obj that allows me to build "GUID". It should be any object from the same typelib - almost certainly whatever object you intend passing this record to. > VB.NET (GetType) and C++ (__uuid) both already know that a GUID is a

[python-win32] Word FormField types

2008-02-04 Thread Graessle, Glenn (FC COE)
Is there an import file that defines the FormField types symbolically? For example, Word Checkbox has the value of 71 for it's type. Glenn Graessle Flight Controls CoE Honeywell International, Inc. 23500 West 105th Street (M/D 42) Olathe, KS 66061 913-712-2645(phone/fax) 913-832-2345 (m

[python-win32] Executing eval function in VBscript

2008-02-04 Thread Tony Cappellini
Date: Mon, 04 Feb 2008 10:05:11 -0500 From: bob gailer <[EMAIL PROTECTED]> Subject: Re: [python-win32] Executing eval function in VBscript To: Janakiraman Mohanakrishnan <[EMAIL PROTECTED]> Cc: python-win32@python.org Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; for

Re: [python-win32] Can win32com handle this one?

2008-02-04 Thread David Abrahams
on Mon Feb 04 2008, Tim Roberts wrote: > David Abrahams wrote: >> I have a couple of type libraries that I've run makepy on. >> >> The first can be loaded with >> >> s = win32com.client.Dispatch('nameof.Lib1') >> >> I have verified that the above gets the ILib1Session object, which >> the doc

Re: [python-win32] Can win32com handle this one?

2008-02-04 Thread Tim Roberts
David Abrahams wrote: > I have a couple of type libraries that I've run makepy on. > > The first can be loaded with > > s = win32com.client.Dispatch('nameof.Lib1') > > I have verified that the above gets the ILib1Session object, which > the documentation for that library says is the entry point

[python-win32] Can win32com handle this one?

2008-02-04 Thread David Abrahams
I have a couple of type libraries that I've run makepy on. The first can be loaded with s = win32com.client.Dispatch('nameof.Lib1') I have verified that the above gets the ILib1Session object, which the documentation for that library says is the entry point for everything. The documentation

Re: [python-win32] How to create a com_record?

2008-02-04 Thread Kevin Patterson
(adding win32 list back in in case someone know more about GetType) Yeah, that's a good way for getting/setting the data. The hangup is: guid = win32com.client.Record("GUID", some_ob) I don't have the some_obj that allows me to build "GUID". From looking through the code it seems that GUID has

Re: [python-win32] Executing eval function in VBscript

2008-02-04 Thread Tony Cappellini
I tried the same - after seeing a post regarding calling Python from an Excel sheet. It seems some people have done this, as it is posted on several different websties. However, I'm getting an error on this line sc.Language = "python" "A script engine for the specified language can not be c

Re: [python-win32] Executing eval function in VBscript

2008-02-04 Thread bob gailer
Janakiraman Mohanakrishnan wrote: > > Hi all, > I have been trying to execute python library functions VBscript, > > Public sc As New MSScriptControl.ScriptControl > > sc.Language = "python" > Value = sc.Eval("{'key':[1,2]}") > > While

[python-win32] Executing eval function in VBscript

2008-02-04 Thread Janakiraman Mohanakrishnan
Hi all, I have been trying to execute python library functions VBscript, Public sc As New MSScriptControl.ScriptControl sc.Language = "python" Value = sc.Eval("{'key':[1,2]}") While i try to execute the above shown code i am getting exception by sayin

Re: [python-win32] Reading .py or .pyc from an excel sheet

2008-02-04 Thread Tim Golden
Pallavi Apotikar wrote: > I am sorry, instead of "file", I should have said "a python function". > > Is it possible to access/use a python function from Excel VB Editor e.g. a > library function called "eval()" is used to detect whether the > expression/datatype is a valid python expression/dat

Re: [python-win32] COM server support on Vista

2008-02-04 Thread Amish Shah
Hi Michel, I'm having a problem on following configuration of Vista, OS - Vista Ultimate Pyhton: ver 2.4 IE7: Protected mode On I'm installing ietoolbar by following command 1) Run cmd.exe as an administrator, 2) Reach to directory, where ietoobar.py resides, in C:\Python24\Lib\site-packages\w