Open the file with the default app

In a command line environment, you may want to open a file in the current directory with the platform's default app. I tried to find out how to do it on each platform.

Linux

$ xdg-open filename

Windows command prompt

>start file name

cygwin

$cygstart filename

Recommended Posts

Open the file with the default app
File operations with open — "../"
Extract the xz file with python
Follow the file hierarchy with fts
Download the file deployed with appcfg.py
Check the existence of the file with python
Let's read the RINEX file with Python ①
Try rewriting the file with the less command
Download the file with PHP [Under construction]
Adjust file permissions with the Linux command chmod
Save the object to a file with pickle
Convert the character code of the file with Python3
Open a file dialog with a python GUI (tkinter.filedialog)
I tried to touch the CSV file with Python
Create a Todo app with the Django REST framework
File upload with django
use something other than the default profile with boto3
[Python] Open the csv file in the folder specified by pandas
[Python] Read the csv file and display the figure with matplotlib
Access the file with a relative path from the execution script.
Read the VTK file and display the color map with jupyter.
I tried to divide the file into folders with Python
Try to decipher the garbled attachment file name with Python
Todo app with django-bootstrap-modal-forms plugin
Download the file in Python
Insert the debugger with nose
Kill the process with sudo kill -9
Draw netCDF file with python
Fast file transfer with fabric
Unzip the internet zip file
File access under the directory
Bidirectional file transfer with Pythonista 3
gethostbyaddr () communicates with the outside
scraping the Nikkei 225 with playwright-python
Check the code with flake8
Calibrate the model with PyCaret
Call the API with python3.
File upload with Flask + jQuery
Download csv file with python
Create xlsx file with XlsxWriter
Can you delete the file?
Process the contents of the file in order with a shell script
How to make a command to read the configuration file with pyramid
If you give a list with the default argument of the function ...
Format the CSV file of "National Holiday" of the Cabinet Office with pandas
When I run the exe file with pyinstaller, my PC crashes.
Read a file in Python with a relative path from the program
I tried to open the latest data of the Excel file managed by date in the folder with Python