##// END OF EJS Templates
Fix %env magic on Python 3....
Thomas Kluyver -
Show More
@@ -3006,7 +3006,7 b' Defaulting color scheme to \'NoColor\'"""'
3006 def magic_env(self, parameter_s=''):
3006 def magic_env(self, parameter_s=''):
3007 """List environment variables."""
3007 """List environment variables."""
3008
3008
3009 return os.environ.data
3009 return dict(os.environ)
3010
3010
3011 def magic_pushd(self, parameter_s=''):
3011 def magic_pushd(self, parameter_s=''):
3012 """Place the current dir on stack and change directory.
3012 """Place the current dir on stack and change directory.
@@ -467,3 +467,6 b' def test_notebook_reformat_json():'
467 _ip.magic("notebook -f ipynb %s" % infile)
467 _ip.magic("notebook -f ipynb %s" % infile)
468 _ip.magic("notebook -f json %s" % infile)
468 _ip.magic("notebook -f json %s" % infile)
469
469
470 def test_env():
471 env = _ip.magic("env")
472 assert isinstance(env, dict), type(env)
General Comments 0
You need to be logged in to leave comments. Login now