cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
New to using JMP? Hit the ground running with the Early User Edition of Discovery Summit. Register now, free of charge.
Register for our Discovery Summit 2024 conference, Oct. 21-24, where you’ll learn, connect, and be inspired.
Choose Language Hide Translation Bar
BKMitchell
Level I

Name == Main?

Is there a similar syntax in jmp that replicates the behavior of if __name__ == __main__ of python?
1 REPLY 1
Craige_Hales
Super User

Re: Name == Main?

Not exactly. And I'm not enough of a Python user to know all the reasons for using that statement. But I have two answers.

1. if you want to know what source file is current in a nest of includes(...) you can retrieve the stack of filenames in a list. See Include File List() .

2. if you are trying to build a multiple file project, I found an include pattern that worked for me. The problem I solved was having multiple tabs open in the project editor, then running (^R) whatever file I just edited, which would not be the main file. See Using a Project for a Project 

Craige