[Tutor] include remote module

Alan Gauld alan.gauld at btinternet.com
Sat Sep 12 18:52:42 CEST 2009


"Patrick" <optomatic at rogers.com> wrote 

> Is it possible to include a module that is on another computer?

Possible provided you can specify the patgh in some way that 
can be added to sys.path. Or you can read and exec.

But whatever you do its extremely dangerous unless the remote 
computer is under your complete control, otherwise you could be 
executing any old bit of random, possibly maliciouis code!

So some basic security checks - a checksum at least or, better 
still, a digital signature embedded in a comment would be a 
good idea!

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list