Reason for not allowing import twice but allowing reload()

Steven D'Aprano steve at pearwood.info
Tue Mar 1 12:00:17 EST 2016


On Tue, 1 Mar 2016 12:25 am, alien2utoo at gmail.com wrote:

>> As for need of import in Idle session, I use it to
>> - import sys
>> - sys.append.path('D:\\Where\\Ever\\My\\Modules\\Lie')
> 
> Kindly read above as
> sys.path.append(....)
> 
>> - import mymodule


There are better ways to manage your Python path than to manually insert
paths into sys.path like that. What version of Python are you using?



-- 
Steven




More information about the Python-list mailing list