Ziad El Hachem Ziad El Hachem - 3 months ago 25
Python Question

Python Plugin for Notepad++

I installed PythonScript_1.0.8.0 for notepad++, saved my first script as Test.py
and filled it as follows:

Editor.selectAll()
Editor.paste()
notepad.runPluginCommand('NPPExport', 'Copy RTF to clipboard')


However when running, I got the following error:


File
"C:\Users\AA\AppData\Roaming\Notepad++\plugins\Config\PythonScript\scripts\Test.py",
line 1, in

Editor.selectAll()

TypeError: unbound method Boost.Python.function object must be called
with Editor instance as first argument (got nothing instead)


Any Help?

Answer

You need to use editor instead of Editor. Editor is the class and editor is the instance. Example:

editor.selectAll()