print output from python

Nik posted Mar 29, 01:51:

Hello all,
I would like to print messages from the script for debugging purposes, like info about the MIDI data received. But I don't see any print messages from the python script.
I though that maybe the standard output is somehow not going to the screen and I've already tried messing around with he console parameter in cmdline.txt (boot partition) or piping the python script into a file, but no success. I guess I'm too much of a Linux noob to find the solution..
What can I do to make this visible?

AlexM posted Mar 29, 03:11:

Without having all the details about your startup process, here's something to try: runs on startup - kind of like behind the console. Let's kill it and start it again: killall python

Enter the sb directory: cd SamplerBox

Start SamplerBox: python You should see all the print messages now :)

Nik posted Mar 29, 09:35:

Wow, thanks for the quick reply! I'll try that out tonight and will let you know.

Nik posted Mar 29, 21:25:

Hey AlexM,
it works! Thanks a lot. Now I can add some debug output to find out why the velocity stuff is not working, and it should help me with other ideas as well.
Kind regards

Nik posted Mar 29, 21:30:

Oh, one addition: I had to use {code}systemctl stop samplerbox{/code} to stop samplerbox.

Nik posted Mar 29, 21:30:

Uh, how do you do that code markup? I meant

systemctl stop samplerbox

AlexM posted Mar 29, 23:49:

Ah yes, this forum uses markdown syntax: so for instance inline code is wrapped by backtick characters (`)

Nik posted Apr 4, 10:49:

Well then, so I had to use
systemctl stop samplerbox
to stop samplerbox.


  (not published)
  I want to post as guest