Import a python file into another python file on pythonanywhere -


i trying built web app on pythonanywhere.

i have file abc.py , file xyz.py . in file xyz.py want use function of abc.py how import abc.py xyz.py given in same directory. import statement? trying:

import "absolute/path/to/the/file.py" didnt work.

also did

from . import abc.py in xyz.py didnt work

pythonanywhere dev here: if they're in same directory, need use

from abc import functionname 

this part of official python tutorial explains how import works.


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -