Choose the display method based on what you want to show and where: use print() for terminal text, Tkinter for an application window, Pillow’s ImageShow to open a still image in an available viewer, OpenCV for an image or video-processing preview, and Pygame for interactive graphics. These are different jobs, not interchangeable ways to show one universal “screen.”
First decide what “display a screen” means
Python can send text to a terminal, open an image in a viewer, draw a desktop application interface, preview processed frames, or create an interactive graphics window. Pick the output location before picking a library: terminal output is not a GUI, and a viewer opened by your program is not the same as a window whose controls and contents your program manages.
| What you want to show | Good starting point | Where it appears | Display-specific requirement |
|---|---|---|---|
| Text or debugging output | print() |
Terminal or console | No graphics window is created. |
| A still image for inspection | Pillow ImageShow |
An available image viewer | A suitable viewer must be available in the runtime environment. |
| A form, controls, or app interface | Tkinter | A GUI window controlled by your program | Run Tkinter’s event loop. |
| An image or video-processing frame | OpenCV HighGUI | An OpenCV window | Process GUI events with waitKey() or pollKey(). |
| Interactive or game-like graphics | Pygame | A window or full-screen display | Present drawing changes and handle events. |
The documentation versions consulted for these APIs are not all the same: Pillow’s page is labeled 12.3.0, Pygame’s display reference 2.6.0, OpenCV’s HighGUI page 5.0, and Python’s Tkinter documentation is development documentation labeled 3.16.0a0. Check the documentation for the versions installed in your environment; examples below use the APIs described here.
Show text in a terminal
For ordinary text output, use Python’s built-in print():
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
message = "Hello from Python"
print(message)
Run the script from a terminal or console. The text appears there; print() does not create a window or put text into a Tkinter app. To put text inside a GUI, create a GUI text or label widget instead. If you are launching a script by double-clicking it, the console may close as soon as the program exits, so run it from a terminal while debugging.
Open a still image with Pillow
Pillow’s ImageShow asks an available viewer to display an image. This is convenient when you want to inspect a picture without building an app window yourself. It delegates display to the environment: the Pillow documentation describes an IPython frontend viewer and platform-specific choices, including the default system PNG viewer on Windows and Preview on macOS; Unix choices depend on installed viewer commands.
from PIL import Image, ImageShow
image = Image.open("picture.png")
ImageShow.show(image)
Install Pillow in the Python environment used to run the script if it is not already present. Change picture.png to the path of your image. Use an absolute path if your script’s current working directory is not the directory containing the image. Since ImageShow relies on a usable viewer, it may not open a visible window in a headless server, container, or other environment without a configured viewer.
Build a desktop interface with Tkinter
Use Tkinter when the screen should be part of a desktop application you control: a window with labels, buttons, inputs, or other widgets. Its Canvas can display text, images, bitmaps, geometric shapes, and embedded windows. The small example below creates a window and draws a label and rectangle on a Canvas.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsRank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
import tkinter as tk
root = tk.Tk()
root.title("Python display")
canvas = tk.Canvas(root, width=480, height=240, background="white")
canvas.pack()
canvas.create_text(240, 40, text="Hello from Tkinter", font=("Arial", 18))
canvas.create_rectangle(80, 90, 400, 200, outline="navy", width=3)
root.mainloop()
Save it as a Python file and run it in a desktop environment with Tcl/Tk support. tk.Tk() creates the main window; Canvas coordinates begin at the top-left; mainloop() keeps the window alive and processes user interface events. Without the event loop, a window may appear only briefly or fail to respond.
For a form-style app, use the relevant Tkinter widgets rather than printing text to the console. For Canvas content, use Canvas methods such as create_text and create_rectangle. If you want to display an image inside the app rather than hand it to a separate viewer, use an image item on the Canvas or an image-capable widget; the Canvas supports image items. An embedded app view gives you control over the window, unlike Pillow ImageShow’s viewer delegation.
Preview an image or frame with OpenCV
OpenCV HighGUI provides a convenient windowing interface for visualizing image-processing results. The key detail is event processing: after imshow(), call waitKey() or pollKey(). OpenCV’s documentation warns that without this GUI housekeeping the window may not appear or may lock up.
import cv2
image = cv2.imread("picture.png")
if image is None:
raise FileNotFoundError("Could not read picture.png")
cv2.imshow("Preview", image)
cv2.waitKey(0) # Wait for a key press while processing GUI events.
cv2.destroyAllWindows()
This example waits for a key before closing. For a sequence of frames, use a short wait interval in the display loop and continue processing events while presenting frames. OpenCV also documents that if an image is larger than the screen, create a normal resizable window before imshow() so the window can be resized. OpenCV installations and runtime environments differ; a headless setup without GUI support is not a suitable place to expect a visible preview window.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Create an interactive screen with Pygame
Use Pygame when you need a graphics display that your program redraws and responds to, such as a game or interactive visualization. Pygame’s 2.6.0 display reference states: “Pygame has a single display Surface that is either contained in a window or runs full screen.” Create the display Surface, draw on it, process events, and explicitly present updates.
import pygame
pygame.init()
screen = pygame.display.set_mode((640, 400))
pygame.display.set_caption("Python display")
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
screen.fill((245, 245, 245))
pygame.draw.circle(screen, (30, 90, 180), (320, 200), 70)
pygame.display.flip()
pygame.quit()
pygame.display.set_mode((width, height)) returns the display Surface to draw on. Changes to that Surface do not become visible simply because you drew them: call pygame.display.flip() to update the whole display, or pygame.display.update() for a software display, optionally limiting the updated region. The event loop keeps the application responsive and lets it notice a close request. The display module maintains one active display Surface at a time.
Choose by control, environment, and refresh needs
- Need text only? Use
print(). It is terminal output, not an on-screen application interface. - Need to inspect a saved image? Pillow ImageShow is a short route if the environment has a suitable viewer. Choose Tkinter or another GUI approach if the image must appear inside an application you control.
- Need a processing preview? OpenCV HighGUI fits the visualization use case, provided the installation and environment support a GUI and you process window events.
- Need custom interactive drawing? Pygame provides a display Surface and expects your program to draw, handle events, and present updates.
- Need buttons, forms, or conventional desktop controls? Start with Tkinter widgets and its event loop; use Canvas when you need a drawable area.
There is no evidence in these API references for a universal speed ranking, nor do they establish that any GUI-capable package is available in every Python installation. Select based on the output and deployment environment, not an assumed performance winner.
Troubleshooting: why nothing appears
The script prints output, but no window opens
print() writes to the console. It does not create a GUI. Use Tkinter, OpenCV, Pygame, or an image viewer method according to the content you want to show.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Tkinter reports that it cannot create a window
Check whether the Python installation and runtime have Tcl/Tk support and whether the program is running in a desktop session. A server or container may lack a graphical display. Run the script in a GUI-capable environment or choose an output method suitable for that environment.
Pillow’s image viewer does not open
Confirm the image path and that the image can be opened. Then check whether the environment has a viewer Pillow can use. ImageShow delegates to available viewers, so a headless runtime or missing viewer can prevent a visible display; use an app-controlled GUI window if you need an embedded image.
An OpenCV window is blank, missing, or unresponsive
Verify cv2.imread() did not return None, which commonly indicates the file was not read. After imshow(), call waitKey() or pollKey() to process GUI events. If there is no GUI support in the installed build or runtime, use a GUI-capable environment.
The Pygame window opens but drawing is invisible
Draw onto the Surface returned by set_mode(), then call flip() or update(). Also keep an event loop running so the display can process events rather than appearing frozen.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchBest Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
The image or window is the wrong size
For Pygame, set the display size in set_mode(). For an oversized OpenCV image, create a resizable normal window before imshow(). Tkinter Canvas dimensions are set when creating the Canvas in the example; adjust those values to the layout you need.
Performance, reliability, and cost considerations
These choices are APIs with different output models, not interchangeable services with comparable published performance figures. The cited documentation does not establish which is fastest. For reliability, account for the actual deployment environment: Pillow needs an available viewer, and visible windows from Tkinter, OpenCV, or Pygame need GUI support. OpenCV and Pygame also require event processing and display updates as described above. No hardware purchase or paid service is required to choose among these Python APIs.
Or skip the browser setup
If by “display a screen” you mean capture a public web page as an image or PDF—not show your local desktop or embed an image in a Tkinter app—ScreenshotNeo can return a website capture from one request. This is a different task from drawing a Python GUI. Its API can return PNG, JPEG, WebP, or PDF; see the ScreenshotNeo website and API documentation.
Python example:
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
Install the requests package if needed and replace YOUR_API_KEY with your key. The documented endpoint is a GET request; the example saves the response bytes to shot.webp.
Equivalent cURL request:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Node.js example:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo accepts and removes cookie or consent banners, newsletter popups, and chat widgets before capture; those steps can each be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. It also offers an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for the free plan.
Frequently Asked Questions
Can Python display an image directly inside the Windows terminal?
The methods in this guide use a terminal, image viewer, or GUI window; they do not describe a standard way to render an image directly inside a text terminal.
Can I use these examples on a headless server?
A headless environment may not have a viewer or GUI display, so the window-based examples may not show anything there. Choose an output path supported by that environment, such as saving output to a file, or run the GUI code in a desktop session.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Free tools Windows power users keep installed
One-click scans. No signup required.

