python import from other folder outside folder

Do you want to know the information regarding “python import from other folder outside folder”. If yes, you’re in the correct tutorial.

python import from other folder outside folder

# Bring your packages onto the path
import sys, os
sys.path.append(os.path.abspath(os.path.join('..', 'other_folder')))

# Now do your import
from other_folder.other_file import *

Conclusion

I hope this post helps you to know about “python import from other folder outside folder”. If you have any questions regarding this tutorial please let us know via the comment section. Share this article with your friends and family via social networks.

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coder Diksha. Here, I post about programming to help developers.

Share on:

Leave a Comment