[Scilab-users] unix_w(WSCI+"\bin\scilex --help") returns nothing
Samuel Gougeon
sgougeon at free.fr
Wed Oct 30 21:16:04 CET 2019
Le 30/10/2019 à 02:33, Chin Luh Tan a écrit :
> Hi Samuel,
>
> I think we could use this instead:
>
> unix_w("Scilex --help 2>&1")
>
>
> As you mentioned, the "--help" is Scilab 6 dedicated "hardcoded"
> function, I am yet to look for where is it located from the source, if
> anyone find out, please share here :).
>
> For some reason, the output message seems to have sent to stderr(2)
> instead of stdout(1), so we have to redirect it back to stdout for the
> unix_? to capture it.
The whole thing is to know which reason. Clearly, std::cerr is
intentionally targeted,
in the source file \scilab\modules\startup\src\cpp\scilab.cpp:
static void usage(void)
{
std::cerr << "Usage: Scilab <options>" << std::endl;
std::cerr << " -e Instruction : execute the scilab
instruction given in Instruction argument." << std::endl;
std::cerr << " -e and -f arguments are
mutually exclusive." << std::endl;
std::cerr << " -f File : execute the scilab script
given in File argument." << std::endl;
std::cerr << " -e and -f arguments are
mutually exclusive." << std::endl;
std::cerr << " -quit : force scilab exit after
execution of script from -e or -f argument." << std::endl;
std::cerr << " this flag is ignored if it
is not used with -e or -f argument." << std::endl;
std::cerr << " -l lang : Change the language of
scilab ( default : en_US )." << std::endl;
std::cerr << " -nw : Enable console mode." <<
std::endl;
std::cerr << " -nwni : Enable terminal mode." <<
std::endl;
std::cerr << " -ns : Don't execute
etc/scilab.start." << std::endl;
std::cerr << " --help : Display this help." <<
std::endl;
std::cerr << " -scihome <dir> : Force SCIHOME to <dir>." <<
std::endl;
std::cerr << "Developer Trace arguments:" << std::endl;
std::cerr << " --parse-trace : Display bison state machine
evolution." << std::endl;
std::cerr << " --AST-trace : Display ASCII-art AST to be
human readable." << std::endl;
std::cerr << " --pretty-print : Display pretty-printed code,
standard Scilab syntax." << std::endl;
std::cerr << " " << std::endl;
std::cerr << "Developer Timer arguments:" << std::endl;
std::cerr << " --AST-timed : Time each AST node." <<
std::endl;
std::cerr << " --timed : Time global execution." <<
std::endl;
std::cerr << " " << std::endl;
std::cerr << "Developer Debug arguments:" << std::endl;
std::cerr << " --no-exec : Only do Lexing/parsing do
not execute instructions." << std::endl;
std::cerr << " --context-dump : Display context status." <<
std::endl;
std::cerr << " --exec-verbose : Display command before
running it." << std::endl;
std::cerr << " --timeout delay : Kill the Scilab process
after a delay." << std::endl;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191030/960b2698/attachment.htm>
More information about the users
mailing list