When I load IGraph/M, it prints an annoying startup message. How can I avoid this?
-
2$\begingroup$ See @Kuba’s implementation here. $\endgroup$– Chris KApr 1, 2020 at 13:45
-
$\begingroup$ @ChrisK Yes, it's basically that. I posted this as a guide for IGraph/M users, some of whom are annoyed by the message. $\endgroup$– SzabolcsApr 1, 2020 at 15:15
-
$\begingroup$ Yep, just wanted to link up these questions. $\endgroup$– Chris KApr 1, 2020 at 15:27
-
1$\begingroup$ That startup message is not annoying. -1 from me. $\endgroup$– QuantumDotApr 1, 2020 at 18:20
1 Answer
Simply suppress the output with a semicolon. The recommended way to load it is with Needs
:
Needs["IGraphM`"];
One can use a semicolon with Get
as well. <<
is just a shorthand for Get
.
Get["IGraphM`"];
If you load it as a dependency of another package,
BeginPackage["MyPackage`", {"IGraphM`"}]
then nothing needs to be done. The message will not be printed.
This works only in recent versions, which return the message instead of Print
ing it: https://mathematica.stackexchange.com/a/200578/12