How to call functions in python files that are not in the working directory? -


say working folder . , supporting python files in ./supporting_files/, want call function func in a.py file under ./supporting_files/, should do? tried calling from supporting_files.a import func , not work. how suppose without changing actual working directory?

add __init__.py file (it can empty) supporting_files directory, , python treat package available imports. more details available in python documentation.


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -