Timmmm
Timmmm

Reputation: 96586

How do you clear the Lua console workspace?

I'm basically looking for an equivalent of Matlab's clear command. Is that possible?

Upvotes: 1

Views: 857

Answers (2)

Timmmm
Timmmm

Reputation: 96586

It seems that Lua does not support this functionality. However the iPython Notebook (which supports Lua) has an option to restart the interpreter (Kernel->Restart).

Upvotes: 0

Nicol Bolas
Nicol Bolas

Reputation: 473407

You don't. Lua's "console workspace" interacts with the console in the only ways that the C standard library can do so. It can read from stdin. It can write to stdout and stderr. But that's it.

Clearing a console requires functionality beyond that, and the Lua interpreter simply doesn't have access to that functionality.

Upvotes: 0

Related Questions