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.1.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

universal_startfile-0.1.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file universal-startfile-0.1.2.tar.gz.

File metadata

  • Download URL: universal-startfile-0.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.9.9 Darwin/21.6.0

File hashes

Hashes for universal-startfile-0.1.2.tar.gz
Algorithm Hash digest
SHA256 902abae6b8198600b3bdcb222a3bd3d7171be454678f5737d6b85a4b687b7973
MD5 93cb3c100bed0f8bcb4fbc2914d6b637
BLAKE2b-256 ffc914f5dad7a4750013d934973a564e946bbfb6c80b7b0ec0b50f67f80da873

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for universal_startfile-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0272a6275cafc3da8613ffa945ebc333c40f2e6fc8f0a36210e48dec2df57cc8
MD5 ecbb8f4260201a5c79763d409e59b473
BLAKE2b-256 8619d4609234d5cda7d985d69337e1cadc3c81804e691ec0652b78bb5af5e4af

See more details on using hashes here.

Supported by

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