Menu

Managing output redirection

Help
2016-03-14
2016-03-14
  • Reinis Danne

    Reinis Danne - 2016-03-14

    Hi!

    I want to add a scripting console and Python plugins to an app. The problem is that printing in the plugin redirects output also to the scripting console, but if I turn off the redirection then printing in scripting console doesn't work as expected (it prints only to stdout). The biggest issue with redirection from the plugin is that if after runing a plugin I then want to type something in the console, it is cluttered and to get the prompt I have to press Enter, but it then tries to execute watever text was printed by the plugin.

    Is it possible to separate the outputs from the plugins (run by mainContext.evalFile(plugin)) from the scripting console? Or to make it not execute printed text?

    Reinis

     
  • Florian Link

    Florian Link - 2016-03-14

    You could change the console to only print redirected output when is executes a statement. I think we use such a console in our application.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.