Python task label

Sam Marrocco samSPAMMENOT at twmi.rr.com
Mon Feb 3 21:37:16 EST 2003


jerf at compy.attbi.com wrote:
> On Sat, 01 Feb 2003 22:58:59 +0000, Sam Marrocco wrote:
> 
> 
>>When I run my Python app, which has a TK gui, the XP OS displays the app 
>>as "python.exe" in the task manager, along with a second "python.exe" 
>>which I assume is the interpreter itself.
>>
>>Is it possible for me to decide the name that the OS will give to my app 
>>within my code, as opposed to the default name of "python.exe"? Can I 
>>also "hide" the python interpreter from the task manager?
> 
> 
> I don't know how to change the "Processes" display, and I don't think it
> can be done, since I've never seen a program do it, even programs that
> would very much like to do it (read: virii). 
> 
> However,
> 
> from Tkinter import *
> r = Tk()
> r.title("Hello!")
> 
> *will* change the title in the Applications tab for the Tk window.
> 
> Also, I hope you *can't* hide the python interpreter from the task
> manager... that would be a security flaw (albiet a minor one) in windows.
> 
> AFAIK, ".title()" will have to do, no matter what language you write it
> in. (Again, I may be wrong but I would consider it a security flaw if I
> am.)
> 


Jeff--the app I'm writing is actually a port of a vb app I wrote. The 
app needs to know how many other 'instances' of itself are already 
running on the machine (there can be several) and the app's name is 
numbered. With the vb app, as it was initializing, I would check the 
task list for any applications named 'MyApp#' and then pick the next 
unused number and make the new app start as "MyApp#+1".

I'm uncertain how I might go about determining which apps are running if 
they're all named 'python.exe'. I don't like the idea of having "lock 
files" on disk identifying tasks. hmmmmmmm......
-- 
==================================================================
Sam J. Marrocco
Sr. Visual Effects Artist/R&D
Travelling Pictures/GTN
Inferno, Flame, Houdini, Maya, All that cool stuff!
"The fact that no one understands you doesn't make you an artist."
==================================================================





More information about the Python-list mailing list