May-02-2017, 11:39 PM
(May-02-2017, 07:47 PM)snippsat Wrote:bigmit37 Wrote:What is taskkill, /f and /im?Taskkill ends one or more tasks or processes,subprocess call this.
bigmit37 Wrote:but still not quite sure what your args mean.args
is what to call in this caseTaskkill
.
bigmit37 Wrote:I'm assuming my arguments for the last line are incorrect?It's not path but process name
Open Task Manager and find the process.
It should probably be:
subprocess.run(['taskkill', '/f', '/im', "i_view64.exe"])You can not removeos.scandir('.')
,
and use a ordinary loop.
We are working with files on OS now.
Got it working with this code
'import webbrowser import subprocess import os, time for i in Final_Bioteck[6:11]: webbrowser.open( '{}.png'.format(i)) time.sleep(3) subprocess.run(['taskkill', '/f', '/im', "i_view64.exe"])Yeah, my i_view is 64 bit, that's what was causing the malfunction of the code.
My original loop seems to work fine though.
I'm still not quite sure what ''/f" and '/im' stand for though.

Thank you so much.