Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Loop not working
#9
Also try not to use os.system() anymore.
subprocess replace it.
import subprocess

subprocess.run("taskkill /im chrome.exe /f")

# Or the safer way if think of shell injection vulnerabilities
#subprocess.run(['taskkill', '/im', 'chrome.exe', '/f'], shell=False)
Reply


Messages In This Thread
Loop not working - by Nonameface - Jul-18-2020, 06:01 AM
RE: Loop not working - by buran - Jul-18-2020, 07:03 AM
RE: Loop not working - by Nonameface - Jul-18-2020, 07:07 AM
RE: Loop not working - by ndc85430 - Jul-18-2020, 07:12 AM
RE: Loop not working - by Nonameface - Jul-18-2020, 07:15 AM
RE: Loop not working - by deanhystad - Jul-18-2020, 02:04 PM
RE: Loop not working - by Nonameface - Jul-19-2020, 05:08 AM
RE: Loop not working - by deanhystad - Jul-19-2020, 05:30 AM
RE: Loop not working - by snippsat - Jul-19-2020, 12:27 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  while loop not working-I am using sublime text editor mma_python 4 1,149 Feb-05-2023, 06:26 PM
Last Post: deanhystad
  WHILE Loop - constant variables NOT working with user input boundaries C0D3R 4 1,499 Apr-05-2022, 06:18 AM
Last Post: C0D3R
  Why is the while loop not working? mcoliver88 5 3,133 Aug-18-2020, 03:27 PM
Last Post: deanhystad
  Infinite loop not working pmp2 2 1,662 Aug-18-2020, 12:27 PM
Last Post: deanhystad
  for loop script over telnet in Python 3.5 is not working abhijithd123 1 2,910 May-10-2020, 03:22 AM
Last Post: bowlofred
  How to keep a loop containing a web import working in python executable? coder1384 3 2,896 Feb-22-2020, 06:49 PM
Last Post: snippsat
  For loop not working pjgrah01 4 2,826 Nov-03-2019, 11:58 PM
Last Post: pjgrah01
  Appending to list not working and causing a infinite loop eiger23 8 4,010 Oct-10-2019, 03:41 PM
Last Post: eiger23
  Working on my FOR loop wilsonrivas 1 2,222 May-24-2019, 04:05 PM
Last Post: heiner55
  plotting inside the loop is not working jenya56 4 3,108 Apr-10-2019, 08:11 PM
Last Post: perfringo

Forum Jump:

User Panel Messages

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