Hi John,

No, you cannot detect that. The kernel is not even aware of whether it
is ran from a notebook or any other interface that may not have cells.
Maybe if you shared what you are trying to achieve we can find another solution.

Thanks,
-- 
Matthias


On Fri, Nov 24, 2017 at 10:20 PM, John <[email protected]> wrote:
> From python code in an ipython notebook cell is it possible to detect how
> the cell was executed. For instance is the cell being executed from a "shift
> enter" command or from a "run all cells" command.
>
> Thanks
>
> John
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/7cc52ae0-22b3-40c1-9815-45e7059ffd77%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CANJQusW8f_iN2Zca-9pHqH8%3Dj5%3DkL0RssJ%3DfuzF5R-SaV%2Bu-sw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to