I am trying to develop a script with mod-script-pipe utility but when i am trying to open a pipe for writing the commands, its getting stucked. The pipe is present at /tmp/audacity_script_pipe.to.{user_id}
. I am using python and audacity appImage(version: 3.7.3). System Info: Ubuntu 22.04.5, also i’ve enabled the mod-script-pipe module from Edit > Preferences > Modules several times. don’t know whats going wrong.
These is the python snippet i am using
import os
import sys
if sys.platform == 'win32':
print("pipe-test.py, running on windows")
TONAME = '\\\\.\\pipe\\ToSrvPipe'
FROMNAME = '\\\\.\\pipe\\FromSrvPipe'
EOL = '\r\n\0'
else:
print("pipe-test.py, running on linux or mac")
TONAME = '/tmp/audacity_script_pipe.to.' + str(os.getuid())
FROMNAME = '/tmp/audacity_script_pipe.from.' + str(os.getuid())
EOL = '\n'
print("Write to \"" + TONAME +"\"")
if not os.path.exists(TONAME):
print(" ..does not exist. Ensure Audacity is running with mod-script-pipe.")
sys.exit()
print("Read from \"" + FROMNAME +"\"")
if not os.path.exists(FROMNAME):
print(" ..does not exist. Ensure Audacity is running with mod-script-pipe.")
sys.exit()
print("-- Both pipes exist. Good.")
TOFILE = open(TONAME, 'w')
print("-- File to write to has been opened")
FROMFILE = open(FROMNAME, 'rt')
print("-- File to read from has now been opened too\r\n")
its getting stucked on TOFILE = open(TONAME, 'w')
and when i press any key its getting exited with KeyBoardInterrupt.
any help would be highly appreciable. Thanks