Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

execute current script / run current script, full file path

Help
kenshis
2013-03-02
2013-03-02
  • kenshis
    kenshis
    2013-03-02

    Hello, i have found partial solution:

    exec(editor.getText())
    

    problem is that error returns "<string>" instead of file:

    >Traceback (most recent call last):
      File "D:\prg\npp\plugins\Config\PythonScript\scripts\execCurrent.py", line 1, in module>
        exec(editor.getText())
      File "<string\>", line 32
        if switch ina options:  
                    ^
    SyntaxError: invalid syntax
    

    Is it possible get current filename instead of "<string>", thus enabling going to error by clicking it?