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.1.tar.gz (3.8 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.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for universal-startfile-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e8dd28a9409d1dac429afecc25d1dfca6d38ae0dd28490cdafae57a091e9e382
MD5 64c49c4279936baf5a4c4aee5bf5e8ea
BLAKE2b-256 24843bbf968c7e7e408cfcb91bd9c3f70b45451da18e5559007190f9b3f1520b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for universal_startfile-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d8bb06129298927fc1b281030cb93c577bc66514ccdaf5a7e228276f5ec4ddd4
MD5 f2cd38f3dee68bc78817edb45cfe140e
BLAKE2b-256 ddeb39264741e2e3f027eda21fe0754636d47dc82f72c5324c2d15cc915452cb

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