How to get pre- and post- command execution notifications working in ShellEditor?

9 views
Skip to first unread message

Daniel Farrell

unread,
Jun 1, 2023, 3:26:06 AM6/1/23
to Enthought Tool Suite users
Hello all,


ShellEditor seems to expose `command_executed` and `command_to_execute` extended trait attributes. You can supply to them a string of a trait on your object and when the user types something in the embedded Python shell they will get a notification. However, only post-command notification (command_executed) fires. The pre-command notification does not seem to work.

For example,

    ShellEditor(
        share=False,
        command_executed="did_execute_command",
         command_to_execute="will_execute_command"  # never notified
     )

A full working example is shown via the link above.

Regards,

Dan

Reply all
Reply to author
Forward
0 new messages