Group Admins

  • Profile picture of Karim
  • Profile picture of Jean


Public Group active 1 day, 13 hours ago

User group for OpenMusic and computer-aided composition. Visit the Forum for discussions.

Calling External Scripts

Author 4 Subscribed Users |
Profile photo of pbrook

Hi, is there any way to call an external script (e.g. bash, python) and to obtain the stdout stream? OM-SHELL only gives me the return value. For example, if I call a script which prints out “1 2 3″, I can see it in the Listener followed by the return value (0).

I have a feeling that I am doing this incorrectly – please let me know if there is some mechanism or common practice for integrating external code.


April 3, 2016 at 08:12 #17611
Profile photo of ratox

I wonder why no reply to an interesting point, is there any way, i am also interested….

August 5, 2017 at 14:24 #23370
Profile photo of rc


It would be great to have the stdout directly from the om-shell outlet.

A work around would be to write the stdout in a text file and the open it in OM, then you can process the text as you want.
Attached image with simple example retrieving ip information (OM 6.12 Ubuntu).

  1. Screenshot_2017-08-06_01-24-09


  2. Screenshot_2017-08-06_01-24-09


August 6, 2017 at 01:01 #23371
Profile photo of Jean

Hi there. OM doesn’t propose any specific tool for that, but Common Lisp has a whole set of tools that allow Lisp programs to interact with standard input/output streams, that can (as usual) be used and included in your own tools :


August 8, 2017 at 08:29 #23375
Profile photo of Jean

+ The underlying Lispworks functions that OM uses to execute external commands (or in om-shell) are run-shell-command and call-system/call-system-showing-output.

Both also allow to play with output streams, so it might be possible to read from these streams in order to set return values of a function.

August 8, 2017 at 08:38 #23376

You must be logged in to reply to this topic.

Log in now