I already submitted an answer to this question 2 years ago, where I recommended scikits.audiolab.
In the meantime, the situation has changed and now there is a library available which is much easier to use and much easier to install, it even comes with its own copy of the libsndfile library for Windows and OSX (on Linux it's easy to install anyway): PySoundFile!
If you have CFFI and NumPy installed, you can install PySoundFile simply by running
pip install soundfile --user
Writing a 24-bit WAV file is easy:
import soundfile as sf
sf.write('my_24bit_file.wav', my_audio_data, 44100, 'PCM_24')
In this example, my_audio_data has to be a NumPy array with dtype 'float64', 'float32', 'int32' or 'int16'.
BTW, I made an overview page where I tried to compare many available Python libraries for reading/writing sound files.