Can you call python functions from VBA?
I'd like to be able to write functions in python to interface with PSSE and then call them from a VBA macro in MS Excel. Has anyone attempted this? Perhaps it could be done by writing a python class and compiling it to some form that can be imported into VBA, just a guess.

Comments
Is there anything stopping you from using ``shell()`` to call the python script (compiled as an .exe if needed) and use command-line args + fileio to move data back and forth?
I saw a startup that swapped VBA for python in the macros: https://datanitro.com/, the commercial packages aren't cheap though. Apart from that, I'd follow chip's idea of using `shell` to make system calls. If you can find a more elegant solution I'd love to hear about it.
One final idea, Python can call VBA macros. So you could do the reverse. Call the macro from Python. Of course - that is the exact opposite of what you asked :)
I have not used shell() before but I'll definitely give it a try. It sounds a bit clunky and maybe slow using fileio if there is to be a lot of data moving back and forth. I'm still curious if there is a way to instantiate python-written classes directly in VBA or if they are incompatible. Thanks