Personal tools
You are here: Home Forum How to use Salome? How can we use print() or input() statement in python ?

How can we use print() or input() statement in python ?

Up to How to use Salome?
  • How can we use print() or input() statement in python ?

    Posted by HAEFFLER_Benoit at October 29. 2007
    Hello

    I want make python script for salome.

    In this script :
    I want print an info,
    but when i want use print statement, python interpreter print this info only after executing all the script.

    and i want ask to the user a info,
    but when i use input() statemtn, the python interpreter is blocked.


    how can we use print() or input() statement ?
    • Re: How can we use print() or input() statement in python ?

      Posted by Vadim SANDLER at October 29. 2007
      Dear HAEFFLER,

      This way of user interaction is not supported by the embedded SALOME python console. You should avoid of using such constructions in your python scripts.
      Actually the Python script is executed synchronously and the embedded Python interpreter is blocked until the script finishes. This is done intentionally to avoid possible application troubles.

      Regards,
      Vadim.

      • Re: How can we use print() or input() statement in python ?

        Posted by HAEFFLER_Benoit at October 30. 2007
        Thanks Vadim for your answer
Powered by Ploneboard
Document Actions