"import" not working?

Steve Holden steve at holdenweb.com
Fri Mar 13 13:12:34 CET 2009


Lie Ryan wrote:
> Scott David Daniels wrote:
>> Aahz wrote:
>>> In article <mailman.605.1235434737.11746.python-list at python.org>,
>>> Rhodri James <rhodri at wildebst.demon.co.uk> wrote: ...
>>>> sys.path.append("C:\\DataFileTypes")
>>>
>>> My preference:
>>> sys.path.append(r"C:\DataFileTypes")
>>> This doesn't work if you need to add a trailing backslash, though.
>>
>> Also my preference (except, due to aging eyes and bad fonts, I prefer
>> single quotes unless doubles are needed).  I solve the trailing
>> backslash problem as so:
>>    sys.path.append(r'C:\DataFileTypes' '\\')
> 
> Why not: r'C:\DataFileTypes\ '

Because that's the file named " " that lives in C:\DataFileTypes?

regards
 Steve
-- 
Steve Holden           +1 571 484 6266   +1 800 494 3119
Holden Web LLC                 http://www.holdenweb.com/
Want to know? Come to PyCon - soon! http://us.pycon.org/




More information about the Python-list mailing list