[Tutor] functions in other files, executing

alan.gauld@bt.com alan.gauld@bt.com
Fri, 18 Oct 2002 17:31:42 +0100


> Another option would be to open the files as
> text, and use restricted exection or exec to
> run them instead.

That could be dangerous if the files defined more 
than the functions you want to use - name collisions etc.

Also if there is any code in there that does more than 
define classes/functions it would get executed with 
unpredictable results.

If the problem is really bad I'd look at using OS facilities 
to create links to the needed libraries from a single folder 
and then import from there.

But I suspect the real issue is why you have so many 
different locations? Is it possible to rationalize the 
storage of the libraries? Even if multiple projects and 
programmers are involved a shared repository is 
probably "a good thing"...

Alan g.