jurmu
New Contributor II

Replying here instead of raising a new question.

%run seems to be working OK, but what it does is to run the whole file which means that all the variables/functions become global. In this case the module cannot be used as an object "module.function" etc...

What would be a workaround to do that? I guess re-writing the module as a class could work? This just doesn't "feel" right, writing a class where it should just be a module.

Creating an egg has also been suggested, but again this would result in a package/library that cannot be easily edited.

Any thoughts?