Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!solaris.cc.vt.edu!news.vt.edu!newsfeed-00.mathworks.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Is it technically possible to give Python option of naming process of running script? Date: Thu, 15 Mar 2012 18:39:11 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 29 Message-ID: References: <19118128.4791.1331736187952.JavaMail.geo-discussion-forums@vbai14> <22071354.8904.1331796412001.JavaMail.geo-discussion-forums@vbkc1> NNTP-Posting-Host: dsl.comtrol.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reader1.panix.com 1331836751 29981 64.122.56.22 (15 Mar 2012 18:39:11 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Thu, 15 Mar 2012 18:39:11 +0000 (UTC) User-Agent: slrn/pre0.9.9-102 (Linux) Xref: csiph.com comp.lang.python:21703 On 2012-03-15, Dave Angel wrote: > On 03/15/2012 03:26 AM, xliiv wrote: >>>>> Like the topic.. . >>>>> I use Python a lot, both Windows and Linux, and it's little weird to have many python process without fast distinction which is what. >>> >> >> I did google, I've played with Exemaker (it works perfect, but not py3) and i've seen questions on Stackoverflow. >> The thing I mean is a build feature of python to give such a name. Not 3rd part or etc. like Grant Edwards said. Is it possible? > > How about simply using cp to copy the python executable, run chmod +x on > it, and run that one? Then ps would list it as the new name, not as python. That's rather a waste of memory. Better to use a link. That way the executable can still be shared by multiple programs and won't be duplicated in memory. > i tried it on /usr/bin/python2.7 but I see no reason the same > approach won't work on 3.x Note, I copied it to a new name in the same > directory, which may be important. or not. Seems like an awfully obtuse way of doing things -- I don't really want to have 15 different copies of Python (or even links), and it requires root privleges every time you want to run a Python program with the "correct" name. -- Grant Edwards grant.b.edwards Yow! Can I have an IMPULSE at ITEM instead? gmail.com