NsPython plug-in

From NSIS Wiki

(Redirected from Python Interpreter)
Author: KiCHiK (talk, contrib)


Version for python 2.7 NSIS-Python27.zip (1272 KB)

Version for python 2.6 NSIS-Python26.zip (1025 KB)

Version for python 2.5 NSIS-Python25.zip (994 KB)

Version for python 2.3 NSIS-Python.zip (42 KB)


Using NSIS installer and want some advanced scripting? Deploying a Python application and want to execute Python code during setup? Here is a solution.

Supported commands by this plug-in are eval, exec and execFile. A special nsis module is exposed to Python which supports writing to the log, display a message box and get/set the NSIS variables. The win32 parent handle of the installer can also be read so it's open for extensions that use win32all or ctypes.

Supports Python 2.3, 2.5 Other Python Versions may work but the nsPython.dll has to be rebuild for them.

Python License.

Original Authors site: http://homepage.hispeed.ch/py430/python/index.html

A version that supports Python 2.2 is available at the above address.

Problems ?

There is a comment about a problem where no modules are found. See the "comment" link at the top of the page.

  • There is a bug (at least in 2.5) that fails any attempt to get or set a user variable (see source code: "for( i=0; i<26; i++)", but length of string_to_enum is 25).
    FIXED in Version with python26
Personal tools