I want to use python as a glue language to call DLLs, shared libraries,etc.
I tried this:
<script type="text/python" src="py/app.py"></script>
windll.user32.MessageBoxA(0, 'test','show', 0)
It didn't work for me,but it works in TideSDK.
Any where wrong?Or there are some security limits?
In other words, node-webkit doesn't support python.
thank you sbspk
I tried IronPython to do it:
it works but can't import modules like ctypes:
ImportError: No module named ctypes
What should I do?
Maybe I should try node-ffi
Firstly, I'm going to throw in the customary "why would you even do that?"
However, if you really do need this to work, consider writing a wrapper for your python script which creates an API on a localhost-bound port or socket. Then, launch the python script from your node-webkit application and communicate with it via that socket.
@sonicsnes sounds like a good idea.I will try it.
May I ask what you need python for? Nothing against Python, but what can't you do in JS that you can do in Python? Or is something already built.
If it's something already done, you could try... http://www.skulpt.org/ or something like that.
Even then the point of node-webkit is multiplatform webkit based gui. Adding python would remove support for Windows/maybe Mac depending on what you need. You'd need to hack together some sort of solution for those.
Moral of the story is, it sounds like way too much work.
I think nodejs is as powerful as python. nodejs is enough.
I also can run python as a child process. I think it is easy to implement.
@dubcanada I need python to call Win32API (with ctypes),I found JS can do it only with node-ffi(AFAIK) ,It's going to take a little bit more work for me.
hello, we don't support python directly in the DOM.