Just for the record, I followed your advice and didn't waist more time looking for a way to do it (tkx).
However, I used a lambda function, just because it saved me from creating an extra non-lambda function (the callback can only have a string parameter and I needed to pass more parameters):
The input panel call:
window.show_input_panel("What is the new function name?", '', lambda newFcName: self.runCommandLine(self.view.file_name(), firstLine, lastLine, newFcName, execute), None, None)
The callback function signature:
def runCommandLine(self, filePath, fromLine, toLine, newFcName, execute=False):
Just tought of putting it here, it might be usefull to another rookie.
Tkx for your help.