Quantcast
Channel: Import module from subfolder - Stack Overflow
Viewing all articles
Browse latest Browse all 7

Answer by Max Kamenkov for Import module from subfolder

$
0
0

Set your PYTHONPATH environment variable. For example like this PYTHONPATH=.:.. (for *nix family).

Also you can manually add your current directory (src in your case) to pythonpath:

import osimport syssys.path.insert(0, os.getcwd())

Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>