On Sat, 20 Jan 2007 16:03:37 -0800, Yi Qiang <[EMAIL PROTECTED]> wrote:
>
> When running twisted programs in sage, the sigint handler seems to
> cause problems;
>
> [EMAIL PROTECTED]:~/Software/dsage/ > sage dsage_server.py
> 2007/01/20 17:01 -0700 [-] Log opened.
> ^C2007/01/20 17:01 -0700 [-] Unexpected error in main loop.
> 2007/01/20 17:01 -0700 [-] Unhandled Error
> Traceback (most recent call last):
> File "dsage_server.py", line 142, in <module>
> main()
> File "dsage_server.py", line 139, in main
> reactor.run()
> File "/Users/yi/Software/sage/local/lib/python2.5/site-
> packages/twisted/internet/posixbase.py", line 220, in run
> self.mainLoop()
> --- <exception caught here> ---
> File "/Users/yi/Software/sage/local/lib/python2.5/site-
> packages/twisted/internet/posixbase.py", line 231, in mainLoop
> self.doIteration(t)
> File "/Users/yi/Software/sage/local/lib/python2.5/site-
> packages/twisted/internet/selectreactor.py", line 97, in doSelect
> [], timeout)
> File "/Users/yi/Software/sage/local/lib/python2.5/site-
> packages/sage/interfaces/get_sigs.py", line 8, in my_sigint
> raise KeyboardInterrupt
> exceptions.KeyboardInterrupt:
>
> Both sage and twisted register sigint handlers, and sage wins
> apparently. Any ideas how I should go about fixing this?
Take a look at
local/bin/sage-notebook
The point is that for dsage_server you are probably not using
much of the SAGE library. Maybe you can get away with only
importing the expect interfaces stuff and nothing else. Then
you'll get to keep the signal handler.
William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---