I try to open .py file with MINGW64. File 1: myname.py
# myname.py
def get_name():
return "Jim"
File 2: hello.py:
# hello.py
import myname
name = myname.get_name()
print("hello {}".format(name))
When I try to execute hello.py in MINGW64 shell, this error happens:
b2b@DESKTOP-5QEK604 MINGW64 ~/Desktop/Python moje projekty/Dev/apiarena_django/git (master)
$ ./hello.py
./hello.py: line 2: import: command not found
./hello.py: line 4: syntax error near unexpected token `('
./hello.py: line 4: `name = m.get_name()'
how to fix it? I can't find what's wrong.