My Music Player software works fine and I'm in the process of debugging the Web 
App.  One of the buttons in the Control Page is to stop the music and when 
pressed, the mp3 object is terminated successfully,  This has worked now for 
four years in the original program (using a physical switch connected to a 
GPIO pin rather than a Web App).

Unfortunately, now I've added the Web code, I've hit a snag.  Immediately 
after successfully terminating, the MP3 Player restarts and I can't see why.  
I've tried adding print statements to the code and this has confirmed all of 
the above, but that's not enough.

The obvious answer is to trace the program, so I had a look at:


and tried to use the simple example given, eg:

python3 -m trace --count -C . minstermusic.py

Unfortunately, I get no output from the trace command because the program is 
designed to never finish so I have to Ctrl-C to get out of it.  Is there a way 
in Python to leave the running software cleanly by simply executing a Python 
statement?  If so I could put that into my program to see where the execution 
goes after the mp3_player_stop() function has completed.  I've been unable to 
find such a statement.

Alternatively, is there a way to get trace to do it's stuff while the program 
is executing?


                Terry Coles

  Next meeting: Online, Jitsi, Tuesday, 2021-03-02 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk

Reply via email to