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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: universal-startfile-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 3a9d4e88a8facce00532d80a29ea652c87a68055a5e89968f4630c2479d0b383
MD5 8bf9e77dced8912790b1b7dd97f4a3ed
BLAKE2b-256 0f56c1f24fcd235280114f058c32da3b36cd76fd8c919df9c5a10470c948b82d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for universal_startfile-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2caf08dc181eb2550d070f484b7e1e4d6e53743a9e870b9afd0b9231367bb471
MD5 9ca644cb5d148f24395e7cc7491eb37f
BLAKE2b-256 7884cdd070c787d9406b17199f9f518e47b39e90d0522553d8653f8785f1e663

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