Ejemplo n.º 1
0
def extrDataDialog(initial=[]):
    win = Toplevel()
    win.title('Select Paths for Data Extraction')
    toolbar = Frame(win)
    toolbar.pack(side=BOTTOM)
    col = Frame(win)
    col.pack(expand=YES, fill=X)
    raw_path = Dirbar(extr_opts[1][1][0],
                      widthB=max_len,
                      name='raw',
                      parent=col,
                      expand=YES,
                      fill=X,
                      side=TOP,
                      padx=15)
    sur_file = Dirbar(extr_opts[1][1][1],
                      widthB=max_len,
                      name='sur',
                      parent=col,
                      expand=YES,
                      fill=X,
                      DorF='file',
                      side=BOTTOM,
                      padx=15)
    rstCmd = (lambda arg1=raw_path, arg2=sur_file: \
              Restart([arg1, arg2], ('mode','Data Extraction'), win))
    Button(toolbar, text='OK', command=win.destroy).pack(side=LEFT)
    Button(toolbar, text='BACK', command=rstCmd).pack(side=RIGHT)
    for item in [raw_path, sur_file]:
        setInitial(item, initial)
    win.grab_set()
    win.focus_set()  # go modal: mouse grab, key focus, wiat
    win.wait_window()  # wait till destroy; else returns now
    return raw_path.get_loc(), sur_file.get_loc()
Ejemplo n.º 2
0
def extrPinsDialog(initial=[]):
    win = Toplevel()
    win.title('Select Paths for Pin Extraction')
    toolbar = Frame(win)
    toolbar.pack(side=BOTTOM)
    col = Frame(win)

    raw_path = Dirbar(extr_opts[0][1][0],
                      widthB=max_len,
                      name='raw',
                      parent=col,
                      expand=YES,
                      fill=X,
                      side=TOP,
                      padx=15)
    sur_file = Dirbar(extr_opts[0][1][1],
                      widthB=max_len,
                      name='sur',
                      parent=col,
                      expand=YES,
                      fill=X,
                      DorF='file',
                      side=TOP,
                      padx=15)
    out_dir = Dirbar(extr_opts[0][1][2],
                     widthB=max_len,
                     name='outd',
                     parent=col,
                     expand=YES,
                     fill=X,
                     padx=15)
    out_file = Dirbar(extr_opts[0][1][3],
                      widthB=max_len,
                      name='outf',
                      parent=col,
                      expand=YES,
                      fill=X,
                      DorF=None,
                      side=BOTTOM,
                      padx=15)
    chk = Checkbar(parent=win, picks=['MF', 'USAMP', 'TSN'])
    for item in [raw_path, sur_file, out_dir, out_file]:
        setInitial(item, initial)
    rstCmd = (lambda arg1=raw_path, arg2=sur_file,
              arg3=out_dir, arg4=out_file: \
              Restart([arg1, arg2, arg3, arg4], ('mode','Pin Extraction'), win))
    Button(toolbar, text='OK', command=win.destroy).pack(side=LEFT)
    Button(toolbar, text='BACK', command=rstCmd).pack(side=RIGHT)

    chk.pack(side=LEFT, padx=15)
    col.pack(expand=YES, fill=X)
    win.grab_set()
    win.focus_set()  # go modal: mouse grab, key focus, wiat
    win.wait_window()  # wait till destroy; else returns now
    return raw_path.get_loc(), sur_file.get_loc(),\
           os.path.join(out_dir.get_loc(), out_file.get_loc()),\
           chk.state()
Ejemplo n.º 3
0
def extrDataDialog(initial=[]):
    win = Toplevel()
    win.title('Select Paths for Data Extraction')
    toolbar = Frame(win)
    toolbar.pack(side=BOTTOM)
    col = Frame(win)
    col.pack(expand=YES, fill=X)
    raw_path = Dirbar(extr_opts[1][1][0], widthB=max_len, name='raw',
                      parent=col, expand=YES, fill=X, side=TOP, padx=15)
    sur_file = Dirbar(extr_opts[1][1][1], widthB=max_len, name='sur',
                      parent=col,expand=YES, fill=X, DorF='file',
                      side=BOTTOM, padx=15)
    rstCmd = (lambda arg1=raw_path, arg2=sur_file: \
              Restart([arg1, arg2], ('mode','Data Extraction'), win))
    Button(toolbar, text='OK', command=win.destroy).pack(side=LEFT)
    Button(toolbar, text='BACK', command=rstCmd).pack(side=RIGHT)
    for item in [raw_path, sur_file]:
        setInitial(item, initial)    
    win.grab_set()
    win.focus_set()                 # go modal: mouse grab, key focus, wiat
    win.wait_window()               # wait till destroy; else returns now
    return raw_path.get_loc(), sur_file.get_loc()
Ejemplo n.º 4
0
def extrPinsDialog(initial=[]):
    win = Toplevel()
    win.title('Select Paths for Pin Extraction')
    toolbar = Frame(win)
    toolbar.pack(side=BOTTOM)
    col = Frame(win)
    
    raw_path = Dirbar(extr_opts[0][1][0], widthB=max_len, name='raw',
                      parent=col, expand=YES, fill=X,
                      side=TOP, padx=15)
    sur_file = Dirbar(extr_opts[0][1][1], widthB=max_len, name='sur',
                      parent=col,expand=YES, fill=X, DorF='file',
                      side=TOP, padx=15)
    out_dir = Dirbar(extr_opts[0][1][2], widthB=max_len, name='outd',
                      parent=col, expand=YES, fill=X, padx=15)
    out_file = Dirbar(extr_opts[0][1][3], widthB=max_len, name='outf',
                      parent=col,expand=YES, fill=X, DorF=None,
                      side=BOTTOM, padx=15)
    chk = Checkbar(parent=win,
                   picks=['MF', 'USAMP', 'TSN'])
    for item in [raw_path, sur_file, out_dir, out_file]:
        setInitial(item, initial)
    rstCmd = (lambda arg1=raw_path, arg2=sur_file,
              arg3=out_dir, arg4=out_file: \
              Restart([arg1, arg2, arg3, arg4], ('mode','Pin Extraction'), win))
    Button(toolbar, text='OK', command=win.destroy).pack(side=LEFT)
    Button(toolbar, text='BACK', command=rstCmd).pack(side=RIGHT)
    
    chk.pack(side=LEFT, padx=15)
    col.pack(expand=YES, fill=X)
    win.grab_set()
    win.focus_set()                 # go modal: mouse grab, key focus, wiat
    win.wait_window()               # wait till destroy; else returns now
    return raw_path.get_loc(), sur_file.get_loc(),\
           os.path.join(out_dir.get_loc(), out_file.get_loc()),\
           chk.state()