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

java - unable show chart in xls document using jasper reports -

javascript - How to change image src on success AJAX -

java.lang.RuntimeException: Could not generate dummy secret at sun.security.ssl.RSAClientKeyExchange.<init> -