Answers for "python open new terminal"

0

python open script in new terminal

import subprocess
subprocess.call('python full_pathfile_name.py', creationflags=subprocess.CREATE_NEW_CONSOLE)
Posted by: Guest on May-25-2021
3

how to open file explorer in python

import os
import subprocess
FILEBROWSER_PATH = os.path.join(os.getenv('WINDIR'), 'explorer.exe')

def explore(path):
    # explorer would choke on forward slashes
    path = os.path.normpath(path)

    if os.path.isdir(path):
        subprocess.run([FILEBROWSER_PATH, path])
    elif os.path.isfile(path):
        subprocess.run([FILEBROWSER_PATH, '/select,', os.path.normpath(path)])
Posted by: Guest on May-26-2020
0

launch bash script from application mac without opening terminal

#!/bin/bash
Posted by: Guest on February-22-2020
0

open terminal in python

# Open terminal 
# Type python with version
# Example
# 1. ~$ python
# 2. ~$ python3
Posted by: Guest on August-20-2021

Python Answers by Framework

Browse Popular Code Answers by Language