Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to open an external file in python

import subprocess    

path_to_notepad = 'C:WindowsSystem32
otepad.exe'
path_to_file = 'C:UsersDesktophello.txt'

subprocess.call([path_to_notepad, path_to_file])
Comment

PREVIOUS NEXT
Code Example
Python :: python add zero to string 
Python :: python pyodbc install 
Python :: how to install python3 on ubuntu 
Python :: write multiple df to excel pandas 
Python :: desktop background change with python 
Python :: python os if file exists 
Python :: run celery on windows 
Python :: print current time hours and minutes in python 
Python :: seaborn rotate xlabels 
Python :: open chrome in pyhton 
Python :: thousands separator python 
Python :: pytest skip 
Python :: how to disable help command discord.py 
Python :: matplotlib add space between subplots 
Python :: django created at field 
Python :: distance euc of two arrays python 
Python :: python print float in scientific notation 
Python :: check python version ubuntu 
Python :: tkinter image 
Python :: chromebook install pip 
Python :: ImportError: cannot import name ‘json’ from itsdangerous 
Python :: pandas drop zero values 
Python :: numpy from csv 
Python :: how to scroll by in selenium python 
Python :: python copy a 2D list 
Python :: Pytube mp3 
Python :: how to make it so the pygame window will close 
Python :: r2 score sklearn 
Python :: os.execl(sys.executable, sys.executable, *sys.argv) 
Python :: django integer field example 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =