Is the provided process name is currently running?
(process)
| 40 | |
| 41 | |
| 42 | def is_running(process): |
| 43 | """ |
| 44 | Is the provided process name is currently running? |
| 45 | """ |
| 46 | proc_list = subprocess.Popen(["ps", "axw"], stdout=subprocess.PIPE) |
| 47 | for proc in proc_list.stdout: |
| 48 | if re.search(process, str(proc)): |
| 49 | return True |
| 50 | |
| 51 | return False |
| 52 | |
| 53 | |
| 54 | def download_file(logger, url): |