{"id":16820517,"url":"https://github.com/op/pkg-python-setproctitle","last_synced_at":"2025-03-17T15:25:39.582Z","repository":{"id":6767036,"uuid":"8013761","full_name":"op/pkg-python-setproctitle","owner":"op","description":"Debian packaging for python setproctitle","archived":false,"fork":false,"pushed_at":"2013-02-04T18:52:00.000Z","size":156,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T01:42:55.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/op.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-04T18:50:36.000Z","updated_at":"2013-10-20T08:08:59.000Z","dependencies_parsed_at":"2022-08-26T05:51:30.064Z","dependency_job_id":null,"html_url":"https://github.com/op/pkg-python-setproctitle","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op%2Fpkg-python-setproctitle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op%2Fpkg-python-setproctitle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op%2Fpkg-python-setproctitle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/op%2Fpkg-python-setproctitle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/op","download_url":"https://codeload.github.com/op/pkg-python-setproctitle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244056624,"owners_count":20390765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T10:57:05.270Z","updated_at":"2025-03-17T15:25:39.557Z","avatar_url":"https://github.com/op.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"A ``setproctitle`` implementation for Python\n============================================\n\n:author: Daniele Varrazzo\n\nThe library allows a process to change its title (as displayed by system tools\nsuch as ``ps`` and ``top``).\n\nChanging the title is mostly useful in multi-process systems, for example\nwhen a master process is forked: changing the children's title allows to\nidentify the task each process is busy with.  The technique is used by\nPostgreSQL_ and the `OpenSSH Server`_ for example.\n\nThe procedure is hardly portable across different systems.  PostgreSQL provides\na good `multi-platform implementation`__:  this module is a Python wrapper\naround PostgreSQL code.\n\n- `Homepage \u003chttp://code.google.com/p/py-setproctitle/\u003e`__\n- `Download \u003chttp://pypi.python.org/pypi/setproctitle/\u003e`__\n- `Source repository \u003chttps://github.com/dvarrazzo/py-setproctitle\u003e`__\n- `Bug tracker \u003chttp://code.google.com/p/py-setproctitle/issues/list\u003e`__\n\n\n.. _PostgreSQL: http://www.postgresql.org\n.. _OpenSSH Server: http://www.openssh.com/\n.. __: http://doxygen.postgresql.org/ps__status_8c_source.html\n\n\nInstallation\n------------\n\nYou can use ``easy_install`` to install the module: to perform a system-wide\ninstallation use::\n\n    sudo easy_install setproctitle\n\nIf you are an unprivileged user or you want to limit installation to a local\nenvironment, you can use the command::\n\n    easy_install -d /target/path setproctitle\n\nNote that ``easy_install`` requires ``/target/path`` to be in your\n``PYTHONPATH``.\n\n\nPython 3 support\n~~~~~~~~~~~~~~~~\n\nAs of version 1.1 the module works with Python 3.  In order to install the\nmodule, you can use the `distribute`_ replacemente for ``easy_install``.\n\nIn order to build and test the module under Python 3, the ``Makefile``\ncontains some helper targets.\n\n.. _distribute: http://pypi.python.org/pypi/distribute\n\n\nUsage\n-----\n\nThe ``setproctitle`` module exports the following functions:\n\n``setproctitle(title)``\n    Set *title* as the title for the current process.\n\n``getproctitle()``\n    Return the current process title.\n\n\nEnvironment variables\n~~~~~~~~~~~~~~~~~~~~~\n\nA few environment variables can be used to customize the module behavior:\n\n``SPT_NOENV``\n    Avoid clobbering ``/proc/PID/environ``.\n\n    On many platforms, setting the process title will clobber the\n    ``environ`` memory area. ``os.environ`` will work as expected from within\n    the Python process, but the content of the file ``/proc/PID/environ`` will\n    be overwritten.  If you require this file not to be broken you can set the\n    ``SPT_NOENV`` environment variable to any non-empty value: in this case\n    the maximum length for the title will be limited to the length of the\n    command line.\n\n``SPT_DEBUG``\n    Print debug information on ``stderr``.\n\n    If the module doesn't work as expected you can set this variable to a\n    non-empty value to generate information useful for debugging.  Note that\n    the most useful information is printed when the module is imported, not\n    when the functions are called.\n\n\nModule status\n-------------\n\nThe module can be currently compiled and effectively used on the following\nplatforms:\n\n- GNU/Linux\n- BSD\n- MacOS X\n- Windows\n\nNote that on Windows there is no way to change the process string:\nwhat the module does is to create a *Named Object* whose value can be read\nusing a tool such as `Process Explorer`_ (contribution of a more useful tool\nto be used together with ``setproctitle`` would be well accepted).\n\nThe module can probably work on HP-UX, but I haven't found any to test with.\nIt is unlikely that it can work on Solaris instead.\n\n.. _Process Explorer: http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx\n\n\nOther known implementations and discussions\n-------------------------------------------\n\n- `procname`_: a module exposing the same functionality, but less portable \n  and not well packaged.\n- `Issue 5672`_: where the introduction of such functionality into the stdlib\n  is being discussed.\n\n.. _procname: http://code.google.com/p/procname/\n.. _Issue 5672: http://bugs.python.org/issue5672\n\n\n..\n    vim: set filetype=rst:\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fop%2Fpkg-python-setproctitle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fop%2Fpkg-python-setproctitle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fop%2Fpkg-python-setproctitle/lists"}