[issue5672] Implement a way to change the python process name

2018-12-28 Thread Dan Stromberg
Dan Stromberg added the comment: Isn't this "python script doesn't show up in top correctly" issue a matter of "#!/usr/bin/env python3"? If you "#!/usr/bin/python3" (for example) instead, top seems happy. -- nosy: +strombrg ___ Python tracker

[issue5672] Implement a way to change the python process name

2017-04-03 Thread Patrick van der Leer
Changes by Patrick van der Leer : -- nosy: +Patrick van der Leer ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5672] Implement a way to change the python process name

2010-12-29 Thread Floris Bruynooghe
Floris Bruynooghe added the comment: There are actually a few implementations on pypi, just search for prctl. At least one of them is pretty decent IIRC but I can't remember which one I looked at in detail before. Anyway, they would certainly be a reasonable starting point for python inclusion

[issue5672] Implement a way to change the python process name

2010-12-28 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Just for the record, I was about to try to do this, when I realized that > exposing prctl requires expecting a variable number of arguments with > variable types. > It turns out providing a Python wrapper for such a kind of C API is just a > pain. > There'

[issue5672] Implement a way to change the python process name

2010-12-28 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: > If somebody would provide a patch that adds prctl to the posix module, > that would be fine with me - we have a long tradition of exposing all > available system calls if somebody wants them. Just for the record, I was about to try to do this, when I reali

[issue5672] Implement a way to change the python process name

2010-12-28 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue5672] Implement a way to change the python process name

2010-10-05 Thread Martin v . Löwis
Martin v. Löwis added the comment: I'd rather not reopen this issue. It was too far-ranging, and has failed to get a specific solution. Please stop posting to this closed issue; if you want to contribute, please open a new one. I think the inclusion of the module should see a discussion on py

[issue5672] Implement a way to change the python process name

2010-09-29 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue5672] Implement a way to change the python process name

2010-09-29 Thread Ludvig Ericson
Ludvig Ericson added the comment: I use the setproctitle module extensively. It has worked flawlessly. What would be needed for this to get accepted? I realize one shouldn't stress such a decision, but still I feel this is something the standard library should be able to do. My justification

[issue5672] Implement a way to change the python process name

2010-07-04 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: Hello everybody, I've finished porting the module to Python 3, so I think it's a good starting point for considering its inclusion into the stdlib. The source is already out; tomorrow I'll test for regressions on mac osx and release the package. I'm not go

[issue5672] Implement a way to change the python process name

2010-06-24 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: > No. It will also be required that it's authors agree to contribute it to > Python, agree to stop maintaining the out-of-Python version > (eventually), and agree to fill out a contributor form. I would have no problem with these points if the module is consi

[issue5672] Implement a way to change the python process name

2010-06-24 Thread Martin v . Löwis
Martin v. Löwis added the comment: > Ats some point in the future when the "setproctitle" project > (http://code.google.com/p/py-setproctitle/source/list) has matured it > will be reconsidered, correct? No. It will also be required that it's authors agree to contribute it to Python, agree to st

[issue5672] Implement a way to change the python process name

2010-06-24 Thread Marcelo Fernández
Marcelo Fernández added the comment: > So, while I'd be pleased to have it included in the stdlib, I'm not > really convinced it would be useful to such a large audience. I think different, if python becomes even more successful to be used in desktop apps, this feature will be *very* important

[issue5672] Implement a way to change the python process name

2010-06-24 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: setproctitle is quite stable, my company uses it in production environment very heavily with python 2.x. Probably its users base is not huge, but that's because it's a relatively specialized tool. Python3 porting is not straightforward because python2 expor

[issue5672] Implement a way to change the python process name

2010-06-24 Thread Brian Curtin
Brian Curtin added the comment: If it has matured, has shown to be as a "best of breed" library of it's type, and has gone through the PEP process, it could make it. That takes quite a bit of time and isn't likely to occur within the next few years (3.3 at the earliest assuming the project ma

[issue5672] Implement a way to change the python process name

2010-06-24 Thread Martin Marcher
Martin Marcher added the comment: Hi, just scanned the messages. As I read it "wontfix" actually means: Ats some point in the future when the "setproctitle" project (http://code.google.com/p/py-setproctitle/source/list) has matured it will be reconsidered, correct? Yes sorry for reopening t

[issue5672] Implement a way to change the python process name

2010-06-23 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/pyt

[issue5672] Implement a way to change the python process name

2009-12-07 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue5672] Implement a way to change the python process name

2009-12-07 Thread Marcelo Fernández
Marcelo Fernández added the comment: 2009/12/7 Daniele Varrazzo : > > Daniele Varrazzo added the comment: > >>> I've just tested it and it works fine here... Any possibility this >>> module can be included in the regular python standard library, in the >>> future? > >>Only in the far future. I

[issue5672] Implement a way to change the python process name

2009-12-07 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: >> I've just tested it and it works fine here... Any possibility this >> module can be included in the regular python standard library, in the >> future? >Only in the far future. I don't think the Python standard library > should include a module whose versi

[issue5672] Implement a way to change the python process name

2009-12-06 Thread Martin v . Löwis
Martin v. Löwis added the comment: > I've just tested it and it works fine here... Any possibility this > module can be included in the regular python standard library, in the > future? Only in the far future. I don't think the Python standard library should include a module whose version numbe

[issue5672] Implement a way to change the python process name

2009-12-06 Thread Marcelo Fernández
Marcelo Fernández added the comment: 2009/12/6 Daniele Varrazzo : > > Just released setproctitle 0.2 where I also call prctl() if available. > It is actually the string used by killall. Great! I've just tested it and it works fine here... Any possibility this module can be included in the regu

[issue5672] Implement a way to change the python process name

2009-12-06 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: > It seems that some utilities and programs (killall, > gnome-system-monitor, and so on) looks for the process name in > /proc/PID/status, not in /proc/PID/cmdline, so it should be better > (in Linux), to modify both, /proc/PID/cmdline (changing argv) *and* >

[issue5672] Implement a way to change the python process name

2009-12-06 Thread Marcelo Fernández
Marcelo Fernández added the comment: 2009/12/6 Daniele Varrazzo : >> My question is because I think there's a better and supported method > for >> Linux, that is, using prctl [1]. I read somewhere that changing argv >> causes some inconsistencies between programs who read /sys files, > /proc >>

[issue5672] Implement a way to change the python process name

2009-12-06 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: > I'm taking a look at it, and it seems to use setproctitle() in BSD, and > writes over the argv array "in most Sys-V like systems"; this includes > Linux? Yes: Linux uses what in the source is referred as the PS_USE_CLOBBER_ARGV strategy: it writes over

[issue5672] Implement a way to change the python process name

2009-12-06 Thread Marcelo Fernández
Marcelo Fernández added the comment: Great, piro! I'm taking a look at it, and it seems to use setproctitle() in BSD, and writes over the argv array "in most Sys-V like systems"; this includes Linux? My question is because I think there's a better and supported method for Linux, that is, us

[issue5672] Implement a way to change the python process name

2009-12-05 Thread Daniele Varrazzo
Daniele Varrazzo added the comment: I wrote a wrapper around the PostgreSQL implementation of setproctitle (probably the most portable around). I've only tested it on Linux: probably will require tweaking constants to compile on other platforms (something postgres does at configure time) but

[issue5672] Implement a way to change the python process name

2009-11-14 Thread Domen
Changes by Domen : -- nosy: +iElectric ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/ma

[issue5672] Implement a way to change the python process name

2009-10-09 Thread Martin Marcher
Changes by Martin Marcher : -- nosy: +martin.marcher ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue5672] Implement a way to change the python process name

2009-09-16 Thread Jean-Paul Calderone
Jean-Paul Calderone added the comment: > prctl is not portable. I always thought that the premise of stdlib is to > provide portable interfaces. BSD, for example, uses setprocname instead > of prctl. Also, prctl does not modify the process name shown in "ps > uxww". Here's how PostgreSQL does

[issue5672] Implement a way to change the python process name

2009-09-16 Thread Ask Solem
Ask Solem added the comment: Amaury Forgeot d'Arc, wrote: And I'd follow the same path: provide a way to build a launcher - a .exe file that simply starts python with the given script. Sounds good, but how would you expect to set the process name for a subprocess, like a multiprocessing.Pr

[issue5672] Implement a way to change the python process name

2009-07-14 Thread Floris Bruynooghe
Changes by Floris Bruynooghe : -- nosy: +flub ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue5672] Implement a way to change the python process name

2009-07-03 Thread Elvis Pranskevichus
Elvis Pranskevichus added the comment: > Please don't provide a wrapper around ptrctrl prctl is not portable. I always thought that the premise of stdlib is to provide portable interfaces. BSD, for example, uses setprocname instead of prctl. Also, prctl does not modify the process name shown

[issue5672] Implement a way to change the python process name

2009-04-06 Thread Martin v. Löwis
Martin v. Löwis added the comment: Please don't provide a wrapper around ptrctrl. Instead, expose prctl as is (similar to how ioctl and fcntl get wrapped). It's ok to make some convenience adjustments (e.g. allowing fewer parameters than the actual call), and it's also ok to filter by option (fo

[issue5672] Implement a way to change the python process name

2009-04-06 Thread Marcelo Fernández
Marcelo Fernández added the comment: Great, it's my first patch to python and I'm very happy with your comments. :-) Thanks Amaury, do you think is better that I should take out getprocname() if setprocname() changes sys.argv too? When I got some spare time, I'll take a look at your suggestion

[issue5672] Implement a way to change the python process name

2009-04-06 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Some remarks about the patch: 1 - this line causes a buffer overrun: strncpy(argv[0], name , strlen(name)); A possible solution is to do like posix_putenv(): have a static PyString that holds the memory, and just change the pointer argv[0]: argv[0]

[issue5672] Implement a way to change the python process name

2009-04-06 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: As for os.getprocname() I think you can borrow some code from psutil project [1] to implement it on FreeBSD, OS X and even Windows platforms. [1] http://code.google.com/p/psutil -- ___ Python tracker

[issue5672] Implement a way to change the python process name

2009-04-06 Thread Marcelo Fernández
Marcelo Fernández added the comment: This patch (to python 2.7 trunk) allows to call prctl() function from Linux kernel to change the process name. It adds two methods to the os module: os.getprocname() and os.setprocname(). Working example: marc...@marcelo-laptop:~/src/pytrunk$ ./python Pytho

[issue5672] Implement a way to change the python process name

2009-04-04 Thread Marcelo Fernández
Marcelo Fernández added the comment: Fine, I'll try to make a patch based on the procname project in Google Code. Here are some more links with more approaches to solve this issue (while I learn how to make a patch :-) ) http://abock.org/2006/02/09/changing-process-name-in-mono/ http://shiny.th

[issue5672] Implement a way to change the python process name

2009-04-04 Thread Martin v. Löwis
Martin v. Löwis added the comment: If somebody would provide a patch that adds prctl to the posix module, that would be fine with me - we have a long tradition of exposing all available system calls if somebody wants them. As for Windows: no, there is no equivalent of prctl. The task manager of

[issue5672] Implement a way to change the python process name

2009-04-02 Thread Marcelo Fernández
Marcelo Fernández added the comment: Uhm... ok, (looking at issue 4015) I agree with that method at some point (tough is not exactly the same thing)... but only if the launcher will not be for Windows only, and that solution would be consistent across al platforms... Just to know, there is no p

[issue5672] Implement a way to change the python process name

2009-04-02 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: There was a similar request in Java bug database: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6299778 And I'd follow the same path: provide a way to build a launcher - a .exe file that simply starts python with the given script. I suggest to clos

[issue5672] Implement a way to change the python process name

2009-04-02 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:/

[issue5672] Implement a way to change the python process name

2009-04-02 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- priority: -> low ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue5672] Implement a way to change the python process name

2009-04-02 Thread Marcelo Fernández
New submission from Marcelo Fernández : As python gains more popularity, more and more applications run under CPython in a common user desktop. The problem is that if a user has 2 or more python apps running there is no way to identify them correctly from the generic "Task/Process Manager Applica