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

Ian D duxbuz at hotmail.com
Wed Feb 5 12:46:09 CET 2014


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.
 
Thanks
 
To: tutor at python.org
From: davea at davea.name
Date: Wed, 5 Feb 2014 06:32:46 -0500
Subject: Re: [Tutor] sys.path.append import python3 not working

 Ian D <duxbuz at hotmail.com> Wrote in message:
>
 
 
> import sys
> sys.path.append("d:\modules")
 
> I have tried it with append("d:\\modules") append("d:/\modules")
 
The first form is not reasonable, you'd need to double the
 backslash. But your second try should have worked.  Here's what I
 would use:
 
"d:/modules"
or perhaps
r"d:\modules"
"d:\\modules"
 
I would suggest printing sys.path from your code,  just in case.
 
I would then check the actual directory name and module name, 
 especially for case. Windows may not usually care about case, but
 sometimes it does matter.
 
Finally I'd run the python with the -v switch,  and see what it
 tells you.
 
 
-- 
DaveA
 

_______________________________________________
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/d21016a4/attachment.html>


More information about the Tutor mailing list