Skip to content

script

A script is a program, usually short, written to be run directly by an interpreter rather than compiled ahead of time into a standalone executable. Scripts automate work that a person would otherwise do by hand, and they typically begin executing at the first line of source code rather than at a designated entry point.

The line between a script and a full application is about use and scale, not a hard technical rule. The same language can serve both a throwaway script and a large program, so the label describes how code is used rather than what it can do.

A script tends to be small and single-purpose, written and run in quick cycles because no separate build step sits between editing the code and seeing it work.

Common roles for scripts include the following:

  • Automation, replacing a repetitive manual procedure such as renaming files or transforming data.
  • Glue code, connecting separate programs so they work together as a pipeline.
  • Embedded control, driving a host application from within it, as build tools and game engines allow.

The term traces back to batch processing on early mainframes, where a job script listed commands for a machine to run unattended. Languages built with scripting in mind, including Python and Bash, keep that emphasis on quick, direct execution.

How to Run Your Python Scripts

Tutorial

How to Run Your Python Scripts and Code

Learn how to run Python scripts from the command line, REPL, IDEs, and file managers on Windows, Linux, and macOS. Master all execution approaches.

basics best-practices devops python

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated June 22, 2026 • Reviewed by Leodanis Pozo Ramos