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.
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
Built Distribution
Close
Hashes for universal_startfile-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc1de2c595f7897609fe319bd5da764043e637db8e32d572ec94fa3589f49df0 |
|
MD5 | 7d0d512219d4b2cdf1ecce17733afe5c |
|
BLAKE2b-256 | 60ba430be46d457322938297ba31b2e215e1d0aef8e9aa16dcd9da3df70bb8ab |