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.9+
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")
Metadata
Release files for universal-startfile 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| universal_startfile-0.4.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| universal_startfile-0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / universal_startfile-0.4.tar.gz
| Download URL | universal_startfile-0.4.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
927546329a05e497306fd71af59e93371a8ec535c44cbbd30ce42cf10f41f422
|
|
BLAKE2b-256 checksum How to use checksums |
347a5a79196105931ca9fef9c8c3d45de0ec33e6de6240ba17ef9b025eb4e8ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.7 Darwin/24.6.0
|
Release files / universal_startfile-0.4-py3-none-any.whl
| Download URL | universal_startfile-0.4-py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5de70f9773bc392fe7c93013d0c05b2cc1beec60b9220e909cf8e9411b15d262
|
|
BLAKE2b-256 checksum How to use checksums |
263c17a8c3422aebcaa914e486983376dc6a518e205b672328568dc37b2e84b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.13.7 Darwin/24.6.0
|