Error with this module

anything wrong with this module?

#module FSPMA_ATP.py

def FSPMAtest():
print(“”)
print(“========================================================================”)
print(“APAS- ATE (Automatic Test Equipment Report).”)
print(“========================================================================”)
print(“LRU:”)
print(“Flap/Slat Position Module Assembly A/C: B757/767 “)
print(“P.N: 285T0099-Series ATA 27-58-51 Rev: 39 Dated:May 14/2020 “)
print(”========================================================================”)
print(””)
print(“Functional Test Specification:”)
print(“------------------------------”)
print(“The return to service documentation for this unit, is contained”)
print(“and available in an End Item Support Index (EISI).”)
print(“This information includes any applicable FTR, ATLAS, or TSDP.”)
print(“========================================================================”)
#WOmain.destroy()
FSPMA_ATP = Toplevel()

FSPMA_ATP.geometry(‘1890x950+10+65’)
FSPMA_ATP.title(“Universal ATLAS Acceptance Test Procedure”)

create a notebook

note = ttk.Notebook(FSPMA_ATP)
note.pack(expand=1, fill=“both”)

#tab0 = ttk.Frame(note)
tabbit = ttk.Frame(note)
tab1 = ttk.Frame(note)
tab2 = ttk.Frame(note)
tab3 = ttk.Frame(note)
tab4 = ttk.Frame(note)
tab5 = ttk.Frame(note)

BIT Test presentation

Label(tabbit, text =“Initial Positions.”,font = (‘Arial’, 14, “bold”)).pack()

Label(tabbit, text ="- The BIT information is used to identify errors, ",font = (‘Arial’, 12)).pack()

Label(tab1, text =" ", font = (‘Arial’, 12, “bold”)).pack()

Test 1 presentation

Label(tab1, text =" ",font = (‘Arial’, 12, “bold”)).pack()

Label(tab1, text =“Test 5.1: Continuity Test.”,font = (‘Arial’, 14, “bold”)).pack()
Label(tab1, text =" ", font = (‘Arial’, 12, “bold”)).pack()
Button(tab1, text=‘Enter’,font = (‘Arial’, 12, “bold”), command = open_testNo1).pack(padx=0, pady=0)

Test 2 presentation

Label(tab2, text =“Test 5.2: Flap Circuit Test.”,font = (‘Arial’, 14, “bold”)).pack()
Label(tab2, text =" ", font = (‘Arial’, 12, “bold”)).pack()
Button(tab2, text=‘Enter’,font = (‘Arial’, 12, “bold”), command = open_testNo1).pack(padx=0, pady=0)

Test 3 presentation

Label(tab3, text =“Test 5.3: Stabilizer Channel.”,font = (‘Arial’, 14, “bold”)).pack()
Label(tab3, text =" ", font = (‘Arial’, 12, “bold”)).pack()
Button(tab3, text=‘Enter’,font = (‘Arial’, 12, “bold”), command = open_testNo1).pack(padx=0, pady=0)

Test 4 presentation

Label(tab4, text =“Test 5.4: Monitor Circuit.”,font = (‘Arial’, 14, “bold”)).pack()
Label(tab4, text =" ", font = (‘Arial’, 12, “bold”)).pack()
Button(tab4, text=‘Enter’,font = (‘Arial’, 12, “bold”), command = open_testNo1).pack(padx=0, pady=0)

Test 5 presentation

Label(tab5, text =“Test 5.5: BITE Circuit.”,font = (‘Arial’, 14, “bold”)).pack()
Label(tab5, text =" ", font = (‘Arial’, 12, “bold”)).pack()
Button(tab5, text=‘Enter’,font = (‘Arial’, 12, “bold”), command = open_testNo1).pack(padx=0, pady=0)

#note.add(tab0, text = “Init. Pos.”)
note.add(tabbit, text = " Initial Positions ", compound=TOP)
note.add(tab1, text = " Test 5.1 ")
note.add(tab2, text = " Test 5.2 ")
note.add(tab3, text = " Test 5.3 ")
note.add(tab4, text = " Test 5.4 ")
note.add(tab5, text = " Test 5.5 ")

note.pack()

def initial_pos():
#Initial Positions…
Message(tab0, text="Initial Positions for FSPMA 285T0099 Family… "
"=================================== "
"- Connect together AC Neutral, DC Ground and J1-25. "
"- Connect 28Vdc to K1-27(H) and J1-26(L). "
"- Connect 115Vac/400Hz to J1-30(H) and J1-29(N). "
"- Connect 5Vac to J1-28(H) and J1-29(L). "
"- HS Arinc 429 Tx1 to J1-2(A) and J1-3(B). "
"- LS Arinc 429 Rx1 to J1-8(A) and J1-9(B). "
"- LS Arinc 429 Rx2 to J1-16(A) and J1-17(B). "
“- ARINC Transmitters and Power Supplies OFF.”,font = (‘Arial’, 10),fg=‘black’, relief=GROOVE).pack(padx=10, pady=10)

def open_testbit():
FSPMA_testbit = Toplevel()
#CDU_testbit.geometry(‘640x300+78+185’)
FSPMA_test1.geometry(‘1590x780+150+178’)
FSPMA_testbit.title(“Initial Positions”)
print(“Initial Positions”)
print(“-----------------------------------------------------”)
print(" This test checks the voltages of the power")
print(" supplies. The DC voltages and annunciator" )
print(" outputs of the power supply are sampled" )
print(" and converted to digital equivalent," )
print(" that are output to the test station." )
print(“-----------------------------------------------------”)
Label(FSPMA_testbit, text =" “,font = (‘Arial’, 14, “bold”)).grid(row=0, column=0, sticky=‘W’)
Label(FSPMA_testbit, text =”- Verify initial positions.“,font = (‘Arial’, 12)).grid(row=3, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Activate ATP mode.“, font = (‘Arial’, 12)).grid(row=4, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Activate LOC1 and LOC2.“,font = (‘Arial’, 12)).grid(row=5, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Apply Power Supplies.“,font = (‘Arial’, 12)).grid(row=6, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Verify unit gets into BIT pocess for a few seconds.“,font = (‘Arial’, 12)).grid(row=7, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” “,font = (‘Arial’, 12)).grid(row=8, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” “,font = (‘Arial’, 12)).grid(row=9, column=2, sticky=‘W’)
skip = Button(FSPMA_testbit, text=” Quit ", font = (‘Arial’, 12, “bold”))
skip [‘command’] = FSPMA_testbit.withdraw
skip.grid(row=14, column=2, sticky=‘E’, padx=2)

cont = Button(FSPMA_testbit, text=“Continue”, font = (‘Arial’, 12, “bold”), command = open_testbit_1).grid(row=14, column=3, sticky=‘W’, padx=2)

def open_testbit_1():
FSPMA_testbit = Toplevel()
FSPMA_testbit.geometry(‘760x380+20+118’)
FSPMA_testbit.title(“Built-In Test. “)
print(“Initial Positions”)
print(”-----------------------------------------------------”)
print(" This test checks the voltages of the power")
print(" supplies. The DC voltages and annunciator" )
print(" outputs of the power supply are sampled" )
print(" and converted to digital equivalent," )
print(" that are output to the test station." )
print(“-----------------------------------------------------”)
Label(FSPMA_testbit, text =" “,font = (‘Arial’, 14, “bold”)).grid(row=0, column=0, sticky=‘W’)
Label(FSPMA_testbit, text =”- Verify initial positions.“,font = (‘Arial’, 12)).grid(row=3, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Activate ATP mode.“, font = (‘Arial’, 12)).grid(row=4, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Activate LOC1 and LOC2.“,font = (‘Arial’, 12)).grid(row=5, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Apply Power Supplies.“,font = (‘Arial’, 12)).grid(row=6, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Verify unit gets into BIT pocess for a few seconds.“,font = (‘Arial’, 12)).grid(row=7, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” (Unit shows black display and certain operation in Annunciators is noted, “,font = (‘Arial’, 9, ‘italic’)).grid(row=8, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” verify unit shows BIT PASS, customer P/N and jump to an empty MENU.“,font = (‘Arial’, 9, ‘italic’)).grid(row=9, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Delay 70 secs minimum.“,font = (‘Arial’, 12)).grid(row=10, column=2, sticky=‘W’)
skip = Button(FSPMA_testbit, text=” Quit ", font = (‘Arial’, 12, “bold”))
skip [‘command’] = FSPMA_testbit.withdraw
skip.grid(row=14, column=2, sticky=‘E’, padx=2)
cont = Button(FSPMA_testbit, text=“Continue”, font = (‘Arial’, 12, “bold”), command = open_testbit_2).grid(row=14, column=3, sticky=‘W’, padx=2)

def open_testbit_2():
FSPMA_testbit = Toplevel()
FSPMA_testbit.geometry(‘760x380+20+118’)
FSPMA_testbit.title(“Built-In Test. “)
print(“BIT.”)
print(”-----------------------------------------------------”)
print(" This test checks the voltages of the power")
print(" supplies. The DC voltages and annunciator" )
print(" outputs of the power supply are sampled" )
print(" and converted to digital equivalent," )
print(" that are output to the test station." )
print(“-----------------------------------------------------”)
Label(FSPMA_testbit, text =" “,font = (‘Arial’, 14, “bold”)).grid(row=0, column=0, sticky=‘W’)
Label(FSPMA_testbit, text =”- Transmitting.“,font = (‘Arial’, 12)).grid(row=3, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Verify display shows some information after MCDU Test,“, font = (‘Arial’, 12)).grid(row=4, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” S/N, ETI, C-BIT, intermittent, faults and power cycles.“,font = (‘Arial’, 12)).grid(row=5, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Verify label 111 is being received.“,font = (‘Arial’, 12)).grid(row=6, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Delay 20 secs minimum.“,font = (‘Arial’, 12)).grid(row=7, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Deactivate ATP mode.“,font = (‘Arial’, 12)).grid(row=8, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”- Press CDU INDEX key.“,font = (‘Arial’, 12)).grid(row=9, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” “,font = (‘Arial’, 12)).grid(row=10, column=2, sticky=‘W’)
skip = Button(FSPMA_testbit, text=” Quit ", font = (‘Arial’, 12, “bold”))
skip [‘command’] = FSPMA_testbit.withdraw
skip.grid(row=14, column=2, sticky=‘E’, padx=2)
cont = Button(FSPMA_testbit, text=“Continue”, font = (‘Arial’, 12, “bold”), command = open_testbit_3).grid(row=14, column=3, sticky=‘W’, padx=2)

def open_testbit_3():
FSPMA_testbit = Toplevel()
FSPMA_testbit.geometry(‘760x380+20+118’)
FSPMA_testbit.title(“Built-In Test. “)
print(“BIT.”)
print(”-----------------------------------------------------”)
print(" This test checks the voltages of the power")
print(" supplies. The DC voltages and annunciator" )
print(" outputs of the power supply are sampled" )
print(" and converted to digital equivalent," )
print(" that are output to the test station." )
print(“-----------------------------------------------------”)
Label(FSPMA_testbit, text =" “,font = (‘Arial’, 14, “bold”)).grid(row=0, column=0, sticky=‘W’)
Label(FSPMA_testbit, text =”- Verify a MENU window is shown, Current Day, Test Spec,“, font = (‘Arial’, 12)).grid(row=3, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” PA1966 for ATLAS 552353-10-01.“, font = (‘Arial’, 12)).grid(row=4, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” PA2206 for ATLAS 557435-05-01.“,font = (‘Arial’, 12)).grid(row=5, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” Model Number: “,font = (‘Arial’, 12)).grid(row=6, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” Test Software PN: “,font = (‘Arial’, 12)).grid(row=7, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” OFP Software PN: “,font = (‘Arial’, 12)).grid(row=8, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =” Route Card OP Number:“, font = (‘Arial’, 12)).grid(row=9, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =”(from this menu some information can be collected to be verifed after “,font = (‘Arial’, 9, ‘italic’)).grid(row=10, column=2, sticky=‘W’)
Label(FSPMA_testbit, text =“during test steps.”,font = (‘Arial’, 9, ‘italic’)).grid(row=11, column=2, sticky=‘W’)
skip = Button(FSPMA_testbit, text=” Quit ", font = (‘Arial’, 12, “bold”))
skip [‘command’] = FSPMA_testbit.withdraw
skip.grid(row=14, column=2, sticky=‘E’, padx=2)
cont = Button(FSPMA_testbit, text=“Continue”, font = (‘Arial’, 12, “bold”), command = donothing).grid(row=14, column=3, sticky=‘W’, padx=2)

def open_testNo1():
FSPMA_test1 = Toplevel()
FSPMA_test1.geometry(‘1590x780+150+168’)
FSPMA_test1.title("Test 5.1: Continuity Test. ")
#Open(1)

print("----------------------------------------------------")
print("Test 5.1: Continuity Test.  ")
print("Measuring resistance between:")
print("RVDT Excitation Signals")  
print("----------------------------------------------------")
print("(101001) pins 7, 9	Required: 0 to 2 ohms        __________")
print("(101002) pins 7, 35	Required: 0 to 2 ohms        __________")
print("(101003) pins 8, 31	Required: 0 to 2 ohms        __________")
print("(101004) pins 8, 10	Required: 0 to 2 ohms        __________")
print("(101005) pins 8, 13	Required: 0 to 2 ohms        __________")
print("(101006) pins 8, 33	Required: 0 to 2 ohms        __________")
print("----------------------------------------------------")
Label(FSPMA_test1, text ="                  Measuring resistance between:                ",font = ('Arial', 14, "bold")).grid(row=0, column=0, sticky='W') 
Label(FSPMA_test1, text ="                                               5.1.1   RVDT Excitation Signals                   ",font = ('Arial', 14, "bold")).grid(row=1, column=1, sticky='W')
Label(FSPMA_test1, text ="______________________________________________________________________________    ",font = ('Arial', 12)).grid(row=3, column=1, sticky='W')
Label(FSPMA_test1, text ="                                                                          ",font = ('Arial', 12)).grid(row=4, column=1, sticky='W')
Label(FSPMA_test1, text ="(101001)  pins 7 and 9		Required: 0 to 2 ohms       =    	 		ohms",font = ('Arial', 12)).grid(row=5, column=1, sticky='W')
Label(FSPMA_test1, text ="(101002)  pins 7 and 35		Required: 0 to 2 ohms       =          		ohms",font = ('Arial', 12)).grid(row=6, column=1, sticky='W')
Label(FSPMA_test1, text ="(101003)  pins 8 and 31		Required: 0 to 2 ohms       =          		ohms",font = ('Arial', 12)).grid(row=7, column=1, sticky='W')
Label(FSPMA_test1, text ="(101004)  pins 8 and 10		Required: 0 to 2 ohms       =          		ohms",font = ('Arial', 12)).grid(row=7, column=1, sticky='W') 
Label(FSPMA_test1, text ="(101005)  pins 8 and 13		Required: 0 to 2 ohms       =          		ohms",font = ('Arial', 12)).grid(row=8, column=1, sticky='W')
Label(FSPMA_test1, text ="(101006)  pins 8 and 33		Required: 0 to 2 ohms       =          		ohms",font = ('Arial', 12)).grid(row=9, column=1, sticky='W')
Label(FSPMA_test1, text ="       									    	    	        	",font = ('Arial', 12)).grid(row=10, column=1, sticky='W')
#Entry(open_testNo1, width=20).grid(row=0, column=1, padx=2, pady=2, sticky='we', columnspan=9)
skip = Button(FSPMA_test1, text="  Quit  ", font = ('Arial', 12, "bold"))
skip ['command'] = FSPMA_test1.withdraw
skip.grid(row=18, column=3,   sticky='E', padx=2)

cont = Button(FSPMA_test1, text=“Continue”, font = (‘Arial’, 12, “bold”), command = donothing).grid(row=14, column=3, sticky=‘W’, padx=2)

What does Python say? I can’t tell because of the messed-up formatting.

It’s your module, you tell us. What error are you getting? Does it do what you expect it to do?

You should put the code between code fences (three backticks on their own line) like this:

```
code goes here
```

otherwise the formatting gets mangled.

ok, let’s do it in this way to see if you can help me
attached is my code, the parts I need in a separate module are FSPMAtest() and open_testNo1()
When I do it I receive an error sometimes saying …the module is not callable…

from tkinter import *
from tkinter import ttk
from tkinter.ttk import Notebook, Style
from tkinter import scrolledtext 
import time
#import serial
from time import sleep
import tkinter as tk
	
def donothing():
   filewin = Toplevel(root)
   filewin.geometry('200x480+0+0')
   button = Button(filewin, text="APAS- ATE (Automatic Test Equipment Report).")
   button.pack()

def kill_test1():
	cdutestwin()

  
def FSPMA_WO_main():     

    FSPMA_WOmain = Toplevel(root)
    FSPMA_WOmain.title('Service Order')
    FSPMA_WOmain.geometry('300x195+200+75')
    FSPMA_WOmain.resizable(False, False)
#   FSPMA_WOmain.overrideredirect(1)  
#	it removes the top badge    
      
    # declaring string variable
    # for storing name and password
    work_var=tk.StringVar()
    serial_var=tk.StringVar()
    tech_var=tk.StringVar() 
    date_var=tk.StringVar() 
      
    # defining a function that will
    # get the name and password and
    # print them on the screen
    def submit():
     
        workorder=work_var.get()
        serial=serial_var.get()
        tech=tech_var.get()
        date=date_var.get()
        
         
        print("W.O: " + workorder)
        print("S/N: " + serial)
        print("Technician: " + tech)
        print("Date: " + date) 
#        work_var.set("")
#        serial_var.set("")
#        if UUT == 1: 
        FSPMAtest()
        
         
    # creating a label for
    # the repair order window
    ro_label = tk.Label(FSPMA_WOmain, text = 'Repair Order Details.', font=('Arial',11, 'normal'))
    blank1_label = tk.Label(FSPMA_WOmain, text = '', font=('Arial',11, 'normal'))
    
    # creating a label for
    # name using widget Label
    work_label = tk.Label(FSPMA_WOmain, text = 'W.O: ', font=('Arial',11, 'normal'))
      
    # creating a entry for input
    # name using widget Entry
    work_entry = tk.Entry(FSPMA_WOmain,textvariable = work_var, font=('Arial',11,'normal'))
      
    # creating a label for password
    serial_label = tk.Label(FSPMA_WOmain, text = 'S/N: ', font = ('Arial',11,'normal'))
      
    # creating a entry for password
    serial_entry=tk.Entry(FSPMA_WOmain, textvariable = serial_var, font = ('Arial',11,'normal'))

    # creating a label for password
    tech_label = tk.Label(FSPMA_WOmain, text = '     Technician: ', font = ('Arial',11,'normal'))
      
    # creating a entry for password
    tech_entry=tk.Entry(FSPMA_WOmain, textvariable = tech_var, font = ('Arial',11,'normal'))  
    
    # creating a label for password
    date_label = tk.Label(FSPMA_WOmain, text = 'Date: ', font = ('Arial',11,'normal'))
  
    # creating a entry for password
    date_entry=tk.Entry(FSPMA_WOmain, textvariable = date_var, font = ('Arial',11,'normal'))    
    blank2_label = tk.Label(FSPMA_WOmain, text = '', font=('Arial',11, 'normal'))  
        
    # creating a button using the widget
    # Button that will call the submit function
    sub_btn=tk.Button(FSPMA_WOmain,text = 'Test Procedure', command = submit)
    
    # creating a button using the widget
    # Button that will call the submit function
    close_btn=tk.Button(FSPMA_WOmain,text = 'Close', command = FSPMA_WOmain.destroy)
      
    # placing the label and entry in
    # the required position using grid method
   
    ro_label.grid(row=0,column=1, sticky='W')
    blank1_label.grid(row=1,column=0)
    work_label.grid(row=2,column=0, sticky='E')
    work_entry.grid(row=2,column=1)
    serial_label.grid(row=3,column=0, sticky='E')
    serial_entry.grid(row=3,column=1)
    tech_label.grid(row=4,column=0, sticky='E')
    tech_entry.grid(row=4,column=1)
    date_label.grid(row=5,column=0, sticky='E')
    date_entry.grid(row=5,column=1)
    blank2_label.grid(row=6,column=0)
    sub_btn.grid(row=7,column=1, sticky='E')
    close_btn.grid(row=7,column=0, sticky='E')
   	
def FSPMAtest():    #this is the code supoosed to be a module, a module test
#   workorder=work_var.get()
#   serial=serial_var.get()
#   tech=tech_var.get()
#   date=date_var.get()
         
#   print("W.O: " + workorder)
#   print("S/N: " + serial)
#   print("Technician: " + tech)
#   print("Date: " + date)	
   print("")   
   print("========================================================================")
   print("APAS- ATE (Automatic Test Equipment Report).")
   print("========================================================================")
   print("LRU:")
   print("Flap/Slat Position Module Assembly                       A/C: B757/767  ")   
   print("P.N: 285T0099-Series ATA 27-58-51       Rev: 39      Dated:May 14/2020  ")    
   print("========================================================================")
   print("")   
   print("Functional Test Specification:")
   print("------------------------------")
   print("The return to service documentation for this unit, is contained")
   print("and available in an End Item Support Index (EISI).") 
   print("This information includes any applicable FTR, ATLAS, or TSDP.")
   print("========================================================================")
   #WOmain.destroy()		
   FSPMA_ATP = Toplevel()

   FSPMA_ATP.geometry('1890x950+10+65')
   FSPMA_ATP.title("Universal ATLAS Acceptance Test Procedure")

   # create a notebook
   note = ttk.Notebook(FSPMA_ATP)   
   note.pack(expand=1, fill="both")
  
   #tab0 = ttk.Frame(note)   
   tabbit = ttk.Frame(note)
   tab1 = ttk.Frame(note)    
   tab2 = ttk.Frame(note)
   tab3 = ttk.Frame(note)
   tab4 = ttk.Frame(note)
   tab5 = ttk.Frame(note)

# BIT Test  presentation 
   Label(tabbit, text ="Initial Positions.",font = ('Arial', 14, "bold")).pack()
#   Label(tabbit, text ="- The BIT information is used to identify errors, ",font = ('Arial', 12)).pack()
#   Label(tab1, text ="  ", font = ('Arial', 12, "bold")).pack()
    
# Test 1 presentation 
#  Label(tab1, text ="                 ",font = ('Arial', 12, "bold")).pack()
   Label(tab1, text ="Test 5.1: 	Continuity Test.",font = ('Arial', 14, "bold")).pack()
   Label(tab1, text ="  						 ", font = ('Arial', 12, "bold")).pack()
   Button(tab1, text='Enter',font = ('Arial', 12, "bold"), command = open_testNo1).pack(padx=0, pady=0)
   
# Test 2 presentation 
   Label(tab2, text ="Test 5.2: 	Flap Circuit Test.",font = ('Arial', 14, "bold")).pack()
   Label(tab2, text ="  						 ", font = ('Arial', 12, "bold")).pack()
   Button(tab2, text='Enter',font = ('Arial', 12, "bold"), command = open_testNo1).pack(padx=0, pady=0)

# Test 3 presentation
   Label(tab3, text ="Test 5.3: 	Stabilizer Channel.",font = ('Arial', 14, "bold")).pack()
   Label(tab3, text ="  						 ", font = ('Arial', 12, "bold")).pack()
   Button(tab3, text='Enter',font = ('Arial', 12, "bold"), command = open_testNo1).pack(padx=0, pady=0)
  
# Test 4 presentation
   Label(tab4, text ="Test 5.4: 	Monitor Circuit.",font = ('Arial', 14, "bold")).pack()
   Label(tab4, text ="  						 ", font = ('Arial', 12, "bold")).pack()
   Button(tab4, text='Enter',font = ('Arial', 12, "bold"), command = open_testNo1).pack(padx=0, pady=0)

# Test 5 presentation
   Label(tab5, text ="Test 5.5: 	BITE Circuit.",font = ('Arial', 14, "bold")).pack()
   Label(tab5, text ="  						 ", font = ('Arial', 12, "bold")).pack()
   Button(tab5, text='Enter',font = ('Arial', 12, "bold"), command = open_testNo1).pack(padx=0, pady=0)
   
   #note.add(tab0, text = "Init. Pos.")
   note.add(tabbit, text = "  Initial Positions   ", compound=TOP)
   note.add(tab1, text = "  Test 5.1     ")
   note.add(tab2, text = "  Test 5.2     ")
   note.add(tab3, text = "  Test 5.3     ")
   note.add(tab4, text = "  Test 5.4     ")
   note.add(tab5, text = "  Test 5.5     ")
   
   note.pack()

def FSPMA_7():
	UUT == 1
	FSPMA_WO_main()
	
def VSC899X():
	UUT == 2
	VSCx_WO_main()

	
def initial_pos():
    #Initial Positions...	
    Message(tab0, text="Initial Positions for FSPMA 285T0099 Family...                                                             "
    "===================================                                                                                          "   
    "- Connect together AC Neutral, DC Ground and J1-25.                                                                          "
    "- Connect 28Vdc to K1-27(H) and J1-26(L).                                                                                    "
    "- Connect 115Vac/400Hz to J1-30(H) and J1-29(N).                                                                             "
    "- Connect 5Vac to J1-28(H) and J1-29(L).                                                                                     "
    "- HS Arinc 429 Tx1 to J1-2(A) and J1-3(B).                                                                                   "
    "- LS Arinc 429 Rx1 to J1-8(A) and J1-9(B).                                                                                   "
    "- LS Arinc 429 Rx2 to J1-16(A) and J1-17(B).                                                                                 "
    "- ARINC Transmitters and Power Supplies OFF.",font = ('Arial', 10),fg='black', relief=GROOVE).pack(padx=10, pady=10)	
    
def open_testbit():
    FSPMA_testbit = Toplevel()
    #CDU_testbit.geometry('640x300+78+185')
    FSPMA_test1.geometry('1590x780+150+178')
    FSPMA_testbit.title("Initial Positions")
    print("Initial Positions")
    print("-----------------------------------------------------")
    print("   This test checks the voltages of the power")
    print("   supplies. The DC voltages and annunciator" )
    print("   outputs of the power supply are sampled"   )
    print("   and converted to digital equivalent,"      )
    print("   that are output to the test station."      )
    print("-----------------------------------------------------")
    Label(FSPMA_testbit, text ="                 ",font = ('Arial', 14, "bold")).grid(row=0, column=0, sticky='W') 
    Label(FSPMA_testbit, text ="- Verify initial positions.",font = ('Arial', 12)).grid(row=3, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Activate ATP mode.", font = ('Arial', 12)).grid(row=4, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Activate LOC1 and LOC2.",font = ('Arial', 12)).grid(row=5, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Apply Power Supplies.",font = ('Arial', 12)).grid(row=6, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Verify unit gets into BIT pocess for a few seconds.",font = ('Arial', 12)).grid(row=7, column=2, sticky='W') 
    Label(FSPMA_testbit, text ="  ",font = ('Arial', 12)).grid(row=8, column=2, sticky='W')
    Label(FSPMA_testbit, text ="                    ",font = ('Arial', 12)).grid(row=9, column=2, sticky='W')
    skip = Button(FSPMA_testbit, text="  Quit  ", font = ('Arial', 12, "bold"))
    skip ['command'] = FSPMA_testbit.withdraw
    skip.grid(row=14, column=2,   sticky='E', padx=2)
#   cont = Button(FSPMA_testbit, text="Continue", font = ('Arial', 12, "bold"), command = open_testbit_1).grid(row=14, column=3, sticky='W', padx=2)

def open_testbit_1():
    FSPMA_testbit = Toplevel()
    FSPMA_testbit.geometry('760x380+20+118')
    FSPMA_testbit.title("Built-In Test.  ")
    print("Initial Positions")
    print("-----------------------------------------------------")
    print("   This test checks the voltages of the power")
    print("   supplies. The DC voltages and annunciator" )
    print("   outputs of the power supply are sampled"   )
    print("   and converted to digital equivalent,"      )
    print("   that are output to the test station."      )
    print("-----------------------------------------------------")
    Label(FSPMA_testbit, text ="                 ",font = ('Arial', 14, "bold")).grid(row=0, column=0, sticky='W') 
    Label(FSPMA_testbit, text ="- Verify initial positions.",font = ('Arial', 12)).grid(row=3, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Activate ATP mode.", font = ('Arial', 12)).grid(row=4, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Activate LOC1 and LOC2.",font = ('Arial', 12)).grid(row=5, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Apply Power Supplies.",font = ('Arial', 12)).grid(row=6, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Verify unit gets into BIT pocess for a few seconds.",font = ('Arial', 12)).grid(row=7, column=2, sticky='W') 
    Label(FSPMA_testbit, text =" (Unit shows black display and certain operation in Annunciators is noted, ",font = ('Arial', 9, 'italic')).grid(row=8, column=2, sticky='W')
    Label(FSPMA_testbit, text =" verify unit shows BIT PASS, customer P/N and jump to an empty MENU.",font = ('Arial', 9, 'italic')).grid(row=9, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Delay 70 secs minimum.",font = ('Arial', 12)).grid(row=10, column=2, sticky='W')
    skip = Button(FSPMA_testbit, text="  Quit  ", font = ('Arial', 12, "bold"))
    skip ['command'] = FSPMA_testbit.withdraw
    skip.grid(row=14, column=2,   sticky='E', padx=2)
    cont = Button(FSPMA_testbit, text="Continue", font = ('Arial', 12, "bold"), command = open_testbit_2).grid(row=14, column=3, sticky='W', padx=2)
 
def open_testbit_2():
    FSPMA_testbit = Toplevel()
    FSPMA_testbit.geometry('760x380+20+118')
    FSPMA_testbit.title("Built-In Test.  ")
    print("BIT.")
    print("-----------------------------------------------------")
    print("   This test checks the voltages of the power")
    print("   supplies. The DC voltages and annunciator" )
    print("   outputs of the power supply are sampled"   )
    print("   and converted to digital equivalent,"      )
    print("   that are output to the test station."      )
    print("-----------------------------------------------------")
    Label(FSPMA_testbit, text ="                 ",font = ('Arial', 14, "bold")).grid(row=0, column=0, sticky='W') 
    Label(FSPMA_testbit, text ="- Transmitting.",font = ('Arial', 12)).grid(row=3, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Verify display shows some information after MCDU Test,", font = ('Arial', 12)).grid(row=4, column=2, sticky='W')
    Label(FSPMA_testbit, text ="   S/N, ETI, C-BIT, intermittent,  faults and power cycles.",font = ('Arial', 12)).grid(row=5, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Verify label 111 is being received.",font = ('Arial', 12)).grid(row=6, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Delay 20 secs minimum.",font = ('Arial', 12)).grid(row=7, column=2, sticky='W') 
    Label(FSPMA_testbit, text ="- Deactivate ATP mode.",font = ('Arial', 12)).grid(row=8, column=2, sticky='W')
    Label(FSPMA_testbit, text ="- Press CDU INDEX key.",font = ('Arial', 12)).grid(row=9, column=2, sticky='W')
    Label(FSPMA_testbit, text ="    ",font = ('Arial', 12)).grid(row=10, column=2, sticky='W')
    skip = Button(FSPMA_testbit, text="  Quit  ", font = ('Arial', 12, "bold"))
    skip ['command'] = FSPMA_testbit.withdraw
    skip.grid(row=14, column=2,   sticky='E', padx=2)
    cont = Button(FSPMA_testbit, text="Continue", font = ('Arial', 12, "bold"), command = open_testbit_3).grid(row=14, column=3, sticky='W', padx=2)
    
def open_testbit_3():
    FSPMA_testbit = Toplevel()
    FSPMA_testbit.geometry('760x380+20+118')
    FSPMA_testbit.title("Built-In Test.  ")
    print("BIT.")
    print("-----------------------------------------------------")
    print("   This test checks the voltages of the power")
    print("   supplies. The DC voltages and annunciator" )
    print("   outputs of the power supply are sampled"   )
    print("   and converted to digital equivalent,"      )
    print("   that are output to the test station."      )
    print("-----------------------------------------------------")
    Label(FSPMA_testbit, text ="                 ",font = ('Arial', 14, "bold")).grid(row=0, column=0, sticky='W') 
    Label(FSPMA_testbit, text ="- Verify a MENU window is shown, Current Day, Test Spec,", font = ('Arial', 12)).grid(row=3, column=2, sticky='W')
    Label(FSPMA_testbit, text ="  PA1966 for ATLAS 552353-10-01.", font = ('Arial', 12)).grid(row=4, column=2, sticky='W')
    Label(FSPMA_testbit, text ="  PA2206 for ATLAS 557435-05-01.",font = ('Arial', 12)).grid(row=5, column=2, sticky='W')
    Label(FSPMA_testbit, text ="  Model Number:     ",font = ('Arial', 12)).grid(row=6, column=2, sticky='W')
    Label(FSPMA_testbit, text ="  Test Software PN:   ",font = ('Arial', 12)).grid(row=7, column=2, sticky='W') 
    Label(FSPMA_testbit, text ="  OFP Software PN:    ",font = ('Arial', 12)).grid(row=8, column=2, sticky='W')
    Label(FSPMA_testbit, text ="  Route Card OP Number:", font = ('Arial', 12)).grid(row=9, column=2, sticky='W')
    Label(FSPMA_testbit, text ="(from this menu some information can be collected to be verifed after ",font = ('Arial', 9, 'italic')).grid(row=10, column=2, sticky='W')
    Label(FSPMA_testbit, text ="during test steps.",font = ('Arial', 9, 'italic')).grid(row=11, column=2, sticky='W')
    skip = Button(FSPMA_testbit, text="  Quit  ", font = ('Arial', 12, "bold"))
    skip ['command'] = FSPMA_testbit.withdraw
    skip.grid(row=14, column=2,   sticky='E', padx=2)
    cont = Button(FSPMA_testbit, text="Continue", font = ('Arial', 12, "bold"), command = donothing).grid(row=14, column=3, sticky='W', padx=2)

def open_testNo1():
    FSPMA_test1 = Toplevel()
    FSPMA_test1.geometry('1590x780+150+168')
    FSPMA_test1.title("Test 5.1: Continuity Test.  ")
    #Open(1)
    
    print("----------------------------------------------------")
    print("Test 5.1: Continuity Test.  ")
    print("Measuring resistance between:")
    print("RVDT Excitation Signals")  
    print("----------------------------------------------------")
    print("(101001) pins 7, 9	Required: 0 to 2 ohms        __________")
    print("(101002) pins 7, 35	Required: 0 to 2 ohms        __________")
    print("(101003) pins 8, 31	Required: 0 to 2 ohms        __________")
    print("(101004) pins 8, 10	Required: 0 to 2 ohms        __________")
    print("(101005) pins 8, 13	Required: 0 to 2 ohms        __________")
    print("(101006) pins 8, 33	Required: 0 to 2 ohms        __________")
    print("----------------------------------------------------")
    Label(FSPMA_test1, text ="                  Measuring resistance between:                ",font = ('Arial', 14, "bold")).grid(row=0, column=0, sticky='W') 
    Label(FSPMA_test1, text ="                                               5.1.1   RVDT Excitation Signals                   ",font = ('Arial', 14, "bold")).grid(row=1, column=1, sticky='W')
    Label(FSPMA_test1, text ="______________________________________________________________________________    ",font = ('Arial', 12)).grid(row=3, column=1, sticky='W')
    Label(FSPMA_test1, text ="                                                                          ",font = ('Arial', 12)).grid(row=4, column=1, sticky='W')
    Label(FSPMA_test1, text ="(101001)  pins 7 and 9		Required: 0 to 2 ohms       =    	 		ohms",font = ('Arial', 12)).grid(row=5, column=1, sticky='W')
    Label(FSPMA_test1, text ="(101002)  pins 7 and 35		Required: 0 to 2 ohms       =          		ohms",font = ('Arial', 12)).grid(row=6, column=1, sticky='W')
    Label(FSPMA_test1, text ="(101003)  pins 8 and 31		Required: 0 to 2 ohms       =          		ohms",font = ('Arial', 12)).grid(row=7, column=1, sticky='W')
    Label(FSPMA_test1, text ="(101004)  pins 8 and 10		Required: 0 to 2 ohms       =          		ohms",font = ('Arial', 12)).grid(row=7, column=1, sticky='W') 
    Label(FSPMA_test1, text ="(101005)  pins 8 and 13		Required: 0 to 2 ohms       =          		ohms",font = ('Arial', 12)).grid(row=8, column=1, sticky='W')
    Label(FSPMA_test1, text ="(101006)  pins 8 and 33		Required: 0 to 2 ohms       =          		ohms",font = ('Arial', 12)).grid(row=9, column=1, sticky='W')
    Label(FSPMA_test1, text ="       									    	    	        	",font = ('Arial', 12)).grid(row=10, column=1, sticky='W')
    #Entry(open_testNo1, width=20).grid(row=0, column=1, padx=2, pady=2, sticky='we', columnspan=9)
    skip = Button(FSPMA_test1, text="  Quit  ", font = ('Arial', 12, "bold"))
    skip ['command'] = FSPMA_test1.withdraw
    skip.grid(row=18, column=3,   sticky='E', padx=2)
#    cont = Button(FSPMA_test1, text="Continue", font = ('Arial', 12, "bold"), command = donothing).grid(row=14, column=3, sticky='W', padx=2)

def open_testNo2():
    FSPMA_test2 = Toplevel()
    FSPMA_test1.geometry('1590x780+150+178')
    FSPMA_test2.title("Test No2: Keyboard Test.  ")
    print("Test No.2 Power Supply.")
    print("-----------------------------------------------------")
    print("   This test checks the voltages of the power")
    print("   supplies. The DC voltages and annunciator" )
    print("   outputs of the power supply are sampled"   )
    print("   and converted to digital equivalent,"      )
    print("   that are output to the test station."      )
    print("-----------------------------------------------------")
    Label(FSPMA_test2, text ="                 ",font = ('Arial', 14, "bold")).grid(row=0, column=0, sticky='W') 
    Label(FSPMA_test2, text ="                 ",font = ('Arial', 14, "bold")).grid(row=0, column=1, sticky='W')
    Label(FSPMA_test2, text ="- Verify KEYBOARD panel is uniformly illuminated.", font = ('Arial', 12)).grid(row=3, column=2, sticky='W')
    Label(FSPMA_test2, text ="                                     ",font = ('Arial', 12)).grid(row=4, column=2, sticky='W')
    Label(FSPMA_test2, text ="                                     ",font = ('Arial', 12)).grid(row=5, column=2, sticky='W')
    Label(FSPMA_test2, text ="                                     ",font = ('Arial', 12)).grid(row=6, column=2, sticky='W')
    Label(FSPMA_test2, text ="                                    ", font = ('Arial', 12)).grid(row=7, column=2, sticky='W')
    Label(FSPMA_test2, text ="                                     ",font = ('Arial', 12)).grid(row=8, column=2, sticky='W')
    Label(FSPMA_test2, text ="                                        ",font = ('Arial', 12)).grid(row=9, column=2, sticky='W')
    Label(FSPMA_test2, text ="                                    ",font = ('Arial', 12)).grid(row=10, column=2, sticky='W') 
    Label(FSPMA_test2, text ="                                 ",font = ('Arial', 12)).grid(row=11, column=2, sticky='W')
    #Label(FSPMA_test2, text ="                                 ",font = ('Arial', 12)).grid(row=12, column=2, sticky='W')
    skip = Button(FSPMA_test2, text="  Quit ", font = ('Arial', 12, "bold"))
    skip ['command'] = FSPMA_test2.withdraw
    skip.grid(row=14, column=2, sticky='E', padx=2)
#    cont = Button(FSPMA_test1, text="Continue", font = ('Arial', 12, "bold"), command = donothing).grid(row=14, column=3, sticky='W', padx=2)

def open_testNo3():
    FSPMA_test3 = Toplevel()
    FSPMA_test1.geometry('1590x780+150+178')
    FSPMA_test3.title("Test No3: -Retrieve Failure History Test.  ")
    print("Test No.3 Retrieve Failure History.")
    print("-----------------------------------------------------")
    print("   This test checks the voltages of the power")
    print("   supplies. The DC voltages and annunciator" )
    print("   outputs of the power supply are sampled"   )
    print("   and converted to digital equivalent,"      )
    print("   that are output to the test station."      )
    print("-----------------------------------------------------")
    Label(FSPMA_test3, text ="                 ",font = ('Arial', 14, "bold")).grid(row=0, column=0, sticky='W') 
    Label(FSPMA_test3, text ="                 ",font = ('Arial', 14, "bold")).grid(row=0, column=1, sticky='W')
    Label(FSPMA_test3, text ="      **************************************",font = ('Arial', 12)).grid(row=3, column=2, sticky='W')
    Label(FSPMA_test3, text ="         This test is not recommended       ",font = ('Arial', 12)).grid(row=4, column=2, sticky='W')
    Label(FSPMA_test3, text ="           for initial field returns units. ",font = ('Arial', 12)).grid(row=5, column=2, sticky='W')
    Label(FSPMA_test3, text ="      **************************************",font = ('Arial', 12)).grid(row=6, column=2, sticky='W')
    Label(FSPMA_test3, text ="                                      ", font = ('Arial', 12)).grid(row=7, column=2, sticky='W')
    Label(FSPMA_test3, text ="                                      ",font = ('Arial', 12)).grid(row=8, column=2, sticky='W')
    Label(FSPMA_test3, text ="   Do you really want to clear the history?",font = ('Arial', 12)).grid(row=9, column=2, sticky='W')
    Label(FSPMA_test3, text ="                                   ",font = ('Arial', 12)).grid(row=10, column=2, sticky='W') 
    Label(FSPMA_test3, text ="                                 ",font = ('Arial', 12)).grid(row=11, column=2, sticky='W')
    #Label(FSPMA_test3, text ="                                 ",font = ('Arial', 12)).grid(row=12, column=2, sticky='W')
    skip = Button(FSPMA_test3, text="  Quit  ", font = ('Arial', 12, "bold"))
    skip ['command'] = FSPMA_test3.withdraw
    skip.grid(row=14, column=2,   sticky='E', padx=2)
    cont = Button(FSPMA_test3, text="Continue", font = ('Arial', 12, "bold"), command = open_testNo31).grid(row=14, column=3, sticky='W', padx=2)


def open_testNo31():
    FSPMA_test31 = Toplevel()
    FSPMA_test31.geometry('760x380+20+118')
    FSPMA_test31.title("Retrieving Failure History Test.  ")
    print("   Retrieving Failure History Test.          ")
    print("-----------------------------------------------------")
    print("   This test checks the voltages of the power")
    print("   supplies. The DC voltages and annunciator" )
    print("   outputs of the power supply are sampled"   )
    print("   and converted to digital equivalent,"      )
    print("   that are output to the test station."      )
    print("-----------------------------------------------------")
    Label(FSPMA_test31, text ="                 ",font = ('Arial', 14, "bold")).grid(row=0, column=0, sticky='W') 
    Label(FSPMA_test31, text ="                 ",font = ('Arial', 14, "bold")).grid(row=0, column=1, sticky='W')
    Label(FSPMA_test31, text ="      ******************************************",font = ('Arial', 12)).grid(row=3, column=2, sticky='W')
    Label(FSPMA_test31, text ="            performing ERASEFAILHIST       ",font = ('Arial', 12)).grid(row=4, column=2, sticky='W')
    Label(FSPMA_test31, text ="      ******************************************",font = ('Arial', 12)).grid(row=5, column=2, sticky='W')
    Label(FSPMA_test31, text ="                                         ",font = ('Arial', 12)).grid(row=6, column=2, sticky='W')
    Label(FSPMA_test31, text ="                                      ", font = ('Arial', 12)).grid(row=7, column=2, sticky='W')
    Label(FSPMA_test31, text ="                                      ",font = ('Arial', 12)).grid(row=8, column=2, sticky='W')
    Label(FSPMA_test31, text ="                performing GETHISTINFO    ",font = ('Arial', 12)).grid(row=9, column=2, sticky='W')
    Label(FSPMA_test31, text ="                                   ",font = ('Arial', 12)).grid(row=10, column=2, sticky='W') 
    Label(FSPMA_test31, text ="                                 ",font = ('Arial', 12)).grid(row=11, column=2, sticky='W')
    #Label(FSPMA_test31, text ="                                 ",font = ('Arial', 12)).grid(row=12, column=2, sticky='W')
    skip = Button(FSPMA_test31, text="  Quit  ", font = ('Arial', 12, "bold"))
    skip ['command'] = FSPMA_test31.withdraw
    skip.grid(row=14, column=2,   sticky='E', padx=2)
#    cont = Button(FSPMA_test31, text="Continue", font = ('Arial', 12, "bold"), command = donothing).grid(row=14, column=3, sticky='W', padx=2)
  
def ending_session():
   print("==================================================")
   print("Closing session.....")
   print("\n")
   print("...Bye")
   print("\n")
   print("==================================================")
   from tkinter import messagebox
   messagebox.showinfo(message='Have a good day')
   
#======================================================================
#Main window
root = Tk()
# Add a title, size and disabling resize
#root.geometry('800x480+0+0')
root.geometry('1920x1080+0+0')
root.title('APAS - ATE (Automatic Test Equipment)                                                                                                 CRS #IXSR602L')
UUT = IntVar()

#Main menu
#===============================================================================================
menubar = Menu(root)
atpmenu = Menu(menubar, tearoff=0)
FSPMAmenu = Menu(atpmenu, tearoff=0)
VSCmenu = Menu(atpmenu, tearoff=0)

FSPMAmenu.add_command(label='285T0099-7',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-7 MOD A',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-12',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-12 MOD A',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-13',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-13 MOD A',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-13 MOD B',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-15',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-15 MOD A',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-17',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-17 MOD A',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-17 MOD B',font = ('Arial', 12, "bold"), command=FSPMA_7)
FSPMAmenu.add_command(label='285T0099-17 MOD C',font = ('Arial', 12, "bold"), command=FSPMA_7)
atpmenu.add_cascade(label="285T0099",font = ('Arial', 12, "bold"), menu=FSPMAmenu)

#VSCmenu.add_command(label='VSC8991',font = ('Arial', 12, "bold"), command=VSC899X)
#VSCmenu.add_command(label='VSC8992',font = ('Arial', 12, "bold"), command=VSC899X)
#VSCmenu.add_command(label='VSC8993',font = ('Arial', 12, "bold"), command=VSC899X)
#VSCmenu.add_command(label='VSC8994',font = ('Arial', 12, "bold"), command=VSC899X)
#atpmenu.add_cascade(label="VSC8992",font = ('Arial', 12, "bold"), menu=VSCmenu)

menubar.add_cascade(label="New Session",font = ('Arial', 12, "bold"), menu=atpmenu)

reportmenu = Menu(menubar, tearoff=0)
reportmenu.add_command(label="Search",font = ('Arial', 12, "bold"), command=donothing)
reportmenu.add_command(label="Send by email",font = ('Arial', 12, "bold"), command=donothing)
menubar.add_cascade(label="Saved Sessions",font = ('Arial', 12, "bold"), menu=reportmenu)

helpmenu = Menu(menubar, tearoff=0)
helpmenu.add_command(label="Help Index",font = ('Arial', 12, "bold"), command=donothing)
helpmenu.add_command(label="About...",font = ('Arial', 12, "bold"), command=donothing)
menubar.add_cascade(label="Help",font = ('Arial', 12, "bold"), menu=helpmenu)

root.config(menu=menubar)
root.mainloop()


It’s not possible to call a module. However, you can import a function from the module and then call it.

Did you run the code?
As you can see what I need is to cut my code in parts, one being the main part and the others to be run on demand
How can I do it?