You can use a `drracket` submodule:

(module+ drracket
 (foo)
 (bar))

but you need to configure DrRacket to recognize it: Click on the
bottom-left button about languages, and at the bottom of "Dynamic
Properties", click on "Submodules to run", then "Add submodule option" and
add "drracket".

After this, when you run a module from within DrRacket, it will
automatically run the `drracket` submodule, but this submodule will *not*
be run from the command line (by default).

(I also uncheck the "main" submodule as I use this one only for the command
line.)

HTH,
Laurent




On Wed, Sep 2, 2020 at 8:44 AM Stefan Schmiedl <[email protected]>
wrote:

> Greetings,
>
> I find myself coding some more in DrRacket on my local Win10 PC.
> The finished program is to be run on a remote linux server.
>
> I like to keep the code set up for the production environment
> but to test it locally I need to configure some things differently.
>
> Currently I'm doing this manually by commenting/uncommenting a sexp
> with the required modifications.
>
> Is there a function around that allows me to do something like
>
> (when (running-in-dr-racket?)
>   (foo)
>   (bar))
>
> Thanks,
> s.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/26327196.20200902094324%40gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CABNTSaHRMNb8_efegWNC4x68tgo3Q96-ja7ZKHTgSi0Ap86K1g%40mail.gmail.com.

Reply via email to