Changeset 2335
- Timestamp:
- 05/10/07 01:20:19 (2 years ago)
- Files:
-
- ipython/trunk/doc/ChangeLog (modified) (1 diff)
- ipython/trunk/doc/ipython.1 (modified) (1 diff)
- ipython/trunk/doc/manual_base.lyx (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
ipython/trunk/doc/ChangeLog
r2334 r2335 1 2007-05-10 Fernando Perez <Fernando.Perez@colorado.edu> 2 3 * ipython.1: update man page and full manual with information 4 about threads (remove outdated warning). Closes #151. 5 1 6 2007-05-09 Fernando Perez <Fernando.Perez@colorado.edu> 2 7 ipython/trunk/doc/ipython.1
r2152 r2335 89 89 relying on it for regular work. 90 90 . 91 .SS A WARNING ABOUT SIGNALS AND THREADS92 When any of the thread systems (GTK, QT or WX) are active, either directly or93 via \-pylab with a threaded backend, it is impossible to interrupt94 long-running Python code via Ctrl\-C. IPython can not pass the95 KeyboardInterrupt exception (or the underlying SIGINT) across threads, so any96 long-running process started from IPython will run to completion, or will have97 to be killed via an external (OS-based) mechanism.98 .br99 .sp 1100 To the best of my knowledge, this limitation is imposed by the Python101 interpreter itself, and it comes from the difficulty of writing portable102 signal/threaded code. If any user is an expert on this topic and can suggest103 a better solution, I would love to hear about it. In the IPython sources,104 look at the Shell.py module, and in particular at the runcode() method.105 .106 91 .SH REGULAR OPTIONS 107 92 After the above threading options have been given, regular options can follow ipython/trunk/doc/manual_base.lyx
r2233 r2335 8774 8774 -qthread 8775 8775 \family default 8776 , 8777 \family typewriter 8778 -q4thread 8779 \family default 8776 8780 and 8777 8781 \family typewriter … … 8784 8788 \end_inset 8785 8789 8786 ), can run in multithreaded mode to support pyGTK, Qt and WXPython applications8787 respectively.8790 ), can run in multithreaded mode to support pyGTK, Qt3, Qt4 and WXPython 8791 applications respectively. 8788 8792 These GUI toolkits need to control the python main loop of execution, so 8789 under a normal Python interpreter, starting a pyGTK, Qt or WXPython application8790 will immediately freeze the shell.8793 under a normal Python interpreter, starting a pyGTK, Qt3, Qt4 or WXPython 8794 application will immediately freeze the shell. 8791 8795 8792 8796 \end_layout … … 8833 8837 Please experiment with simple test cases before committing to using this 8834 8838 combination of Tk and GTK/Qt/WX threading in a production environment. 8835 \end_layout8836 8837 \begin_layout Subsection8838 Signals and Threads8839 \end_layout8840 8841 \begin_layout Standard8842 When any of the thread systems (GTK, Qt or WX) are active, either directly8843 or via8844 \family typewriter8845 -pylab8846 \family default8847 with a threaded backend, it is impossible to interrupt long-running Python8848 code via8849 \family typewriter8850 Ctrl-C8851 \family default8852 .8853 IPython can not pass the KeyboardInterrupt exception (or the underlying8854 8855 \family typewriter8856 SIGINT8857 \family default8858 ) across threads, so any long-running process started from IPython will8859 run to completion, or will have to be killed via an external (OS-based)8860 mechanism.8861 \end_layout8862 8863 \begin_layout Standard8864 To the best of my knowledge, this limitation is imposed by the Python interprete8865 r itself, and it comes from the difficulty of writing portable signal/threaded8866 code.8867 If any user is an expert on this topic and can suggest a better solution,8868 I would love to hear about it.8869 In the IPython sources, look at the8870 \family typewriter8871 Shell.py8872 \family default8873 module, and in particular at the8874 \family typewriter8875 runcode()8876 \family default8877 method.8878 8879 8839 \end_layout 8880 8840
