Skip to main content
added 3 characters in body
Source Link
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 ...')

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

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 ...')

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 ...')
added 34 characters in body
Source Link
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 ...')

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 ...')

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 ...')

Source Link
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 ...')