Differences between shell and coder

Hi all,

I’m working on experiment that requires me to play a multi-channel sound file through an external USB sound card. I am working with PsychoPy v1.90.3 (on a Windows machine). My little debugging script to see if the sounds play works perfectly when I go line by line in the shell (pyshell) but when I run it from the coder nothing happens (no feedback from the sound card but also no error messages in PsychoPy output). Below is the code I am using:

from scipy.io import wavfile
import numpy as np
import sounddevice_EB as sd
fs, data = wavfile.read(‘bla bla bla\module1.wav’)
soundArr = np.array(data)

Note that I’ve tweaked ‘sounddevice.py’ to force it to recognise the 6 channels which is why it’s importing this amended file. I also put in little ‘print’ commands after each line to see if it was getting stuck but it ran through everything fine, just without actually playing the sound.

So my main question is this: what are the differences between how the shell and the coder executes code?