<h2>org.autoplot.jythonsupport.JythonUtil</h2><p>Utilities to support Jython scripting.</p>
<h2>JythonUtil( )</h2>
<p></p>

<hr>
<a name="EMPTY"></a>
<h2>EMPTY</h2>
<p></p>

<hr>
<a name="createInterpreter"></a>
<h2>createInterpreter</h2>
createInterpreter( boolean sandbox ) &rarr; InteractiveInterpreter

<p>create an interpreter object configured for Autoplot contexts:
 <ul>
 <li> QDataSets are wrapped so that operators are overloaded.
 <li> a standard set of names are imported.
 </ul>
 This also adds things to the Jython search path (see
 getLocalJythonAutoplotLib) so imports will find them.</p>

<h3>Parameters</h3>
sandbox - limit symbols to safe symbols for server.

<h3>Returns:</h3>
PythonInterpreter ready for commands.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=createInterpreter&unscoped_q=createInterpreter">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#createInterpreter">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l93">[view source]</a>
<br>
<br>
<hr>
<a name="describeScript"></a>
<h2>describeScript</h2>
describeScript( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> script, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> params ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/autoplot/jythonsupport/JythonUtil/ScriptDescriptor.html'>org.autoplot.jythonsupport.JythonUtil.ScriptDescriptor</a>

<p>return the script description and arguments.</p>

<h3>Parameters</h3>
script - the script Jython code.
<br>
params - any operator-defined values.

<h3>Returns:</h3>
an org.autoplot.jythonsupport.JythonUtil.ScriptDescriptor

<br><br>
<a href="https://github.com/autoplot/dev/search?q=describeScript&unscoped_q=describeScript">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#describeScript">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l1551">[view source]</a>
<br>
<br>
describeScript( <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> env, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> script, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> params ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/autoplot/jythonsupport/JythonUtil/ScriptDescriptor.html'>org.autoplot.jythonsupport.JythonUtil.ScriptDescriptor</a><br>
<hr>
<a name="errorScriptDescriptor"></a>
<h2>errorScriptDescriptor</h2>
errorScriptDescriptor( PySyntaxError ex ) &rarr; <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/autoplot/jythonsupport/JythonUtil/ScriptDescriptor.html'>org.autoplot.jythonsupport.JythonUtil.ScriptDescriptor</a>

<p></p>

<h3>Parameters</h3>
ex - a PySyntaxError

<h3>Returns:</h3>
org.autoplot.jythonsupport.JythonUtil.ScriptDescriptor

<br><br>
<a href="https://github.com/autoplot/dev/search?q=errorScriptDescriptor&unscoped_q=errorScriptDescriptor">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#errorScriptDescriptor">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l1513">[view source]</a>
<br>
<br>
<hr>
<a name="getBeginLine"></a>
<h2>getBeginLine</h2>
getBeginLine( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String[]</a> ss, stmtType o ) &rarr; int

<p>there's a problem where multi-line strings and expressions have a begin line at the end not the beginning.</p>

<h3>Parameters</h3>
ss - the script which has been parsed into lines.
<br>
o - the AST statement

<h3>Returns:</h3>
the line of the beginning of the statement.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getBeginLine&unscoped_q=getBeginLine">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#getBeginLine">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l1307">[view source]</a>
<br>
<br>
<hr>
<a name="getDocumentation"></a>
<h2>getDocumentation</h2>
getDocumentation( <a href='https://docs.oracle.com/javase/8/docs/api/java/io/BufferedReader.html'>java.io.BufferedReader</a> reader ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a>

<p>scrape through the script looking for documentation declarations returns
 an map, possibly containing:<ul>
 <li>LABEL few words
 <li>TITLE sentence
 <li>DESCRIPTION short paragraph
 </ul>
 This would originally look for lines like:<br>
 # TITLE: Text Recombinator<br>
 but this has been deprecated and scripts should use setScriptTitle 
 and setScriptDescription</p>

<h3>Parameters</h3>
reader - a BufferedReader

<h3>Returns:</h3>
the documentation found.
<h3>See Also:</h3>
<a href='null'>getDocumentation(java.io.BufferedReader, java.net.URI)</a> <br>
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getDocumentation&unscoped_q=getDocumentation">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#getDocumentation">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l539">[view source]</a>
<br>
<br>
getDocumentation( <a href='https://docs.oracle.com/javase/8/docs/api/java/io/BufferedReader.html'>java.io.BufferedReader</a> reader, <a href='https://docs.oracle.com/javase/8/docs/api/java/net/URI.html'>java.net.URI</a> resourceURI ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a><br>
<hr>
<a name="getGetDataSet"></a>
<h2>getGetDataSet</h2>
getGetDataSet( <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> env, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> script, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> params ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a>

<p>return a list of the getDataSet calls, from index to simplified
 getDataSet call. Experimental--interface may change</p>

<h3>Parameters</h3>
env - a java.util.Map
<br>
script - a String
<br>
params - a java.util.Map

<h3>Returns:</h3>
a java.util.Map

<br><br>
<a href="https://github.com/autoplot/dev/search?q=getGetDataSet&unscoped_q=getGetDataSet">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#getGetDataSet">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l2226">[view source]</a>
<br>
<br>
<hr>
<a name="getGetParams"></a>
<h2>getGetParams</h2>
getGetParams( <a href='https://docs.oracle.com/javase/8/docs/api/java/io/Reader.html'>java.io.Reader</a> reader ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/List.html'>java.util.List</a>

<p>support for the old getGetParams. Note this closes the reader.</p>

<h3>Parameters</h3>
reader - a Reader

<h3>Returns:</h3>
a java.util.List

<br><br>
<a href="https://github.com/autoplot/dev/search?q=getGetParams&unscoped_q=getGetParams">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#getGetParams">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l1443">[view source]</a>
<br>
<br>
getGetParams( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> script ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/List.html'>java.util.List</a><br>
getGetParams( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> script, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> params ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/List.html'>java.util.List</a><br>
getGetParams( <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> env, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> script, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> params ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/List.html'>java.util.List</a><br>
<hr>
<a name="getLocals"></a>
<h2>getLocals</h2>
getLocals( <a href='https://docs.oracle.com/javase/8/docs/api/java/io/BufferedReader.html'>java.io.BufferedReader</a> reader ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a>

<p>scrape script for local variables, looking for assignments. The reader is
 closed after reading.</p>

<h3>Parameters</h3>
reader - the source for the script. It is closed when the code
 executes properly.

<h3>Returns:</h3>
a map of the local variable name to the line containing it.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=getLocals&unscoped_q=getLocals">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#getLocals">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l2340">[view source]</a>
<br>
<br>
<hr>
<a name="join"></a>
<h2>join</h2>
join( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String[]</a> list, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> delim ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>join the array using the delimiter join( ['a','b'], '_' ) -> a_b Note
 Java 8 finally has a join, and this should be used when Java 8 is
 available.</p>

<h3>Parameters</h3>
list - strings to join
<br>
delim - a String

<h3>Returns:</h3>
the joined string
<br><br>
<a href="https://github.com/autoplot/dev/search?q=join&unscoped_q=join">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#join">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l2490">[view source]</a>
<br>
<br>
join( <a href='https://docs.oracle.com/javase/8/docs/api/java/util/List.html'>java.util.List</a> list, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> delim ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a><br>
<hr>
<a name="maybeQuoteString"></a>
<h2>maybeQuoteString</h2>
maybeQuoteString( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> sval ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>put quotes around values that appear to be strings. We see if it's
 parsable as a double or the keyword True or False.</p>

<h3>Parameters</h3>
sval - the string, for example "2015" "'2015'" or "2015-01-01"

<h3>Returns:</h3>
2015, "'2015'", "'2015-01-01'"
<br><br>
<a href="https://github.com/autoplot/dev/search?q=maybeQuoteString&unscoped_q=maybeQuoteString">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#maybeQuoteString">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l845">[view source]</a>
<br>
<br>
<hr>
<a name="maybeUnquoteString"></a>
<h2>maybeUnquoteString</h2>
maybeUnquoteString( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> sval ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>pop off the quotes to get the text inside.</p>

<h3>Parameters</h3>
sval - "'2015-01-01'"

<h3>Returns:</h3>
"2015-01-01"
<br><br>
<a href="https://github.com/autoplot/dev/search?q=maybeUnquoteString&unscoped_q=maybeUnquoteString">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#maybeUnquoteString">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l868">[view source]</a>
<br>
<br>
<hr>
<a name="pyDictionaryToMap"></a>
<h2>pyDictionaryToMap</h2>
pyDictionaryToMap( PyDictionary pd ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a>

<p>return a Java Map for a Jython dictionary.</p>

<h3>Parameters</h3>
pd - a PyDictionary

<h3>Returns:</h3>
a java.util.Map

<br><br>
<a href="https://github.com/autoplot/dev/search?q=pyDictionaryToMap&unscoped_q=pyDictionaryToMap">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#pyDictionaryToMap">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l2300">[view source]</a>
<br>
<br>
<hr>
<a name="pythonLint"></a>
<h2>pythonLint</h2>
pythonLint( <a href='https://docs.oracle.com/javase/8/docs/api/java/net/URI.html'>java.net.URI</a> uri, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/List.html'>java.util.List</a> errs ) &rarr; boolean

<p>check the script that it doesn't redefine symbol names like "str"</p>

<h3>Parameters</h3>
uri - an URI
<br>
errs - an empty list where the errors can be logged.

<h3>Returns:</h3>
true if an err is suspected.
<br><br>
<a href="https://github.com/autoplot/dev/search?q=pythonLint&unscoped_q=pythonLint">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#pythonLint">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l457">[view source]</a>
<br>
<br>
pythonLint( <a href='https://docs.oracle.com/javase/8/docs/api/java/io/LineNumberReader.html'>java.io.LineNumberReader</a> reader, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/List.html'>java.util.List</a> errs ) &rarr; boolean<br>
<hr>
<a name="readScript"></a>
<h2>readScript</h2>
readScript( <a href='https://docs.oracle.com/javase/8/docs/api/java/io/Reader.html'>java.io.Reader</a> reader ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>read all the lines of a script into a string. The reader will be closed.</p>

<h3>Parameters</h3>
reader - a Reader

<h3>Returns:</h3>
a String

<br><br>
<a href="https://github.com/autoplot/dev/search?q=readScript&unscoped_q=readScript">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#readScript">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l1888">[view source]</a>
<br>
<br>
<hr>
<a name="removeSideEffects"></a>
<h2><del>removeSideEffects</del></h2>
Deprecated: this should not be used, because newer codes use the
 fully-implemented Jython parser.
<hr>
<a name="setParams"></a>
<h2>setParams</h2>
setParams( PythonInterpreter interp, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> paramsl ) &rarr; void

<p>put each parameter into the dictionary autoplot.params.</p>

<h3>Parameters</h3>
interp - a PythonInterpreter
<br>
paramsl - a java.util.Map

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=setParams&unscoped_q=setParams">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#setParams">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l883">[view source]</a>
<br>
<br>
<hr>
<a name="setupInterp"></a>
<h2>setupInterp</h2>
setupInterp( PythonInterpreter interp, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> pwd, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> resourceUri, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/Map.html'>java.util.Map</a> paramsl, <a href='http://www-pw.physics.uiowa.edu/~jbf/autoplot/doc/org/das2/util/monitor/ProgressMonitor.html'>ProgressMonitor</a> mon ) &rarr; void

<p>set up the interp variables scripts will often use, such as PWD and
 monitor.</p>

<h3>Parameters</h3>
interp - a PythonInterpreter
<br>
pwd - a String
<br>
resourceUri - a String
<br>
paramsl - a java.util.Map
<br>
mon - a ProgressMonitor

<h3>Returns:</h3>
void (returns nothing)

<br><br>
<a href="https://github.com/autoplot/dev/search?q=setupInterp&unscoped_q=setupInterp">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#setupInterp">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l183">[view source]</a>
<br>
<br>
<hr>
<a name="simplifyScriptToGetParams"></a>
<h2>simplifyScriptToGetParams</h2>
simplifyScriptToGetParams( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String[]</a> ss, stmtType[] stmts, <a href='https://docs.oracle.com/javase/8/docs/api/java/util/HashSet.html'>java.util.HashSet</a> variableNames, int beginLine, int lastLine, int depth ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a>

<p>Extracts the parts of the program that get parameters or take a trivial
 amount of time to execute.  This may call itself recursively when if
 blocks are encountered. 
 
 This scans through, where acceptLine is the first line we'll accept
 to the currentLine, copying over script from acceptLine to currentLine.
 
 See test038 (https://jfaden.net/jenkins/job/autoplot-test038/)</p>

<h3>Parameters</h3>
ss - the entire script, ss[0] is empty string so that ss[1] is the first line of the script.
<br>
stmts - statements being processed.
<br>
variableNames - variable/procedure names that have been resolved.
<br>
beginLine - first line of the script being processed.
<br>
lastLine - INCLUSIVE last line of the script being processed.
<br>
depth - recursion depth, for debugging.

<h3>Returns:</h3>
a String

<h3>See Also:</h3>
<a href='null'>SimplifyScriptSupport#simplifyScriptToGetCompletions(java.lang.String[], org.python.parser.ast.stmtType[], java.util.HashSet, int, int, int)</a> <br>
<br><br>
<a href="https://github.com/autoplot/dev/search?q=simplifyScriptToGetParams&unscoped_q=simplifyScriptToGetParams">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#simplifyScriptToGetParams">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l1119">[view source]</a>
<br>
<br>
simplifyScriptToGetParams( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> script, boolean addSort ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a><br>
<hr>
<a name="splitCodeIntoLines"></a>
<h2>splitCodeIntoLines</h2>
splitCodeIntoLines( <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> zerothLine, <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String</a> script ) &rarr; <a href='https://docs.oracle.com/javase/8/docs/api/java/lang/String.html'>String[]</a>

<p>one-stop place for splitting a script into lines for simplifyScriptToGetParams
 This was all motivated by a busy number of lineNumber-1's in the code
 that would handle the refactorings.</p>

<h3>Parameters</h3>
zerothLine - null or the line to use for the first element in the array.
<br>
script - the script

<h3>Returns:</h3>
the script with the first line of the script in array[1].
<h3>See Also:</h3>
<a href='null'>simplifyScriptToGetParams(java.lang.String[], org.python.parser.ast.stmtType[], java.util.HashSet, int, int, int)</a> <br>
<a href='null'>SimplifyScriptSupport#simplifyScriptToGetCompletions(java.lang.String[], org.python.parser.ast.stmtType[], java.util.HashSet, int, int, int)</a> <br>
<br><br>
<a href="https://github.com/autoplot/dev/search?q=splitCodeIntoLines&unscoped_q=splitCodeIntoLines">[search for examples]</a>
 <a href="https://github.com/autoplot/documentation/tree/master/javadoc/org/autoplot/jythonsupport/JythonUtil.md">[view on GitHub]</a>
 <a href="http://www-pw.physics.uiowa.edu/~jbf/autoplot/javadoc2018/org/autoplot/jythonsupport/JythonUtil.html#splitCodeIntoLines">[view on old javadoc]</a>
 <a href="https://sourceforge.net/p/autoplot/code/HEAD/tree/autoplot/trunk/JythonSupport/src/org/autoplot/jythonsupport/JythonUtil.java#l1090">[view source]</a>
<br>
<br>