Skip to main content

An MS-DOS-like CLI OS made entirely in Python.

Project description

                            ██████╗ ██╗   ██╗    ██████╗  ██████╗ ███████╗
                            ██╔══██╗╚██╗ ██╔╝    ██╔══██╗██╔═══██╗██╔════╝
                            ██████╔╝ ╚████╔╝     ██║  ██║██║   ██║███████╗
                            ██╔═══╝   ╚██╔╝      ██║  ██║██║   ██║╚════██║
                            ██║        ██║       ██████╔╝╚██████╔╝███████║
                            ╚═╝        ╚═╝       ╚═════╝  ╚═════╝ ╚══════╝

A DOS-style terminal simulator built entirely in Python. Implements a virtual filesystem with file and directory management, a built-in package manager, system information display, and support for creating and running Python scripts from within the environment(Linux + MacOS only).

Python 3.7+

Features

  • Virtual filesystem with persistent state across sessions
  • Create, edit, view, copy, move, and rename text and executable files
  • Directory navigation and management (cd, cd .., /)
  • Run Python scripts from within the virtual filesystem
  • Live clock display in the terminal
  • Battery status and file encryption inside simulator
  • Built-in pip package manager (install / uninstall)
  • Command history (last 10 commands) saved and restored between sessions
  • Command pipelining with pipe operators (|)
  • Conditional execution with && operator (run next command only if previous succeeds)
  • Output redirection (>, >>, 2>, 2>&1, &>)
  • Input redirection (<)
  • Variable expansion with $VAR and ${VAR} syntax
  • Exit code support via $? special variable
  • Glob pattern expansion (*, ?, [...])
  • Echo command for printing text with variable substitution
  • Help system with detailed command documentation

Built-in Applications

Lantern

A peer-to-peer mesh chat application for PyDOS.

  • Host or join mesh chat rooms
  • Yggdrasil IPv6 mesh network support
  • Real-time messaging with other PyDOS instances
  • Commands: run setup for mesh network setup, run community to host or join chat

Lynx

A text-based web browser integrated into PyDOS.

  • Browse URLs directly from the terminal
  • Automatic lynx installation with OS detection (apt, pacman, dnf, brew, zypper)
  • Fallback manual installation instructions for unsupported systems
  • Cross-platform support: Windows, macOS, Linux
  • Commands: run web [url] to launch

RubOS (Rubus Engine)

A BASIC-inspired CLI language for creating custom applications within PyDOS.

Features:

  • Variables and arrays: let x = 5, let arr = [1, 2, 3]
  • Input/output: println, ask, read_file, write_file
  • Control flow: if/elif/else, while, loop, for
  • Functions: def greet(name) ... return ... end
  • List operations: append arr "item", menu ["Yes", "No"]
  • File operations: read_file "file.txt", write_file "out.txt" content
  • Utilities: clear, pause, color, exit, list_dir
  • Comments with #

Creating Custom Apps:

  • create -cli <appname> - Create a new RubOS application
  • Edit the generated main.rub file
  • Run the app by typing its name
  • Check app status with state <appname>

Example:

create -cli mygame
cd /home/user/apps/mygame
edit main.rub
mygame

Quick Start (No Installation Required)

If you have Python 3.7+ already installed, you can run PyDOS directly without installing pip:

cd /path/to/PY_DOS
PYTHONPATH=src python -m pydos

Or if you have the dependencies installed:

PYTHONPATH=src python3 -m pydos

Installation

Prerequisites

  • Python 3.7 or higher
  • pip/pipx (optional - only needed if you want to install as a package)

Installing pip (if not already installed)

Linux:

# Debian/Ubuntu
sudo apt update && sudo apt install python3-pip

# Fedora/RHEL
sudo dnf install python3-pip

# Arch
sudo pacman -S python-pip

# Alpine
sudo apk add py3-pip

macOS:

# With Homebrew
brew install python3

# Python 3 comes with pip by default

Windows:

# Download from https://www.python.org/downloads/
# Python 3.7+ includes pip by default

Installing pipx (recommended)

Windows:

python -m pip install --user pipx
python -m pipx ensurepath

Restart your terminal after running these.

macOS:

brew install pipx

Or without Homebrew:

python3 -m pip install --user pipx
python3 -m pipx ensurepath

Linux (Ubuntu/Debian):

sudo apt update && sudo apt install pipx

Linux (other distros):

python3 -m pip install --user pipx
python3 -m pipx ensurepath

Installing PyDOS

Using pipx (recommended):

pipx install Py-DOS-B1

Using pip:

pip install Py-DOS-B1

Running locally:

git clone https://github.com/basanta-bhandari/PY_DOS
cd PY_DOS
pip install -r requirements.txt
PYTHONPATH=src python -m pydos

Development install (editable mode):

git clone https://github.com/basanta-bhandari/PY_DOS
cd PY_DOS
pip install -r requirements.txt
pip install -e .
boot

On some systems a virtual environment is required first:

python -m venv venv
source venv/bin/activate   # Windows: venv\Scripts\activate
pip install -r requirements.txt
PYTHONPATH=src python -m pydos

OS-Specific Package Manager Detection: When running Lynx, PyDOS automatically detects your system's package manager and attempts to install it:

  • Linux: apt, apt-get (Debian/Ubuntu), pacman (Arch), dnf (Fedora/RHEL), zypper (openSUSE), apk (Alpine)
  • macOS: brew (Homebrew)
  • Windows: Provides manual installation instructions
  • Fallback: Detailed manual installation instructions if automatic detection fails

Running PyDOS

boot

Commands

All directory, file & system commands can be viewed through the 'help' command.

Package Manager

install <package> ------> Installs a Python package via pip
uninstall <package> ---> Uninstalls a Python package via pip
packages -----------> Lists all installed packages

Editor

Text and executable files open in nvim on macOS/Linux and Notepad on Windows. When using nvim:

  • i -> enter insert mode
  • Esc -> exit insert mode
  • :wq -> save and exit
  • :q! -> exit without saving

Troubleshooting

  • Close and reopen your terminal
  • Windows: ensure the Python Scripts directory is in your PATH
  • macOS/Linux: ensure ~/.local/bin is in your PATH
  • Verify installation: python -m pip show Py-DOS-B1

Permission errors on Linux/macOS:

pip install --user Py-DOS-B1

Status: Beta (v1.2)
Enjoy your retro experience! Feel like a Boomer!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_dos_b1-1.6.tar.gz (34.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_dos_b1-1.6-py3-none-any.whl (40.2 kB view details)

Uploaded Python 3

File details

Details for the file py_dos_b1-1.6.tar.gz.

File metadata

  • Download URL: py_dos_b1-1.6.tar.gz
  • Upload date:
  • Size: 34.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for py_dos_b1-1.6.tar.gz
Algorithm Hash digest
SHA256 19bfb8a73047d92b1ffd915995b98704feb99fec7941827a98c1ea29865b1719
MD5 7abf227354f615cf1f19be4adcd964c6
BLAKE2b-256 3e5d5c6b600355cf7d253243bd9e856a2c7683225b454be35f4f40e60ef3e4a7

See more details on using hashes here.

File details

Details for the file py_dos_b1-1.6-py3-none-any.whl.

File metadata

  • Download URL: py_dos_b1-1.6-py3-none-any.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for py_dos_b1-1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3efe8a916bec9be4d24d67f940dc3dce5ea1af14c3ed57990f4e935bdbf389ec
MD5 f64a5aedfcbb75216ffa96a3d09b93a1
BLAKE2b-256 215c99b103738d51ba95b3de2865edac0ce57772fd43d9dbab0b5b01be8a33b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page