Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

install_extension always returns the path to the installed file.

  • Loading branch information...
commit 80f4581419d60a6f111e32e6570cb68d2b9ab968 1 parent c6a5419
@takluyver authored
Showing with 5 additions and 2 deletions.
  1. +4 −1 IPython/core/
  2. +1 −1  IPython/core/
5 IPython/core/
@@ -133,6 +133,8 @@ def install_extension(self, url, filename=None):
If filename is given, the file will be so named (inside the extension
directory). Otherwise, the name from the URL will be used. The file must
have a .py or .zip extension; otherwise, a ValueError will be raised.
+ Returns the full path to the installed file.
# Ensure the extension directory exists
if not os.path.isdir(self.ipython_extension_dir):
@@ -151,4 +153,5 @@ def install_extension(self, url, filename=None):
raise ValueError("The file must have a .py or .zip extension", filename)
filename = os.path.join(self.ipython_extension_dir, filename)
- return copy(url, filename)
+ copy(url, filename)
+ return filename
2  IPython/core/
@@ -3456,7 +3456,7 @@ def magic_install_ext(self, parameter_s):
opts, args = self.parse_options(parameter_s, 'n:')
- filename, headers = self.extension_manager.install_extension(args, opts.get('n'))
+ filename = self.extension_manager.install_extension(args, opts.get('n'))
except ValueError as e:
print e

0 comments on commit 80f4581

Please sign in to comment.
Something went wrong with that request. Please try again.