Skip to content

Program Options

These are general settings which affect polyscope’s behavior as a library. It is often convenient to set them just before calling polyscope.init(), but they may generally be set anywhere.

import polyscope as ps

# a few options
ps.set_program_name("important app")

# initialize


program name

A general name to use when referring to the program in window headings, etc. Default: Polyscope.


import polyscope as ps
ps.set_program_name("important app")


How much useful info should polyscope print to stdout? Default: 1.

  • 0 print nothing
  • 1 print occasionally
  • >= 2 print a lot


import polyscope as ps


A string used as a prefix for all messages printed to the terminal by polyscope. Default: [polyscope].


import polyscope as ps
ps.set_print_prefix("[MYAPP] ");
# prints now look like "[MYAPP] loaded openGL"

errors throw execptions

If true, errors in polyscope raise execptions. If false, a polyscope error is shown in the UI, but processing attempts to continue. Default: False.

max fps

The main loop will not run at more than maxFPS iterations per second. -1 disables, running the loop as fast as possible. Default: 60.

use prefs file

Polyscope can read and write to a preferences file to save state between invocations. For now, this is primarily used to restore the window position on the desktop. The preference file is a json-formatted plaintext file called .polyscope.ini.

This option controls the use of the preferences file. If False, if will be neither written nor read. Default: True.

always redraw

Polyscope is designed to use lazy rendering: the scene is only re-drawn if it has changed since the last time it was drawn. This can dramatically reduce resource consumption, and keeps the immediate GUI responsive even on scenes which are irresponsibly large for the machine’s graphics capabilities.

If this option is True, the scene will be redrawn on every main loop iteration no matter what, circumventing the lazy drawing features. Default: False.