cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. ET on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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

Recommended Articles