Skip to content

v1.2

Choose a tag to compare

@github-actions github-actions released this 08 Sep 23:55
· 46 commits to main since this release
c6c5711

v1.2 is a PEM release: The PythonMusic libraries (gui, music, etc.) are unchanged.

Create Executable

New in this release. File > Create Executable packages the script you are editing into a standalone program you can hand to someone else — a .app on macOS, a single .exe file on Windows and Linux. The build bundles Python, PythonMusic, and a soundfont, so the program runs on a machine with no Python installed.

  • PEM saves the script first if it needs saving, confirms before starting, and shows a progress dialog with a Cancel button — a build takes a few minutes.
  • Two new settings under Preferences > General > Create Executable:
    • Show Console — give the built program a text console so it can use print() and input(). Off by default, which keeps the program windowed.
    • Quit When Last Window Closes — end a built window program once its last window closes. On by default; turn it off for programs that keep working after a window closes, such as those using MidiIn, whose device chooser is itself a window.

Windows and tabs

  • Closing the last tab no longer exits PEM. A fresh blank tab takes its place, leaving you with a window ready to type in. To quit, use the window's close button, Quit the application, or Close All.

Menus and keyboard shortcuts

  • Ctrl/Cmd+T opens a new window, alongside the existing Ctrl/Cmd+N.
  • Ctrl/Cmd+P prints.
  • Replace moved to Ctrl/Cmd+Shift+F, next to Find.
  • Dedent Region accepts both Ctrl/Cmd+[ and Shift+Tab on every platform.
  • Ctrl+Shift+C shows the Console on Windows and Linux.
  • Stop is now a single Stop command (Ctrl/Cmd+F5) rather than a separate stop-all.
  • The Help menu links to the PythonMusic docs (F1), replacing the old JythonMusic entry.

Console

  • Program output prints in blue by default, so it reads apart from what you type.
  • The ... continuation prompt no longer appears on lines of program output. It marks continued input only.
  • Fixed a bug with command history that skipped short (<2 character) commands.
  • The Reset Console toolbar button is replaced by Stop, which now appears on both the editor and the Console and stops the running program.

Running programs

  • Large integers print in full. Python's default limit on converting very large integers to text is lifted inside PEM.
  • matplotlib defaults to the Qt backend unless you have chosen another.

Under the hood

The interpreter that runs your programs moved into its own module (pem.interpreter), separating it from the Console's user interface. Behavior is unchanged, but it makes the run/stop path easier to follow and to fix.

Full Changelog: v1.1...v1.2