Opened 10 years ago
Last modified 7 years ago
#11223 new defect
Ipython magic commands don't get preparsed
Reported by: | mderickx | Owned by: | was |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | user interface | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
the following was posted in http://groups.google.com/group/sage-devel/browse_thread/thread/209cb82fd378946b/b7122bbf9c893928#b7122bbf9c893928
One problem, these things don't seem to be preparsed.
---------------------------------------------------------------------- | Sage Version 4.6.2, Release Date: 2011-02-25 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: %bg factor(next_prime(10^30)*next_prime(10^40)) Starting job # 0 in a separate thread. sage: jobs.status() Completed jobs: 0 : factor(next_prime(10^30)*next_prime(10^40)) sage: jobs[0].result 23 * 37
because
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 10^30 20 >>> 10^40 34
Change History (8)
comment:1 Changed 10 years ago by
comment:2 Changed 9 years ago by
#12719 also fixes this.
comment:3 Changed 9 years ago by
After applying the patches at #12719, I see
sage: %bg factor(next_prime(10^30)*next_prime(10^40)) ERROR: Line magic function `%bg` not found.
So I guess it is "fixed" in one sense, but not very satisfactorily.
comment:4 Changed 9 years ago by
Ah, good point. In fact, I think %bg isn't implemented yet in IPython. It's on the list of things to do by IPython developers.
comment:5 Changed 8 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:6 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:7 Changed 7 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:8 Changed 7 years ago by
- Milestone changed from sage-6.3 to sage-6.4
Note: See
TracTickets for help on using
tickets.
This could probably be fixed by overwriting eiter the input_prefilter() or pre_runcode_hook() as described on http://ipython.scipy.org/doc/stable/html/api/generated/IPython.hooks.html#IPython.hooks.shell_hook