Zack Yoshyaro
Zack Yoshyaro

Reputation: 2124

Is there a way to enter interactive mode after running a scala script from the command line? (equivalent to Python's `-i` option)

In Python, you can pass an option to the interpreter so that dumps you into an interactive session once the script finishes executing.

python -i myscript.py

Once in interactive mode, you can then inspect the state and objects in your script. Is there a similar functionality with scala and the REPL?

Upvotes: 1

Views: 204

Answers (1)

nadavwr
nadavwr

Reputation: 1830

scala -i myscript.scala should do the trick.

Upvotes: 3

Related Questions