Import external .py script I have a Blender python script in my Blender file

import bpy
print(variable)


and an external .py file in the same directory as the .blend file.

variable = "spam"


I want to import the external file into Blender using a relative path.
You can append the path to your script

import bpy, sys
sys.path.append('//myscript.py')
import myscript