jacebrowning / universal-startfile

A cross-platform version of 'os.startfile' from the Python standard library.

Home Page:https://universal-startfile.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

Unix Build Status Windows Build Status Coverage Status PyPI License PyPI Version PyPI Downloads

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")

About

A cross-platform version of 'os.startfile' from the Python standard library.

https://universal-startfile.readthedocs.io

License:MIT License


Languages

Language:Python 87.6%Language:Makefile 12.4%