platform-independent

Where is Boost.Process?

若如初见. 提交于 2019-11-26 04:19:29
问题 I need to execute a program and retrieve its stdout output in c++. I\'d like my code to be cross-platform too. Having recently discovered the wonderful world of the Boost c++ libraries for all your cross platform needs, I figured I\'d just go to boost.org and read up on the documentation of Boost.Process. Much to my surprise, it wasn\'t there! I then proceeded to figure out what name Boost gave their cross-platform library to start external processes, but haven\'t managed to find it so far. A

Play a Sound with Python [duplicate]

醉酒当歌 提交于 2019-11-26 01:41:58
问题 This question already has an answer here: Play audio with Python 18 answers What\'s the easiest way to play a sound file (.wav) in Python? By easiest I mean both most platform independent and requiring the least dependencies. pygame is certainly an option, but it seems overkill for just sound. 回答1: The Snack Sound Toolkit can play wav, au and mp3 files. s = Sound() s.read('sound.wav') s.play() 回答2: For Windows, you can use winsound. It's built in import winsound winsound.PlaySound('sound.wav'