Remove the space before the =
, and it should work:
$ cat /tmp/x.py
print 'hello, world!'
$ alias execute='python /tmp/x.py'
$ execute
hello, world!
Also note that I'm using the absolute path (/tmp
). Using a relative path would make the command work in some directories, but not in others.