Catalina Python3

Latest version

Released:

Tkinter
  1. Link to Installing the latest version of Python on Mac OS Catalina and overriding the old default pre-installed version podcast on anchorfm I finally did it. I successfully installed Python version 3.7.7 via Homebrew on my Mac laptop with OS Catalina installed.
  2. Python 3 is the future and it is supported by all major Python libraries. In this tutorial, we’ll use Python 3.9 which is the latest stable release of Python at the time of this writing. Start by installing the Command Line Tools for macOS.

audioplayer is a cross platform Python 3 module for playing sounds (mp3, wav, ...)

Project description

audioplayer is a cross platform Python 3 package for playing sounds (mp3, wav, ...). It provides the key features of an audio player, such as opening a media file, playing (loop/block), pausing, resuming, stopping, and setting the playback volume.

Homebrew provides formulae to brew Python 3.x. Homebrew provided a python@2 formula until the end of 2019, at which point it was removed due to the Python 2 deprecation. Important: If you choose to use a Python which isn’t either of these two (system Python or brewed Python), the Homebrew team cannot support any breakage that may occur. However, I notice you mention that you are using IDLE from Python 3.7.3. If so, be aware that that is not the latest release of either Python 3 or Python 3.7 (3.7.3 predates Catalina.) 3.7.7 is the most recent for 3.7 but Python 3.8 is now current and its most recent release, 3.8.3, has the most up-to-date support for 10.15.

I created this package to provide sound functionality to my game library game2dboard, but I decided to publish it separately.

Suported systems (see full list):

  • GNU/Linux (PC, Raspberry Pi, ...)
  • Windows
  • macOS

Inspired by (and with a few lines of codes from) the playsound module.

Install

Prerequisites

GNU/Linux

In Linux, you need to install PyGObject and others dependencies.

Ubuntu/Debian/Raspberry Pi OS:

Catalina Python3 Install

Redhat/Centos/Fedora:

macOS

In macOS, you need to install PyObjC bridge.

Install

The recommended way to install audioplayer is using the Python pip (or pip3) installer.

If you don't have administrator privileges, install in your home folder.

You can install the latest release by cloning this repository.

Usage

The API is documented bellow and within the docstrings.

Catalina Python 3d

After install, you can use this code to test (replace 'path/to/somemusic.mp3'):

API

Creation

Catalina python 3
  • audioplayer.AudioPlayer(filename)
    Creates the player.

    • filename : str – The file name with extension (.mp3, .wav, ...)

    Raise: FileNotFoundError() : The file does not exist.

Properties

  • filename : str (readonly)
    The file name as provided in the constructor.

  • fullfilename : str (readonly)
    The file name with full path.

  • volume : int
    Gets or sets the current volume (in %) of the audio (0 — 100)

Methods

  • play(loop=False, block=False)
    Starts audio playback.

    • loop (bool) – Sets whether to repeat the track automatically when finished.
    • block (bool) – If true, blocks the thread until playback ends.

    Raise: AudioPlayerError(): Failed to play.

  • pause()
    Pauses audio playback.

  • resume()
    Resumes audio playback.

  • stop()
    Stops audio playback. Can play again.

  • close()
    Closes device, releasing resources. Can't play again.

Suported Systems

audioPlayer has been tested on the following platforms:

OSDetailsmp3wavoggmid
GNU/LinuxMint 19 (Cinnamon)
GNU/LinuxXubuntu 20.04
GNU/LinuxRaspberry Pi OS
WindowsWindows 10 x64
macOSCatalina (Python 3.8)
Python3

?: Not yet tested

Let me know if you are using on another system/distro/version!

What's in the roadmap?

  • .seek(position) : Moves playback to the specified position.
  • .state : Current state (playing, stopped, paused, ...)
  • .speed = value : Gets/sets playback speed.
  • Callbacks: when state changed, when position changed by a delta, ...

How to Contribute

Submitting an issue

Catalina Python 3 Download

Use the issue tracker to submit bug reports and features or enhancements requests.

Translating

You can contribute by translating this document into other languages ​​(except en and pt_br).

Submitting a pull request

If you can improve anything in this project, feel free to add a pull request.

License

audioplayer is under MIT license. It can be reused within proprietary software provided that all copies of the licensed software include a copy of the MIT License terms and the copyright notice.

Release historyRelease notifications | RSS feed

Python3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for audioplayer, version 0.6
Filename, sizeFile typePython versionUpload dateHashes
Filename, size audioplayer-0.6-py3-none-any.whl (8.3 kB) File type Wheel Python version py3 Upload dateHashes
Filename, size audioplayer-0.6.tar.gz (6.5 kB) File type Source Python version None Upload dateHashes
Close

Mac Catalina Python3 Default

Hashes for audioplayer-0.6-py3-none-any.whl

Catalina Python 32-bit

Tkinter
Hashes for audioplayer-0.6-py3-none-any.whl
AlgorithmHash digest
SHA2562a90da014d3519e7c2319c4ee4969cb4d30741b34ef0877b3314d5b7143a52d3
MD5feb4709ccbc6416c6f849cda60e4806c
BLAKE2-25640243e4f66bde68aee74193aca6bb8a8e325f8728d03e0bd629795b17409b885
Close

Hashes for audioplayer-0.6.tar.gz

Catalina Python3 インストール

Hashes for audioplayer-0.6.tar.gz
AlgorithmHash digest
SHA25694b18dcd7a8067546f8483fc7e69a58d1e603588ab1752c743ff6e0ff8cb2be6
MD57bda820d29dbbd204cc9b268ad13079c
BLAKE2-256fa5d2a25f076c7f921ea9aceec368d315708f5cfe629ce33cb57a3a37fc577b6