Re: [Dorset] Python Function Appears to be Entered Twice

2017-03-09 Thread Ralph Corderoy
Hi Terry, > On Thursday, 9 March 2017 17:46:45 GMT Ralph Corderoy wrote: > > > def change_rings_2(channel): > > > global msg_subdir, chr_subdir, c_player > > > > You can delete that global, just to make the test simpler still. > > I will still need the msg_subdir; it's used in the code.

Re: [Dorset] Python Function Appears to be Entered Twice

2017-03-09 Thread Patrick Wigmore
On Thursday, 9 March 2017, at 18:01:43 GMT, Terry Coles wrote: > > > If I uncomment the time.sleep() line, then it prints two. > > > > Two `Message Played'? Do they appear roughly together, both > > after a two-second gap? If you're not sure, increase the 2. > > Increasing the delay increases

Re: [Dorset] Python Function Appears to be Entered Twice

2017-03-09 Thread Ralph Corderoy
Hi Terry, > def change_rings_2(channel): > global msg_subdir, chr_subdir, c_player You can delete that global, just to make the test simpler still. > msg_file = 'Change_Rings_On.wav' > msg_path = os.path.join(msg_subdir, msg_file) > > #subprocess.call(['aplay',

[Dorset] Python Function Appears to be Entered Twice

2017-03-09 Thread Terry Coles
Hi, It's me again. My program is all but fully working and those who were at the Meeting on Tuesday may recall me foolishly saying how I didn't have much left to do ;-( One of the few things left is playing the announcements before the Change Rings, MP3 Player, etc start. The functions all