<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Stop python code being written to JMP log in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/769343#M94995</link>
    <description>&lt;P&gt;It may have been documented in the on-line help documentation or it was an unintentional oversight. &amp;nbsp;It also may have been mentioned with Python Execute(). &amp;nbsp;If you run across documentation of the optional arguments echo(True | False) you will probably also see another optional parameter expand ( True | False ). &amp;nbsp;Disregard that one, it's been removed in 19.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Jun 2024 21:45:10 GMT</pubDate>
    <dc:creator>Paul_Nelson</dc:creator>
    <dc:date>2024-06-28T21:45:10Z</dc:date>
    <item>
      <title>Stop python code being written to JMP log</title>
      <link>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768568#M94882</link>
      <description>&lt;P&gt;Is there a way to stop JMP from printing a copy of code submitted to Python to the log?&lt;/P&gt;&lt;P&gt;It seems that every time I run&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Python Submit( code )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get a copy of &lt;FONT face="courier new,courier"&gt;code&lt;/FONT&gt; in the log.&lt;/P&gt;&lt;P&gt;If only running once it's not a big deal, but if running a small chunk of python many times it does clutter up the log, making real messages harder to find. Does it also have a performance impact due to writing to the screen?&lt;/P&gt;&lt;P&gt;I'm using JMP 18.0.1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Simple example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
for(i = 1, i &amp;lt;= 10, i++,
	Python Send( i );
	Python Submit( "\[
b = i / 2
a = b ** 2]\" );
	show( geta = Python Get( a ) );
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Gives the following:&lt;/P&gt;&lt;PRE&gt;/*:

//:*/

b = i / 2
a = b ** 2
/*:

geta = Python Get(a) = 0.25;
//:*/

b = i / 2
a = b ** 2
/*:

geta = Python Get(a) = 1;
//:*/

b = i / 2
a = b ** 2
/*:

geta = Python Get(a) = 2.25;
//:*/

b = i / 2
a = b ** 2
/*:

geta = Python Get(a) = 4;
//:*/
// ....... and so on&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jun 2024 12:08:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768568#M94882</guid>
      <dc:creator>matth1</dc:creator>
      <dc:date>2024-06-26T12:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Stop python code being written to JMP log</title>
      <link>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768589#M94884</link>
      <description>&lt;P&gt;You could try the log capture() function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;a = "Goodbye";
b = log capture(
	print("Hello World");
	print(a);&lt;BR /&gt;// Python commands here...
);
write(b);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 26 Jun 2024 12:35:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768589#M94884</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2024-06-26T12:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Stop python code being written to JMP log</title>
      <link>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768600#M94885</link>
      <description>&lt;P&gt;Thanks! I had forgotten about log capture().&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 13:00:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768600#M94885</guid>
      <dc:creator>matth1</dc:creator>
      <dc:date>2024-06-26T13:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Stop python code being written to JMP log</title>
      <link>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768714#M94901</link>
      <description>&lt;P&gt;The scripting index shows the optional parameter echo(True | False).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Python Submit( code, echo(False) );&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, this optional argument is ignored in 18.0 ( and 18.0.1 ) so the log capture is the way to go at this point.&lt;/P&gt;
&lt;P&gt;This was fixed earlier this month but did not make it into the code base for the upcoming 18.1 maintenance release.&amp;nbsp; We had already passed the code freeze deadline for 18.1.&amp;nbsp; It has been fixed in our mainline development track. (JMP 19)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Similarly, the companion to this jmp.run_jsl() also has the optional echo argument added.&amp;nbsp; (JMP 19)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;jmp.run_jsl( '''code''', &lt;EM&gt;echo=True|False&lt;/EM&gt;)&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2024 18:24:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768714#M94901</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2024-06-26T18:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: Stop python code being written to JMP log</title>
      <link>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768909#M94922</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/7172"&gt;@Paul_Nelson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;The scripting index shows the optional parameter echo(True | False).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Python Submit( code, echo(False) );&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The echo parameter doesn't appear in the scripting index for me, in either 18.0.1 or 17.2:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="matth1_0-1719484056759.png" style="width: 538px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65649i459938E66BC3D16A/image-dimensions/538x272?v=v2" width="538" height="272" role="button" title="matth1_0-1719484056759.png" alt="matth1_0-1719484056759.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is it in Pro only?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 10:30:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768909#M94922</guid>
      <dc:creator>matth1</dc:creator>
      <dc:date>2024-06-27T10:30:00Z</dc:date>
    </item>
    <item>
      <title>Re: Stop python code being written to JMP log</title>
      <link>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768990#M94934</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/7172"&gt;@Paul_Nelson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Unfortunately, this optional argument is ignored in 18.0 ( and 18.0.1 ) so the log capture is the way to go at this point.&lt;/P&gt;&lt;P&gt;This was fixed earlier this month but did not make it into the code base for the upcoming 18.1 maintenance release.&amp;nbsp; We had already passed the code freeze deadline for 18.1.&amp;nbsp; It has been fixed in our mainline development track. (JMP 19)&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/7172"&gt;@Paul_Nelson&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;For JMP 19, will the echo parameter offer any granularity on what is printed to the log? For example, it could be useful to disable printing the python code, but still allow messages from Python (from print() commands for example, or errors from libraries) to be printed to the log as generated. At the moment, the Log Capture() method will always catch everything.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 16:38:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/768990#M94934</guid>
      <dc:creator>matth1</dc:creator>
      <dc:date>2024-06-27T16:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Stop python code being written to JMP log</title>
      <link>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/769342#M94994</link>
      <description>&lt;P&gt;I wanted to test it out before replying. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, with the current code and my test cases, the Python print( value )'s output still comes through even with the code not echoing to log, as does the stack Traceback: when an error occurs in Python code. With an error exception thrown in Python, the JSL returns a -1. &amp;nbsp;std::disclaimer&amp;lt; this is pre-release development, while I believe this to be close to final form, no guarantees. &amp;gt;. &amp;nbsp;The idea of controllable logging levels is an interesting feature idea.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 21:37:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/769342#M94994</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2024-06-28T21:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Stop python code being written to JMP log</title>
      <link>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/769343#M94995</link>
      <description>&lt;P&gt;It may have been documented in the on-line help documentation or it was an unintentional oversight. &amp;nbsp;It also may have been mentioned with Python Execute(). &amp;nbsp;If you run across documentation of the optional arguments echo(True | False) you will probably also see another optional parameter expand ( True | False ). &amp;nbsp;Disregard that one, it's been removed in 19.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jun 2024 21:45:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Stop-python-code-being-written-to-JMP-log/m-p/769343#M94995</guid>
      <dc:creator>Paul_Nelson</dc:creator>
      <dc:date>2024-06-28T21:45:10Z</dc:date>
    </item>
  </channel>
</rss>

