I am trying to follow @Eric Leschinski exmaple 7 solution on how to import other python files. I belive he is using a Linux base operating system since his path are in the format of el@apollo:/home...
. I am using Windows and am not quite sure how to replicate his solution in regards to the paths. I don't quite understand the @
and $
symbols and if I need to change them?
D:\Echo\herp\__init__.py
:
D:\Echo\herp$ touch__init__.py
D:\Echo\herp$ ls
__init__.py
D:\Echo\herp\derp\__init__.py
:
D:\Echo\herp\derp$ touch__init__.py
D:\Echo\herp\derp$ ls
__init__.py
D:\Echo\herp\derp\yolo.py
:
def skycake():
print("SkyCake evolves to stay just beyond the cognitive reach of " + "the bulk of men. SKYCAKE!!")
D:\Echo\main.py
from herp.derp.yolo import skycake
skycake()
Traceback (most recent call last):
File "D:/Echo/main.py", line 1, in <module>
from herp.derp.yolo import skycake
File "D:\Echo\herp\__init__.py", line 1
D:\Echo\herp$ touch__init__.py
^
SyntaxError: unexpected character after line continuation character