-3

Sorry I have a quick question if I was to import a package from a different file directory would that be possible to call how could I call it

AJA SMBAT
  • 1
  • 2
  • Does this answer your question? [Importing files from different folder](https://stackoverflow.com/questions/4383571/importing-files-from-different-folder) – Martheen May 31 '22 at 18:57

1 Answers1

0

If it's in a subfolder of your project folder, use:

from FOLDERNAME import thing

It selects the subfolder and chooses the module/package

OR Do so:

import sys
sys.path.insert(1, 'C:\\serverorsomething')
import app.folder.file
file.function()

This changes the imaginary directory for Python to import from.