Skip to main content
6 events
when toggle format what by license comment
Jul 10, 2017 at 11:45 comment added kjo Certainly, but it is easier on our users for us to give them a wrapper script (around WolframScript, e.g.) that implements the desired behavior (through -run) than to ask them to modify their init.m files.
Jul 7, 2017 at 23:59 comment added Itai Seggev Off the top of my head, I don't think we have such a thing, but this doesn't have to be done inside of -run. You can use GetEnvironment[] inside the script to get it. Or, if you want all scripts to look for a particular variable, add the following to /usr/share/Mathematica/Kernel/init.m: If[$ScriptCommandLine =!= {}, AppendTo[$Path, GetEnivronment[var]]
Jul 5, 2017 at 12:51 comment added kjo ... E.g. for Python, it's PYTHONPATH; for Perl, it's PERL5LIB; for MATLAB, it's MATLABPATH; etc. If WolframScript supports such an environment variable, please let me know.
Jul 5, 2017 at 12:51 comment added kjo Thanks! Regarding "...any needed values would be passed in as arguments", keep in mind that, in the Unix world, environment variables are a time-honored second way to pass values to programs. In fact, as the example I gave may hint at, we've been using the -run flag to support a functionality that is supported by pretty much every other scripting platform out there, namely an environment variable that specifies directories to be added to the search path for modules. ...
Jul 5, 2017 at 12:45 vote accept kjo
Jul 3, 2017 at 23:04 history answered Itai Seggev CC BY-SA 3.0