Skip to main content

A cross-platform version of 'os.startfile' from the standard library.

Project description

Overview

This is a cross-platform version of the os.startfile function in the Python standard library.

It emulates the following actions in an operating system's UI:

  • double-clicking a file
  • single-clicking a URL

which will open the default program associated with that type.

Unix Build Status Windows Build Status Coverage Status PyPI License PyPI Version PyPI Downloads

Setup

Requirements

  • Python 3.9+

Installation

Install it directly into an activated virtual environment:

$ pip install universal-startfile

or add it to your Poetry project:

$ poetry add universal-startfile

Usage

After installation, import the startfile function:

from startfile import startfile

startfile("~/Downloads/example.png")
startfile("http://example.com")

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

universal_startfile-0.4.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

universal_startfile-0.4-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file universal_startfile-0.4.tar.gz.

File metadata

  • Download URL: universal_startfile-0.4.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/24.6.0

File hashes

Hashes for universal_startfile-0.4.tar.gz
Algorithm Hash digest
SHA256 927546329a05e497306fd71af59e93371a8ec535c44cbbd30ce42cf10f41f422
MD5 e8d3b716b478bfc179d22607d4772ca1
BLAKE2b-256 347a5a79196105931ca9fef9c8c3d45de0ec33e6de6240ba17ef9b025eb4e8ec

See more details on using hashes here.

File details

Details for the file universal_startfile-0.4-py3-none-any.whl.

File metadata

  • Download URL: universal_startfile-0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.7 Darwin/24.6.0

File hashes

Hashes for universal_startfile-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5de70f9773bc392fe7c93013d0c05b2cc1beec60b9220e909cf8e9411b15d262
MD5 1104ad6450d99a4faba8f5c0acf797bb
BLAKE2b-256 263c17a8c3422aebcaa914e486983376dc6a518e205b672328568dc37b2e84b1

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