Advertisement
Guest User

Untitled

a guest
Dec 29th, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. from tkinter import Tk, Frame, BOTH, YES
  2. import os, sys
  3. from multiprocessing import Process
  4.  
  5. def GUI():
  6.     sys.stdout = open(str(os.getpid()) + ".out", "w")
  7.     root = Tk()
  8.     root.resizable(False, False)
  9.     termf = Frame(root, height=400, width=600)
  10.     termf.pack(fill=BOTH, expand=YES)
  11.     wid = termf.winfo_id()
  12.     os.system('xterm -into %d -geometry 96x30 -sb -hold -e "tail -f loading.py" &' % wid)
  13.     root.mainloop()
  14.  
  15. process = Process(target=GUI)
  16. process.start()
  17.  
  18. input("Enter command:")
  19. --------------
  20. zenix@linux-xk05:~/Desktop> python a.py
  21. Enter command:Traceback (most recent call last):
  22.   File "a.py", line 18, in <module>
  23.     input("Enter command:")
  24. EOFError
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement