Thanks for the useful info Noufal.
-----Original Message----- From: bangpypers-bounces+nikunj.badjatya=emc....@python.org [mailto:bangpypers-bounces+nikunj.badjatya=emc....@python.org] On Behalf Of Noufal Ibrahim Sent: Monday, November 21, 2011 4:32 PM To: Bangalore Python Users Group - India Cc: phil.nab...@hanjinet.org Subject: Re: [BangPypers] "continue" in "try..except" <nikunj.badja...@emc.com> writes: > Hey Philippe, Thanks exactly what I wanted. My main() is calling > other scripts written in powershell(.PS1) using subprocess.call(). > Will this mechanism work in that case also ? I mean will this resume > the execution from the same place where it left off as desired ? I didn't know this was on Windows and I'm don't know enough to answer. On UNIX, sending a signal using C-c will send it to all processes associated terminal (using kill will send it only to the requested PID). This means that if you're running a shell pipeline using subprocess.call, it will receive a SIGINT too and has to handle that differently. In essence, the pausing and resuming has to be done in that program since it is the thing that knows the state of installation. I'm not totally sure if this is the situation on Windows although modern ones are POSIX compliant. Generally speaking, cross process work with duct tape/glue programs are a source of trouble. I would recommend that you either port your PS program to Python to keep it in process or do the whole thing in Python. You *might* be able to send a STOP signal to the subprocess if your Python program receives an INT to make it halt but then freeing resources etc. after that will be a pain. [...] -- ~noufal http://nibrahim.net.in Some bachelors want a meaningful overnight relationship. _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers