platform-independent

What is os.linesep for?

What is os.linesep for? Question: Python’s os module contains a value for a platform specific line separating string, but the docs explicitly say not to use it when writing to a file: Do not use os.linesep as a line terminator when writing files opened in text mode (the default); use a single ‘n’ instead, on …

Total answers: 2

Play a Sound with Python

Play a Sound with Python Question: 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. Asked By: Claudiu || Source Answers: pyMedia’s sound example does just that. …

Total answers: 10