Python Forum
Launch pdf and close on delete window event
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Launch pdf and close on delete window event
#2
How are you getting the subprocess' pids? Note that psutil can only kill a process that is a child of the program. See if the code below prints anything useful and if so try killing the uid's as they are psuitl processes and not subprocesses processes (glad I don't have to try and say that). I use multiprocessing in these types of situations so can post an example using multiprocessing if you can't get subprocess to work.

for each_pid in pids:
    p = psutil.Process(each_pid)
    p_name  = p.name()
    uid = p.uids().real
    print(p.name, p, uid) 
Reply


Messages In This Thread
RE: Launch pdf and close on delete window event - by woooee - Mar-21-2018, 05:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Interaction between Matplotlib window, Python prompt and TKinter window NorbertMoussy 3 660 Mar-17-2024, 09:37 AM
Last Post: deanhystad
  [PyQt] command require close window Krissstian 14 3,170 Nov-19-2022, 04:18 PM
Last Post: Krissstian
  [Tkinter] Mouse click event not working on multiple tkinter window evrydaywannabe 2 3,816 Dec-16-2019, 04:47 AM
Last Post: woooee
  tkinter window and turtle window error 1885 3 6,808 Nov-02-2019, 12:18 PM
Last Post: 1885
  update a variable in parent window after closing its toplevel window gray 5 9,200 Mar-20-2017, 10:35 PM
Last Post: Larz60+
  pygtk2, how to disconnect all callback of widget or window event ? harun2525 1 3,357 Feb-19-2017, 11:44 PM
Last Post: Larz60+
  [Tkinter] I have a Toplevel button in tkinker that I want to close the window and then perform Bloodypizza17 2 7,855 Jan-06-2017, 07:18 PM
Last Post: Bloodypizza17
  launch .PY program Help iw2fo 22 20,339 Oct-18-2016, 09:13 PM
Last Post: Barrowman

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020