print output from python

N
Nik posted Mar 29, 01:51:

Hello all,
I would like to print messages from the samplerbox.py 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?

A
AlexM posted Mar 29, 03:11:

Without having all the details about your startup process, here's something to try:

samplerbox.py 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 samplerbox.py You should see all the print messages now :)

N
Nik posted Mar 29, 09:35:

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

N
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

N
Nik posted Mar 29, 21:30:

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

N
Nik posted Mar 29, 21:30:

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

systemctl stop samplerbox

A
AlexM posted Mar 29, 23:49:

Ah yes, this forum uses markdown syntax: https://en.support.wordpress.com/markdown-quick-reference/ so for instance inline code is wrapped by backtick characters (`)

N
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
 

Post