On Sat, Apr 3, 2010 at 12:17 AM, <[email protected]> wrote: > > On Fri, Apr 2, 2010 at 11:45 PM, Chris Colbert <[email protected]> wrote: > > > > > > On Fri, Apr 2, 2010 at 3:03 PM, Erik Tollerud <[email protected]> > > wrote: > > you could try something like this (untested): > > if __name__ == '__main__': > > try: > > import numpy > > except ImportError: > > import subprocess > > subprocess.check_call(['easy_install', 'numpy']) # will except if > > call fails > > Personally, I don't like it at all if packages automatically > easy_install big dependencies like numpy especially if it is connected > to a version requirement. > > Is it possible to kill an installation subprocess with CRTL-C ?
Hmm, that's a good question. Just thinking about it, I don't think it would. From the docs: Popen.kill() Kills the child. On Posix OSs the function sends SIGKILL to the child. On Windows kill() is an alias for terminate(). But, I listed the check_call() function, which waits for the subprocess to end. You never actually get the handle to the subprocess object to issue the kill() command. So, I'm not sure how you could make it work. > > Josef > > > > > > > > > _______________________________________________ > > NumPy-Discussion mailing list > > [email protected] > > http://mail.scipy.org/mailman/listinfo/numpy-discussion > > > > > _______________________________________________ > NumPy-Discussion mailing list > [email protected] > http://mail.scipy.org/mailman/listinfo/numpy-discussion _______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
