Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
scripting:python [2018/01/10 19:36] – external edit 127.0.0.1scripting:python [2018/05/11 16:01] (current) admin
Line 1: Line 1:
 ====== Python Scripts ====== ====== Python Scripts ======
  
-You can also use Python for scripting of HippoEDIT. It is not so straight forward as with JavaScript or VB Script but still possible. +You can also use Python for scripting of HippoEDIT. It is not so straightforward as with JavaScript or VB Script but still possible. 
  
 To start writing your tool or service scripts in Python, you need to do following steps: To start writing your tool or service scripts in Python, you need to do following steps:
-  - **Install Python**. There are at least two installations of Python available. Official one, that can be downloaded from [[http://www.python.org/download/|python.org]] or ActivePython installation (free Community Edition) from [[http://www.activestate.com/activepython/downloads|ActiveState web site]]. Download one for your version of Windows version of HippoEDIT (you need x64 bit version for HippoEDIT x64) and install it. Now you can execute python scripts.  +  - **Install Python**. There are at least two installations of Python available. Official one, that can be downloaded from [[https://www.python.org/downloads/windows/|python.org]] or ActivePython installation (free Community Edition) from [[http://www.activestate.com/activepython/downloads|ActiveState web site]]. Download one fitting your version of Windows and your HippoEDIT architecture (you need x64 bit version for HippoEDIT x64) and install it. Now you can execute python scripts.  
-  - **Install Python for Windows extensions**. To be able to use Python for application scripting (with Active Scripting technology), you need to install //Python for Windows extensions// from [[http://sourceforge.net/projects/pywin32/files/pywin32/|Source Forge project page]]. Select the latest build and download extension version corresponding to the version of Python you have installed (for example //pywin32-218.win-amd64-py2.7.exe//). Install it, agree on everything.  +  - **Install Python for Windows extensions**. To be able to use Python for application scripting (with Active Scripting technology), you need to install //Python for Windows extensions// from [[https://github.com/mhammond/pywin32/releases|GitHub project page]]. Select the latest build and download extension version corresponding to the version of Python you have installed (for example //pywin32-223.win-amd64-py3.6.exe//). Install it, agree on everything.  
-  - **Register Python as Scripting Engine**. After installation of the extension, in Python folder (for example C:\Python27) find file //\lib\site-packages\win32comext\axscript\client\pyscript.py// and execute it by double clicking. It shell result in UAC prompt (agree on it) and output like "Registered: Python"+  - **Register Python as Scripting Engine**. After installation of the extension, in Python folder (for example C:\Users\<user_name>\AppData\Local\Programs\Python\Python36\ ) find file //\lib\site-packages\win32comext\axscript\client\pyscript.py// and execute it by double-clicking. It shall result in UAC prompt (agree on it) and output like "Registered: Python"
   - If all went fine, now you are able to run/write Python scripts/plug-ins in HippoEDIT.   - If all went fine, now you are able to run/write Python scripts/plug-ins in HippoEDIT.