1 | initial version |
Short (unusable) answer : no.
Better answer : @interact
wraps your function in an interact
call ; interact
... interacts (surprise !) with an underlying notebook infrastructure running your interface when this infrastructure exists !. If you are running from the command line, this infrastructure does not exists, and interact
has nothing to interact with.
In fact, typing interact?
in a notebook cell gets you the documentation of the Interact
class,which is the infrastructure needed for such interactions. But in a command line session :
sage: interact?
Object `interact` not found.
the interact
function isn't even defined then.
Without looking at the source code, one can guess that the Interact
class and its companions are defined at session startup ... if and only if the needed infrastructure exists in the session.
HTH,