i want to import file that is in parent folder and i dont want to do this with sys
my files:
import/
sub_folder/
x.py
a.py
file a.py:
def spam():
print "gg"
file x.py:
from .. import a
def main():
a.spam()
if __name__ == "__main__":
main()
this is the error- Attempted relative import in non-package
I tryed all and nothing works