Skip to main content

ProcessNamer

This library provides an object that is able to

  • Name a process

  • Stop a process from it's name

  • Give information about the current process

If you notice any errors, please notify me via: eliservices.server@gmail.com

Installation

pip install processnamer

Example use:

import sys
from time import sleep

#Import the lib:
from processnamer import processGame
#Create object:
prg = processGame()

#Display information (stdout or print will cause brokenpipe error):
sys.stderr.write("I am " + prg.prcname + ", and i have pid " + str(prg.pid) + "\n")

#Gather information:                  #Gets the name, but it can do this foe any pid
info = prg.getName(prg.pid)           #Get info for pid of this process
#Display information:
sys.stderr.write("I am " + info + ", and i have pid " + str(prg.pid) + "\n")


if prg.prcname == "python":           #If this is the original process

    #Restart this as process imcool:
    prg.nameStart("imcool",prg.script)
    sleep(2)
    prg.nameStop("imcool")            #Stop the second process

else:
    sleep(10)                         #Second process waits so that it can be stopped

Release files for processnamer 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for processnamer 1.0.2
File Size Uploaded
processnamer-1.0.2.tar.gz 3.6 kB Details

Release files / processnamer-1.0.2.tar.gz

Download URL processnamer-1.0.2.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
78c03ca4dbb9b2fd9d93caad79ba7f13599c8eb757b2a735c49e29063e9b2b9d
BLAKE2b-256 checksum
How to use checksums
4241be487a844fd0d3bd12e02473f797b7ef5fa3761a217936f49e2cff93fd60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.7

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.1

1 release file

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page