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.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 902abae6b8198600b3bdcb222a3bd3d7171be454678f5737d6b85a4b687b7973 |
|
MD5 | 93cb3c100bed0f8bcb4fbc2914d6b637 |
|
BLAKE2b-256 | ffc914f5dad7a4750013d934973a564e946bbfb6c80b7b0ec0b50f67f80da873 |
Close
Hashes for universal_startfile-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0272a6275cafc3da8613ffa945ebc333c40f2e6fc8f0a36210e48dec2df57cc8 |
|
MD5 | ecbb8f4260201a5c79763d409e59b473 |
|
BLAKE2b-256 | 8619d4609234d5cda7d985d69337e1cadc3c81804e691ec0652b78bb5af5e4af |