Notebook-wide import?

11 views
Skip to first unread message

Joerg Schnitzbauer

unread,
Mar 19, 2012, 4:11:07 PM3/19/12
to Reinteract
Hi,

is it possible to have notebook-wide import of modules?
I would like to get rid of repetitive imports for each worksheet.

Thanks,
Joerg

Owen Taylor

unread,
Mar 19, 2012, 7:03:11 PM3/19/12
to reint...@googlegroups.com
I generally don't see adding this feature - it strikes me as too magic
to have modules just present because of notebook-level configuration.

If you have a long series of imports that is very burdensome, you
could create a common.py library in the notebook with whatever imports
you wanted and do:

'from common import *'

- Owen

> --
> You received this message because you are subscribed to the Google Groups "Reinteract" group.
> To post to this group, send email to reint...@googlegroups.com.
> To unsubscribe from this group, send email to reinteract+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/reinteract?hl=en.
>

Joerg Schnitzbauer

unread,
Mar 19, 2012, 8:12:15 PM3/19/12
to Reinteract
That sounds like a good idea. Thanks!

Joerg
Reply all
Reply to author
Forward
0 new messages