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

Mark Hammond mhammond at skippinet.com.au
Tue Feb 5 02:44:26 CET 2008


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: python-win32-bounces at python.org [mailto:python-win32-bounces at python.org] On Behalf Of Tim Johnson
Sent: Tuesday, 5 February 2008 11:23 AM
To: Mark Hammond
Cc: python-win32 at python.org
Subject: Re: [python-win32] Reading .py or .pyc from an excel sheet

 

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 <mhammond at skippinet.com.au> wrote:

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: python-win32-bounces at python.org [mailto:python-win32-bounces at python.org] On Behalf Of Tim Johnson
Sent: Tuesday, 5 February 2008 10:23 AM
To: Tim Golden
Cc: python-win32 at python.org 


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

 

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 <mail at timgolden.me.uk> wrote:

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/datatype ?  Can we do
> that?

Well as far as I can see, there's nothing to stop you instantiating
a Python interpreter via COM from Excel (class name is
"Python.Interpreter") and then use .Eval or .Exec to do things.
I'm not sure just how much this will buy you, but it should at
least be possible.

TJG

_______________________________________________
python-win32 mailing list
python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32




-- 
_____________________
Ceci n'est pas un email. 


_______________________________________________
python-win32 mailing list
python-win32 at python.org
http://mail.python.org/mailman/listinfo/python-win32




-- 
_____________________
Ceci n'est pas un email. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20080205/9657ef86/attachment.htm 


More information about the python-win32 mailing list