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

Uploaded Source

Built Distribution

universal_startfile-0.2-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: universal-startfile-0.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.0 Darwin/20.6.0

File hashes

Hashes for universal-startfile-0.2.tar.gz
Algorithm Hash digest
SHA256 1e970e782de10e726ebde2ae8887469d93a75eb67f81b82633979c11739a212a
MD5 daabfd30d9de279299867cd2e9721971
BLAKE2b-256 f270e9217c4259a239307eb6cad53475e593b06c6af6c02f731225ae09764fbc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for universal_startfile-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dc1de2c595f7897609fe319bd5da764043e637db8e32d572ec94fa3589f49df0
MD5 7d0d512219d4b2cdf1ecce17733afe5c
BLAKE2b-256 60ba430be46d457322938297ba31b2e215e1d0aef8e9aa16dcd9da3df70bb8ab

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