[IPython-User] query frontend?
Tue Apr 10 20:33:19 CDT 2012
Given the architecture of IPython, this doesn't even make sense to
ask. The kernel can have multiple different frontends attached to it,
even simultaneously. You could have a qtconsole and notebook attached
to a single kernel and the kernel has absolutely no way of knowing
which commands are coming from the qtconsole and which are coming from
the notebook. That the kernel knows nothing about the frontends is
not an accident, but rather a deliberate design decision that I don't
see us changing anytime soon.
But maybe the better question is this: what exactly are you trying to
do? Maybe there is a different way of approaching it that would make
more sense. Or it might be that there are other abstraction IPython
has or might have to help solve this issue.
On Tue, Apr 10, 2012 at 5:24 PM, mqk <firstname.lastname@example.org> wrote:
> Is there some way to find out from within a python module whether it is
> being imported from a web notebook rather than from the command line?
> Something akin to if __name__ == "__main__"?
> View this message in context: http://python.6.n6.nabble.com/query-frontend-tp4790920p4790920.html
> Sent from the IPython - User mailing list archive at Nabble.com.
> IPython-User mailing list
Brian E. Granger
Cal Poly State University, San Luis Obispo
email@example.com and firstname.lastname@example.org
More information about the IPython-User