<?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: About the Python and JMP interactive issues in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613958#M81405</link>
    <description>&lt;P&gt;sorry, i just forget to install the packages for Python, issue is fixed&lt;/P&gt;</description>
    <pubDate>Sun, 19 Mar 2023 01:01:44 GMT</pubDate>
    <dc:creator>1026</dc:creator>
    <dc:date>2023-03-19T01:01:44Z</dc:date>
    <item>
      <title>About the Python and JMP interactive issues</title>
      <link>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613890#M81399</link>
      <description>&lt;P&gt;hi all experts&lt;/P&gt;&lt;P&gt;there are two issues that I&amp;nbsp; learn the Python and JMP interactive in JMP 16.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Q1:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Python Init( Echo( 1));

z ="python test";
Python Send( z,P );

Python Submit( "print(P)" );
Python Submit( "print(z)" );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;it's output&amp;nbsp; context:&amp;nbsp;&lt;/P&gt;&lt;P&gt;/**********/&lt;BR /&gt;print(P)&lt;BR /&gt;/**********/&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/**********/&lt;BR /&gt;print(z)&lt;BR /&gt;/**********/&lt;BR /&gt;python test&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;which means that Python don't receive the&amp;nbsp;P parameter equaling to z , so anyting wrong?&lt;/P&gt;&lt;P&gt;Q2:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Python Init( Echo( 1));
x1 = [1, 2, 3];
Python Send( x1, P_x );
Python Submit( "print(P_x)" );
Python Submit( "print(x1)" );
x2 = Python Get(  x1 );
Show( x1, x2 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But it's output context:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/**********/&lt;BR /&gt;print(P_x)&lt;BR /&gt;/**********/&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/**********/&lt;BR /&gt;print(x1)&lt;BR /&gt;/**********/&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;x1 = [1, 2, 3];&lt;BR /&gt;x2 = .;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Besides Q1 and this code even can't normally output the list vale in Log ? Is this a bug for list value transfer between Python and JMP?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:27:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613890#M81399</guid>
      <dc:creator>1026</dc:creator>
      <dc:date>2023-06-08T16:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: About the Python and JMP interactive issues</title>
      <link>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613925#M81400</link>
      <description>&lt;P&gt;Welcome to the Community Discussion forum.&lt;/P&gt;
&lt;P&gt;Concerning your 1st question, I do not see anything in error.&amp;nbsp; When you Send scalar values to Python, and one of them, P does not exist in JMP, it can not pass anything to Python.&amp;nbsp; Therefore, Python not displaying any value with:&lt;/P&gt;
&lt;PRE&gt;print(P)&lt;/PRE&gt;
&lt;P&gt;has nothing to display.&lt;/P&gt;
&lt;P&gt;Concerning your Q2.&amp;nbsp; Using JMP 16.2 on a Windows 11 pc, I receive the following output&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;/**********/
print(P_x)
/**********/
/**********/
print(x1)
/**********/
[[1.]
 [2.]
 [3.]]

x1 = [1, 2, 3];
x2 = [1, 2, 3];&lt;/PRE&gt;
&lt;P&gt;Which is exactly what I would expect.&amp;nbsp; The code works the same on JMP 17&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2023 22:19:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613925#M81400</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-03-18T22:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: About the Python and JMP interactive issues</title>
      <link>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613926#M81401</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Python Init();
x = [1, 2, 3];
Python Send( x,Python Name("y") ); // the python name seems to be a string
Python Submit( "print(y)" );
Python Term();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think you might prefer to use it the way I did in &lt;LI-MESSAGE title="Browser Scripting with Python Selenium" uid="485000" url="https://community.jmp.com/t5/Uncharted/Browser-Scripting-with-Python-Selenium/m-p/485000#U485000" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; .&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;PythonExecute( { input }, { output }, " python code using input and producing output " )&lt;/LI&gt;
&lt;LI&gt;try: ... except ... around the python code&lt;/LI&gt;
&lt;LI&gt;return a string for the return code, notice repr(e) to get a string from the exception&lt;/LI&gt;
&lt;LI&gt;check both the return code from PythonExecute AND the string return code, they are for different errors&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;JMP is not currently doing a great job of handling errors in the python script; the try-except will make your work a lot more fun.&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2023 22:22:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613926#M81401</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-03-18T22:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: About the Python and JMP interactive issues</title>
      <link>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613944#M81403</link>
      <description>&lt;P&gt;thanks for your support and i think i konw what happen to my JMP, because i just reinstal my computer OS from WIN10 to WIN 11, which&amp;nbsp; may lost some key environment for JMP, issue is fixed but another issue happend :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// This is the Scripts manual code for Python Get
Names Default To Here( 1 );
Python Init();
x1 = [1, 2, 3];
Python Send( x1 );
x2 = Python Get( x1 );
Show( x1, x2 );
dt1 = Open( "$SAMPLE_DATA/Big Class.jmp" );
Python Send( dt1 );
dt2 = Python Get( dt1 );
dt2 &amp;lt;&amp;lt; New Data View;
Close( dt1 );
Python Term();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;it's output is shown as below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;x1 = [1, 2, 3];&lt;BR /&gt;x2 = [1, 2, 3];&lt;BR /&gt;Send Expects Scriptable Object in access or evaluation of 'Send' , dt2 &amp;lt;&amp;lt; /*###*/New Data View/*###*/&lt;/P&gt;&lt;P&gt;at line 10 in Scripting Index&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i get the type of dt2 is Number :&amp;nbsp; Type(dt2) = "Number";, so is there any solution for&amp;nbsp; this issue?&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2023 23:42:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613944#M81403</guid>
      <dc:creator>1026</dc:creator>
      <dc:date>2023-03-18T23:42:20Z</dc:date>
    </item>
    <item>
      <title>Re: About the Python and JMP interactive issues</title>
      <link>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613945#M81404</link>
      <description>&lt;P&gt;thanks for your answer&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Mar 2023 23:43:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613945#M81404</guid>
      <dc:creator>1026</dc:creator>
      <dc:date>2023-03-18T23:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: About the Python and JMP interactive issues</title>
      <link>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613958#M81405</link>
      <description>&lt;P&gt;sorry, i just forget to install the packages for Python, issue is fixed&lt;/P&gt;</description>
      <pubDate>Sun, 19 Mar 2023 01:01:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/About-the-Python-and-JMP-interactive-issues/m-p/613958#M81405</guid>
      <dc:creator>1026</dc:creator>
      <dc:date>2023-03-19T01:01:44Z</dc:date>
    </item>
  </channel>
</rss>

