Demo program to show how shell_with_animation works

This commit is contained in:
PySimpleGUI 2020-02-24 14:15:48 -05:00
parent 6982c4078d
commit 8406758d1c
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
import PySimpleGUI as sg
"""
Demo shell_with_animation call
This is a high-level function that could easily live in user's code instead of PySimpleGUI. The
rationale for bringing it into PySimpleGUI is to encourage users to experiment with working with
more external tools like ffmpeg. The shell_with_animation function allows users to easily start
a long-operation without fearing that the GUI will appear to be frozen. It offers a wide range
of parameters to help create a custom animation window.
"""
# Here we're running a simple "pip list" command and using the built-in animated GIF.
output = sg.shell_with_animation('pip', 'list', message='Loading your pip list', background_color='white', text_color='red', font='Helvetica 15')
sg.popup_scrolled(output, font='Courier 10')