[Tutor] sys.path.append import python3 not working

Ian D duxbuz at hotmail.com
Wed Feb 5 12:55:37 CET 2014


The network dictates that it is the only way I can really do it as I cannot edit any files directly. I have to append the path on the fly
 
> Date: Wed, 5 Feb 2014 11:51:18 +0000
> From: mail at timgolden.me.uk
> To: tutor at python.org
> Subject: Re: [Tutor] sys.path.append import python3 not working
> 
> On 05/02/2014 11:46, Ian D wrote:
> > Ok even more strangely it is working in the original location.
> >  
> > Am now not 100% sure that I have the folder structure correct.
> >  
> > I will keep a eye on it.
> 
> You might want to consider whether your approach is the best. One
> usually appends to sys.path when there's something dynamic about the
> location of modules (eg for a plugin mechanism). If your library modules
> are always in, say, d:/modules then just set up a PYTHONPATH env var
> with that in it; or use a .pth file in your python directory. I do the
> latter, altho' it's frowned upon by some for reasons I've never entirely
> understood.
> 
> TJG
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140205/818b3af9/attachment.html>


More information about the Tutor mailing list