[Tutor] How to import a module which was not in the current working directory?

Andrew Robert andrew.arobert at gmail.com
Fri May 26 16:53:08 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Linda,

You can append your path to include the location of the module.

An example of this would be:

sys.path.append(r'\\share\somedirectory')


linda.s wrote:
> Hi,
> How to import a module which was not in the current working directory?
> Thanks,
> Linda
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)

iD8DBQFEdxZUDvn/4H0LjDwRAovqAJ99tie7ZVJiFdHF/wnqxYGujBmhuQCdFWEw
fFa4k3xTnxwr/nPmuG8PW1Q=
=IVFd
-----END PGP SIGNATURE-----


More information about the Tutor mailing list