Show More
@@ -48,6 +48,7 b' import sys' | |||||
48 | import tempfile |
|
48 | import tempfile | |
49 | from glob import glob |
|
49 | from glob import glob | |
50 | from shutil import rmtree |
|
50 | from shutil import rmtree | |
|
51 | import warnings | |||
51 |
|
52 | |||
52 | # numpy and rpy2 imports |
|
53 | # numpy and rpy2 imports | |
53 |
|
54 | |||
@@ -689,6 +690,15 b' __doc__ = __doc__.format(' | |||||
689 |
|
690 | |||
690 | def load_ipython_extension(ip): |
|
691 | def load_ipython_extension(ip): | |
691 | """Load the extension in IPython.""" |
|
692 | """Load the extension in IPython.""" | |
|
693 | warnings.warn("The rmagic extension in IPython is deprecated in favour of " | |||
|
694 | "rpy2.ipython. If available, that will be loaded instead.") | |||
|
695 | try: | |||
|
696 | import rpy2.ipython | |||
|
697 | except ImportError: | |||
|
698 | pass # Fall back to our own implementation for now | |||
|
699 | else: | |||
|
700 | return rpy2.ipython.load_ipython_extension(ip) | |||
|
701 | ||||
692 | ip.register_magics(RMagics) |
|
702 | ip.register_magics(RMagics) | |
693 | # Initialising rpy2 interferes with readline. Since, at this point, we've |
|
703 | # Initialising rpy2 interferes with readline. Since, at this point, we've | |
694 | # probably just loaded rpy2, we reset the delimiters. See issue gh-2759. |
|
704 | # probably just loaded rpy2, we reset the delimiters. See issue gh-2759. |
General Comments 0
You need to be logged in to leave comments.
Login now