I\'ve written my own mail.py module in spider (anaconda). I want to import this py file in other python (spider) files just by \'import mail\'
I searched on the internet
To import any python script, it should exist in the PYTHONPATH. You can check this with the following code:
import sys
print sys.path
To import your Python script:
For example, if the script is located as '/location/to/file/script.py':
import sys
sys.path.append('/location/to/file/')
import script