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.7+

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.3.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.3-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for universal_startfile-0.3.tar.gz
Algorithm Hash digest
SHA256 a0f8a832400bdd0257cbe073df34df1f129863a22c674808cf8431f8e79191f7
MD5 de64e5a823dc4447e404b84f097c4a56
BLAKE2b-256 5ab7044ab4bfe67953d62f2d04d29162efc3837e3468f1b9e969620f1f4be7a6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: universal_startfile-0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.10.13 Darwin/24.6.0

File hashes

Hashes for universal_startfile-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4afd041fcfdbb8f51c474894177a079bc833ebed404218b24b6ceb105c084f89
MD5 655d7ad268b4855608d697f91ad3db79
BLAKE2b-256 b9ee367a4e87eec91576e65704ba7b414cc5830fc97145ff44d66dc2a51b2b0e

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