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

Support for Rich Output #3

Open
sameersingh opened this issue Dec 30, 2013 · 9 comments
Open

Support for Rich Output #3

sameersingh opened this issue Dec 30, 2013 · 9 comments

Comments

@sameersingh
Copy link

Thank you for starting this exciting project.

I was wondering if iScala can be used to produce output that is not restricted to raw text?

The iPython framework supports many various formats.

At the very least, can iScala we used to produce Markdown, Latex, and/or HTML text?

@DocX
Copy link

DocX commented Jun 22, 2014

Hi, I made some simple support in my fork: https://github.com/DocX/IScala

see README. Basically you can use raw_output(mime, string) built-in function that sends arbitrary output to ipy notebook. By that You can print raw HTML or use shortcuts for displaying images and so.

@amitsudharshan
Copy link

Was this something that could be merged in?

@mattpap
Copy link
Owner

mattpap commented Oct 2, 2014

OK, so I finally implemented a preliminary version of display framework. You can see the results in https://github.com/mattpap/IScala/blob/master/examples/Display.ipynb. To get this working, you have to run the kernel with -m com.scalatags::scalatags:0.4.1,io.continuum.bokeh::bokeh:0.2-SNAPSHOT to get the dependencies right (the above is equivalent to libraryDependencies ++= Seq(...) and : has the same meaning as % in sbt).

@paulomagalhaes
Copy link

Thank you for taking on the display work.
I'm getting the exception below when I run line 6 ("

XXX
") or any line below that in the Display.ipynb. Am I doing something wrong? I'm using ipython 2.3.0 and tested with both scala 2.10.4 and 2.11

scala.reflect.internal.MissingRequirementError: object $line1.$display.$iw not found.
scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:16)
scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:17)
scala.reflect.internal.Mirrors$RootsBase.ensureModuleSymbol(Mirrors.scala:126)
scala.reflect.internal.Mirrors$RootsBase.staticModule(Mirrors.scala:161)
scala.reflect.internal.Mirrors$RootsBase.staticModule(Mirrors.scala:21)
org.refptr.iscala.Interpreter.runCode(Interpreter.scala:118)
org.refptr.iscala.Interpreter.display(Interpreter.scala:162)
org.refptr.iscala.Interpreter$$anonfun$10.apply(Interpreter.scala:206)
org.refptr.iscala.Interpreter$$anonfun$10.apply(Interpreter.scala:206)
org.refptr.iscala.Interpreter.withException(Interpreter.scala:97)
org.refptr.iscala.Interpreter.loadAndRunReq(Interpreter.scala:206)
org.refptr.iscala.Interpreter$$anonfun$interpret$1.apply(Interpreter.scala:236)
org.refptr.iscala.Interpreter$$anonfun$interpret$1.apply(Interpreter.scala:236)
org.refptr.iscala.Runner$Execution$$anonfun$1.apply$mcV$sp(Runner.scala:28)
org.refptr.iscala.IOUtil$$anon$2.run(Util.scala:21)
java.lang.Thread.run(Thread.java:745)

@mattpap
Copy link
Owner

mattpap commented Oct 15, 2014

@paulomagalhaes, I presume you're a osx user? If so, there is an issue with case-sensitive class names. I will fix this soon.

@paulomagalhaes
Copy link

@mattpap, thx for the quick reply. Yes I got this error on osx. I just tested on Linux and got the same error, though.

@mattpap
Copy link
Owner

mattpap commented Oct 22, 2014

@paulomagalhaes, this should be fixed by now. If now, you should get at least a more meaningful error message.

@paulomagalhaes
Copy link

@mattpap I tested and it is working. Thanks

@hohonuuli
Copy link

@mattpap I'm doing some testing using IScala with Spark. The addition of the rich output is very helpful Thanks!

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

No branches or pull requests

6 participants