[racket] Checking whether running from DrRacket.

From: Michael Wilber (mwilber at uccs.edu)
Date: Wed Feb 13 12:23:44 EST 2013

Why not have a `run.rkt` that does something like

#lang racket
(require "main.rkt")

than you tell your users to run, and then just develop main.rkt inside DrRacket?

Pierpaolo Bernardi <olopierpa at gmail.com> writes:
> On Wed, Feb 13, 2013 at 5:59 PM, Danny Yoo <dyoo at hashcollision.org> wrote:
>>> 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:
> I have seen that, but as far as I understood it, it doesn't do what I want.
> I don't want the starting function to execute even when I run the main
> module from DrRacket.
> At the moment, I comment out the call to main when developing, and
> uncomment the call when generating an executable (usually, the second
> time, because the first time I forget to uncomment it  8^)
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users

Posted on the users mailing list.