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
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8dd28a9409d1dac429afecc25d1dfca6d38ae0dd28490cdafae57a091e9e382 |
|
MD5 | 64c49c4279936baf5a4c4aee5bf5e8ea |
|
BLAKE2b-256 | 24843bbf968c7e7e408cfcb91bd9c3f70b45451da18e5559007190f9b3f1520b |
File details
Details for the file universal_startfile-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: universal_startfile-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.9 Darwin/21.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8bb06129298927fc1b281030cb93c577bc66514ccdaf5a7e228276f5ec4ddd4 |
|
MD5 | f2cd38f3dee68bc78817edb45cfe140e |
|
BLAKE2b-256 | ddeb39264741e2e3f027eda21fe0754636d47dc82f72c5324c2d15cc915452cb |