[racket] Checking whether running from DrRacket.

From: Danny Yoo (dyoo at hashcollision.org)
Date: Wed Feb 13 11:59:53 EST 2013

> Is there a way for a program to know if it's running from inside DrRacket or
> from the command line?
> I would like to run a main function when from command line, and don't run it
> when in DrRacket.

Yes; you can look at Test and Main Submodules in the Racket Guide to
see how to do this:


Essentially, have a submodule named 'main': that submodule will be
invoked when you run the module at the command line, but will not be
invoked if you do a normal require.

Posted on the users mailing list.