Browse Source

ctkPythonConsole - Import the interactive help module

Since the standard input are now properly handled, the interactive
help module is imported from pydoc instead of setting
the 'help' variable to be 'pydoc.help.help'
Jean-Christophe Fillion-Robin 14 years ago
parent
commit
9f1c5b4640
1 changed files with 1 additions and 3 deletions
  1. 1 3
      Libs/Scripting/Python/Widgets/ctkPythonConsole.cpp

+ 1 - 3
Libs/Scripting/Python/Widgets/ctkPythonConsole.cpp

@@ -361,9 +361,7 @@ void ctkPythonConsole::initialize(ctkAbstractPythonManager* newPythonManager)
 
   // Expose help() function
   QStringList helpImportCode;
-  helpImportCode << "import pydoc";
-  helpImportCode << "help = pydoc.help.help";
-  helpImportCode << "del pydoc";
+  helpImportCode << "from pydoc import help";
   d->PythonManager->executeString(helpImportCode.join("\n"));
 
   this->setDisabled(false);