Skip to content
Sign UpLog In
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
2

Import from folders

RYANTADIPARTHI
RYANTADIPARTHI

I have a folder, and in the folder I have on file, and in the file I have one function.

In main.py, I want to import the function from that file, and from that folder.

I tried all methods of importing, but everything gives an error. Can anyone tell me how to do this correctly, or is it a replit error?

Thanks!

1 year ago
You are viewing a single comment. View All
1
bendev9
bendev9

@RYANTADIPARTHI
, here's another one to try:

import sys sys.path.apped("FULL_PATH_TO_FOLDER") from file import function function()
1 year ago