Okay, I wrote the following python script as mymid.py :
"
import mido
import time
def mcatch(msg):
print (msg)
inp = mido.open_input('Q25 MIDI 1', callback=mcatch)
while(True):
time.sleep(100)
"
and copied it to /usr/lib/python2.7
-----------
This now works:
julia> using PyCall
julia> @pyimport mymid
note_on channel=0 note=59 velocity=87 time=0
note_off channel=0 note=59 velocity=64 time=0
...