cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

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