Skip to main content
2 of 3
added 34 characters in body
Jacobm001
  • 11.9k
  • 7
  • 47
  • 57

Aliases are something your shell interprets and runs. It's not a system call. That's why it works from your .sh scripts, but not this python script.

I would suggest changing your call to:

subprocess.call(['/bin/sh', '-i', '-c', 'say', 'the light is ...')

Jacobm001
  • 11.9k
  • 7
  • 47
  • 57