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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a9d4e88a8facce00532d80a29ea652c87a68055a5e89968f4630c2479d0b383 |
|
MD5 | 8bf9e77dced8912790b1b7dd97f4a3ed |
|
BLAKE2b-256 | 0f56c1f24fcd235280114f058c32da3b36cd76fd8c919df9c5a10470c948b82d |
Close
Hashes for universal_startfile-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2caf08dc181eb2550d070f484b7e1e4d6e53743a9e870b9afd0b9231367bb471 |
|
MD5 | 9ca644cb5d148f24395e7cc7491eb37f |
|
BLAKE2b-256 | 7884cdd070c787d9406b17199f9f518e47b39e90d0522553d8653f8785f1e663 |