Skip to main content
Engineering LibreTexts

3.1: GUI vs. CLI

  • Page ID
    13569
  • The Python programs that you can write with Python’s built-in functions only deal with text through the print() and input() functions. Your program can display text on the screen and let the user type in text from the keyboard. This type of program has a command line interface, or CLI (which is pronounced like the first part of "climb" and rhymes with "sky"). These programs are somewhat limited because they can’t display graphics, have colors, or use the mouse. These CLI programs only get input from the keyboard with the input() function and even then user must press Enter before the program can respond to the input. This means real-time (that is, continuing to run code without waiting for the user) action games are impossible to make.

    Pygame provides functions for creating programs with a graphical user interface, or GUI (pronounced, "gooey"). Instead of a text-based CLI, programs with a graphics-based GUI can show a window with images and colors.

    • Was this article helpful?