Download Scripting Language Sample Files

File File type File size File extension Output type Download example file
Python Sample Script Python 5 KB .py Console Download example file
Ruby Sample Class Ruby 3 KB .rb Console Download example file

Scripting language samples

The Python script uses dataclasses, argparse, and type hints following modern Python conventions. The Ruby file demonstrates a class with methods, enumerable usage, and idiomatic Ruby patterns.

Both files are valid and can be executed with their respective interpreters. They are useful for testing syntax highlighting, linters, and code analysis tools.

For compiled language samples, see our systems language files. For web-focused scripts, check the web language files.