jonsequitur / jonsequitur/dotnet-repl

Redirect Console.WriteLine output to repl console

Open
#96 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
844
Forks
42
PR merge metrics
No merged PRs in 30d

Description

We are using dotnet-repl to automate .dib notebooks as a replacement for scripts (.bat script, .sh scripts), as part of our DevOps revamping.
As we are C# developers, using C# as a scripting language and notebooks as a scripting environment is a huge boost to our productivity.

We are using with command lines such as:
```
dotnet repl --run main.dib --exit-after-run --output-path output.ipynb --output-format ipynb
```

We are running those command lines through tools such as Jenkins, or Windows batch. I know about the ipynb output, but it works as a black box, as there is no real time direct display from dotnet-repl to the console.
Any fail forces to connect to the distant machine, launch VSCode and look into the notebook to debug.
Besides, some execution can be long, and with no console output, we are left in the dark. Is it blocked by something? Is it reaching at least the first step?

It would be really helpful, if there was some way to display information from the notebook to the console using dotnet-repl.
Maybe there could be some way to redirect the notebook Console.WriteLine output / standard output to the dotnet-repl console?

I would like to do the following:
* I write in the notebook `Console.WriteLine("Hello");`
* I launch a Windows CMD console
* I type `dotnet repl --run main.dib --exit-after-run --output-console`
* the notebook is executed
* "Hello" is displayed

This is a feature which will allow dotnet-repl to be used far more in our company, and by other devops as well.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.