Hi!
Self-destruction of a script:
import os
os.popen('TASKKILL /PID '+str(os.getpid())+' /F')
(only in windows XP or 2K)
@-salutations
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Ernesto wrote
> program.exe ? I was looking at the Windows task manager after I used a
> Cntrl + C to manually terminate the running python program. The
> program.exe is apparently ending when I end the python program.
I have to admit that I have no idea what you're doing, really. The code
you
program.exe ? I was looking at the Windows task manager after I used a
Cntrl + C to manually terminate the running python program. The
program.exe is apparently ending when I end the python program.
--
http://mail.python.org/mailman/listinfo/python-list
A... I figured out a way around this. I'll use program.exe to shut
down itself. That way I won't have to use any extension modules.
Thanks!
--
http://mail.python.org/mailman/listinfo/python-list
Ernesto wrote:
> Yeah I know. I posted it b/c I was having the same problems and I'm
> investigating ways to do this. None of those methods gave me desired
> results for my program. All I want to do is end my python program and
> return to the DOS prompt.
what about the other program? do you
Yeah I know. I posted it b/c I was having the same problems and I'm
investigating ways to do this. None of those methods gave me desired
results for my program. All I want to do is end my python program and
return to the DOS prompt.
--
http://mail.python.org/mailman/listinfo/python-list
Ernesto wrote
> I've been searching for ways to terminate this process so I can exit my
> program. program.exe is a text based interface which I'm running with
> python subprocess in a DOS command window. I tried using 'sys.exit()'
> to end my program, but nothing works. I think I have to someh
def launchWithoutConsole(command, args):
"""Launches 'command' windowless and waits until finished"""
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
return subprocess.Popen([command] + args,
startupinfo=startupinfo).wait()
handle = la