Created
March 20, 2022 05:32
-
-
Save SimonTheCoder/74948b022f016840e0dd9ad9be0e2223 to your computer and use it in GitHub Desktop.
Start a new terminal window from python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# def xterm(): | |
# from tkinter import * | |
# import os | |
# root = Tk() | |
# termf = Frame(root, height=400, width=500) | |
# termf.pack(fill=BOTH, expand=YES) | |
# wid = termf.winfo_id() | |
# os.system('xterm -into %d -geometry 40x20 -sb &' % wid) | |
# root.mainloop() | |
import os | |
print(os.name) | |
if os.name == "nt": | |
ret = os.popen("start /wait cmd /c ipython3 ./angr_util.py -i -- hahahaha") | |
print(ret.read()) | |
else: | |
ret = os.popen("gnome-terminal -- ipython3 ./angr_util.py -i -- hahahaha") | |
print(ret.read()) | |
print("it's over.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment