Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

%%scala magic is busted #28

Open
parente opened this issue May 10, 2017 · 3 comments
Open

%%scala magic is busted #28

parente opened this issue May 10, 2017 · 3 comments
Labels

Comments

@parente
Copy link
Contributor

parente commented May 10, 2017

I'm working on a sizable PR to add doc and clean up various code paths. Spotted this along the way.

     40             self._interp = get_scala_interpreter()
     41             # Ensure that spark is available in the python session as well.
---> 42             self.kernel.cell_magics['python'].env['spark'] = self._interp.spark_session
     43             self.kernel.cell_magics['python'].env['sc'] = self._interp.sc
     44 

KeyError: 'python'

I'm on the fence about fixing it vs removing support for IPython-to-Scala entirely from this package with the goal of making it more single-purpose: a minimal yet solid Scala+Spark kernel. Pixiedust and https://github.com/maxpoint/spylon can already be used to do scala in ipython.

@mariusvniekerk
Copy link
Collaborator

So spylon can't really do scala in Ipython.

@parente
Copy link
Contributor Author

parente commented May 10, 2017

Clarifying: spylon gives you access to JVM views in IPython. Pixiedust does eval of Scala code.

@parente
Copy link
Contributor Author

parente commented May 10, 2017

Also, I know @patrick-nicholson is using a simple pattern like:

import spylon_kernel
intp = initialize_scala_interpreter()
intp.interpret(code)
intp.last_result()

which will continue to work without the magic, and can be more easily embedded in Python functions and classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants