1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//en">
<!--Converted with LaTeX2HTML 2021 (Released January 1, 2021) -->
<HTML lang="en">
<HEAD>
<TITLE>Enviroment Variables</TITLE>
<META NAME="description" CONTENT="Enviroment Variables">
<META NAME="keywords" CONTENT="mma">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="viewport" CONTENT="width=device-width, initial-scale=1.0">
<META NAME="Generator" CONTENT="LaTeX2HTML v2021">
<LINK REL="STYLESHEET" HREF="mma.css">
<LINK REL="next" HREF="node30.html">
<LINK REL="previous" HREF="node28.html">
<LINK REL="next" HREF="node30.html">
</HEAD>
<BODY bgcolor="#ffffff">
<DIV CLASS="navigation"><!--Navigation Panel-->
<A
HREF="node30.html">
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
<A
HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
<A
HREF="node28.html">
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A
HREF="node30.html">Other Commands and Directives</A>
<B> Up:</B> <A
HREF="mma.html">Reference Manual</A>
<B> Previous:</B> <A
HREF="node28.html">Fine Tuning and Tweaks</A>
<BR>
<BR></DIV>
<!--End of Navigation Panel-->
<H1><A ID="SECTION002900000000000000000"></A> <A ID="sec-envvar"></A>
<BR>
Enviroment Variables
</H1>
<P>
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> checks for enviroment variables when starting so it can modify
seldom changed settings. The list is short, but will probably expand
in the future to support arcane and unusual requests.
<P>
A variable can be set on the command line,
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>MMA_ENCODING=cp1253 mma mymmafile </B>
</td></tr>
</Table>
<P>
or in a file (most likely .profile or .bashrc) which is read before
you start your shell session.
<P>
All
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> environment variables start with the text MMA_ and
a name. All the characters must be in uppercase only.
<P>
<DL>
<DT><STRONG>MMA_ENCODING</STRONG></DT>
<DD>By default
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> uses cp1252 to encode input and
output files. You can change this via the MMA_ENCODING environment
variable. If it doesn't work, you are on your own.
<P>
</DD>
<DT><STRONG>MMA_LOGFILE=filename</STRONG></DT>
<DD>Rather than printing errors and other
runtime information to standard output (the terminal screen) this
option sets a filename for saving the output. Note that if the file
already exists it will be appended to (useful when you have multiple
files to debug). F<SMALL>ILENAME</SMALL> should be a normal file name
understood by your operating system.
<P>
The file will only be created if there is output other than
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT>
P<SMALL>RINT</SMALL> statements. A header showing the date will be inserted
at the top of the file.
<P>
The easy way to use this is with a command line like:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>$ MMA_LOGFILE=abc mma test.mma </B>
</td></tr>
</Table>
<P>
</DD>
<DT><STRONG>MMA_HOME=path</STRONG></DT>
<DD>This variable will change the normal search
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> uses to set its home directory <A HREF="node33.html#sec-rc">(here)</A>. Setting this environment variable inserts the
path into the start of the normal search list.
<P>
<UL>
<LI>The specified path must contain the necessary
<FONT Face="Serif" Color="Navy"><I>MMA</I></FONT> python
modules to function.
</LI>
<LI>The variable is evaluated to process any “~”
settings.
</LI>
</UL>
<P>
</DD>
<DT><STRONG>MMA_LIBPATH=paths</STRONG></DT>
<DD>A os-dependent list of separated list of
paths or directories to prepend to the start of default library path
list. Each item in the list is evaluated to process any
“~” settings. For example:
<P>
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>$ MMA_LIBPATH=~/my/mma/dir:anotherDir mma
test.mma </B>
</td></tr>
</Table>
<P>
will set the $_P<SMALL>ATH</SMALL>L<SMALL>IB</SMALL> to the list:
['/home/bob/my/mma/dir', 'anotherDir', '/home/bob/src/bv/mma/lib'].
<P>
When setting the added paths a quick check is done and any
non-existent or non-directory names will be reported as warnings.
<P>
Note: The separator is a single character depending on your
operating system. In Linux and Mac it is a “:” and in Windows it
is a “;”. To verify, open a python session and type:
<Table Hspace="40%" CellSpacing=0 CellPadding=10 BGColor="OldLace" Border=3>
<tr><td>
<B>import os
<BR>
print(os.pathsep)
<BR> </B>
</td></tr>
</Table>
The correct character will be printed.
<P>
In most cases you'll probably only have one path so you'll not need
to worry about the separator.
<P>
</DD>
<DT><STRONG>MMA_INCPATH=paths</STRONG></DT>
<DD>A list of paths or directories to prepend to
the default include path list. See MMA_LIBPATH, above, for
details.
<P>
</DD>
<DT><STRONG>MMA_PLUGPATH=paths</STRONG></DT>
<DD>A list of paths or directories to prepend
to the default plugin path list. See MMA_LIBPATH, above, for
details.
<P>
</DD>
</DL>
<P>
<DIV CLASS="navigation"><HR>
<!--Navigation Panel-->
<A
HREF="node30.html">
<IMG WIDTH="37" HEIGHT="24" ALT="next" SRC="next.png"></A>
<A
HREF="mma.html">
<IMG WIDTH="26" HEIGHT="24" ALT="up" SRC="up.png"></A>
<A
HREF="node28.html">
<IMG WIDTH="63" HEIGHT="24" ALT="previous" SRC="prev.png"></A>
<BR>
<B> Next:</B> <A
HREF="node30.html">Other Commands and Directives</A>
<B> Up:</B> <A
HREF="mma.html">Reference Manual</A>
<B> Previous:</B> <A
HREF="node28.html">Fine Tuning and Tweaks</A></DIV>
<!--End of Navigation Panel-->
</BODY>
</HTML>
|