cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar

JSL - Escape Character Syntax Error?

Hi all, 

(JMP Pro 17 user) I am running into a strange issue where escape characters don't work in JSL, specifically within Application Builder. 

 

This works:

 

// Example:
Python Submit("print(dt1)");

This does not work:

 

 

// Example:
Python Submit("\[print (dt1)]\");

// this is what I want to use it with, statement is impossible without escape characters: 
Python Submit("\[
dt1 = dt1[~dt1["Column 1"].str.contains("#")]
]\");

When it works, it prints the data table associated with dt1, but when escape characters are placed, this is the log output (just repeats what's within the escape characters):

/**********/

	
	print (dt1)
	
	
/**********/

I'm not sure what is going wrong here, perhaps a syntax error on my end? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: JSL - Escape Character Syntax Error?

The issue could be caused by incorrect indentation of the python code.

 

This is from JMP18, but I would guess it is same in JMP17

jthi_0-1721150953229.png

jthi_1-1721150964186.png

 

-Jarmo

View solution in original post

3 REPLIES 3

Re: JSL - Escape Character Syntax Error?

Not sure how to edit, but apologies for the messed up formatting.

Re: JSL - Escape Character Syntax Error?

I think I may have resolved this. For some reason it had to be in one line. Putting in line breaks to make the block of code more pretty seemed to break it. 

For example, this works: 

Python Submit("\[dt1 = dt1[~dt1["Column 1"].str.contains("#")]]\");

But this didn't:

Python Submit("\[
	
	dt1 = dt1[~dt1["Column 1"].str.contains("#")]
		
]\");

Not sure why this could be, but I'm glad it's at least working.

jthi
Super User

Re: JSL - Escape Character Syntax Error?

The issue could be caused by incorrect indentation of the python code.

 

This is from JMP18, but I would guess it is same in JMP17

jthi_0-1721150953229.png

jthi_1-1721150964186.png

 

-Jarmo