@ -3,6 +3,7 @@
A mobile first interface for the standard unix password manager written in python
A mobile first interface for the standard unix password manager written in python
"""
"""
import os
import os
from typing import Union
import wx
import wx
import wx . lib . scrolledpanel as scrolled
import wx . lib . scrolledpanel as scrolled
@ -28,6 +29,7 @@ class PassUi(wx.Frame):
"""
"""
self . sizer . Clear ( delete_windows = True )
self . sizer . Clear ( delete_windows = True )
func ( self , * wrapper_args )
func ( self , * wrapper_args )
self . pnl . SetupScrolling ( )
self . sizer . Layout ( )
self . sizer . Layout ( )
return wrapper
return wrapper
@ -39,12 +41,12 @@ class PassUi(wx.Frame):
: param kw :
: param kw :
"""
"""
super ( ) . __init__ ( * args , * * kw )
super ( ) . __init__ ( * args , * * kw )
self . pass_handler = Pass ( )
self . pass_handler : Pass = Pass ( )
# create a panel in the frame
# create a panel in the frame
self . pnl = scrolled . ScrolledPanel ( self , - 1 , style = wx . VSCROLL )
self . pnl : wx . lib . scrolledpanel . ScrolledPanel = scrolled . ScrolledPanel ( self , - 1 , style = wx . VSCROLL )
self . pnl . SetupScrolling ( )
self . pnl . SetupScrolling ( )
# and create a sizer to manage the layout of child widgets
# and create a sizer to manage the layout of child widgets
self . sizer = wx . BoxSizer ( wx . VERTICAL )
self . sizer : wx . BoxSizer = wx . BoxSizer ( wx . VERTICAL )
self . pnl . SetSizer ( self . sizer )
self . pnl . SetSizer ( self . sizer )
self . add_buttons ( )
self . add_buttons ( )
@ -53,57 +55,56 @@ class PassUi(wx.Frame):
""" add_buttons. """
""" add_buttons. """
self . add_tools ( )
self . add_tools ( )
if self . pass_handler . cur_dir != self . pass_handler . top_dir :
if self . pass_handler . cur_dir != self . pass_handler . top_dir :
btn = self . make_back_button ( )
btn : wx . Button = self . make_back_button ( )
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON ,
self . Bind ( wx . EVT_BUTTON ,
lambda event : self . path_button_clicked ( ) , btn )
lambda event : self . path_button_clicked ( ) , btn )
index = 0
index : int = 0
for c path in self . pass_handler . cur_paths :
for c _ path in self . pass_handler . cur_paths :
if c path != self . pass_handler . cur_dir :
if c _ path != self . pass_handler . cur_dir :
label = ' 🗀 ' + os . path . basename ( os . path . normpath ( c path) )
label : str = ' 🗀 ' + os . path . basename ( os . path . normpath ( c _ path) )
btn = wx . Button ( self . pnl , label = label )
btn : wx . Button = wx . Button ( self . pnl , label = label )
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON ,
self . Bind ( wx . EVT_BUTTON ,
lambda event , path = c path: self . path_button_clicked (
lambda event , path = c _ path: self . path_button_clicked (
path ) ,
path ) ,
btn )
btn )
index = index + 1
index = index + 1
index = 0
index = 0
for password in self . pass_handler . cur_passwords :
for password in self . pass_handler . cur_passwords :
label = ' 🗝 ' + os . path . splitext (
label : str = ' 🗝 ' + os . path . splitext (
os . path . basename ( os . path . normpath ( password ) ) ) [ 0 ]
os . path . basename ( os . path . normpath ( password ) ) ) [ 0 ]
btn = wx . Button ( self . pnl , label = label )
btn : wx . Button = wx . Button ( self . pnl , label = label )
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON ,
self . Bind ( wx . EVT_BUTTON ,
lambda event , m index= index : self . password_button_clicked (
lambda event , m _ index= index : self . password_button_clicked (
m index) ,
m _ index) ,
btn )
btn )
index = index + 1
index = index + 1
self . pnl . SetupScrolling ( )
def add_push_pull ( self ) :
def add_push_pull ( self ) :
""" add_push_pull. """
""" add_push_pull. """
push btn = wx . Button ( self . pnl , label = " Push to remote " )
push _ btn: wx . Butto n = wx . Button ( self . pnl , label = " Push to remote " )
self . sizer . Add ( push btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( push _ btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON , lambda event : pass_push ( ) , push btn)
self . Bind ( wx . EVT_BUTTON , lambda event : pass_push ( ) , push _ btn)
pull btn = wx . Button ( self . pnl , label = " Pull from remote " )
pull _ btn: wx . Butto n = wx . Button ( self . pnl , label = " Pull from remote " )
self . sizer . Add ( pull btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( pull _ btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON , lambda event : pass_pull ( ) , pull btn)
self . Bind ( wx . EVT_BUTTON , lambda event : pass_pull ( ) , pull _ btn)
def add_tools ( self , index = None ) :
def add_tools ( self , index : Union [ None , int ] = None ) :
""" add_tools.
""" add_tools.
: param index :
: param index :
"""
"""
btn = wx . Button ( self . pnl , label = " Show tools " )
btn : wx . Button = wx . Button ( self . pnl , label = " Show tools " )
font = btn . GetFont ( ) . MakeBold ( )
font : wx . Font = btn . GetFont ( ) . MakeBold ( )
btn . SetFont ( font )
btn . SetFont ( font )
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON ,
self . Bind ( wx . EVT_BUTTON ,
lambda event , m index= index : self . show_tools ( m index) ,
lambda event , m _ index= index : self . show_tools ( m _ index) ,
btn )
btn )
def back_button_clicked ( self , index = None ) :
def back_button_clicked ( self , index : Union [ None , int ] = None ) :
""" back_button_clicked.
""" back_button_clicked.
: param index :
: param index :
@ -113,45 +114,45 @@ class PassUi(wx.Frame):
else :
else :
self . add_buttons ( )
self . add_buttons ( )
def delete_password ( self , index ):
def delete_password ( self , index : int ):
""" delete_password.
""" delete_password.
: param index :
: param index :
"""
"""
path = self . pass_handler . get_pass_path_from_index ( index , " password " )
path : str = self . pass_handler . get_pass_path_from_index ( index , " password " )
dlg = wx . MessageDialog ( self . pnl ,
dlg : wx . MessageDialog = wx . MessageDialog ( self . pnl ,
" Delete " + path + " ? " ,
" Delete " + path + " ? " ,
" Are you sure? " ,
" Are you sure? " ,
style = wx . CANCEL | wx . CANCEL_DEFAULT | wx . OK )
style = wx . CANCEL | wx . CANCEL_DEFAULT | wx . OK )
dlg . SetOKCancelLabels ( " &Yes " , " &Don ' t delete " )
dlg . SetOKCancelLabels ( " &Yes " , " &Don ' t delete " )
reply = dlg . ShowModal ( )
reply : int = dlg . ShowModal ( )
if reply == wx . ID_CANCEL :
if reply == wx . ID_CANCEL :
return
return
self . pass_handler . delete_password ( path )
self . pass_handler . delete_password ( path )
self . back_button_clicked ( )
self . back_button_clicked ( )
def make_back_button ( self , index = None ) :
def make_back_button ( self , index : Union [ None , int ] = None ) - > wx . Button :
""" make_back_button.
""" make_back_button.
: param index :
: param index :
"""
"""
if index is not None :
if index is not None :
label = self . pass_handler . get_pass_path_from_index ( index , " password " )
label : str = self . pass_handler . get_pass_path_from_index ( index , " password " )
else :
else :
label = self . pass_handler . cur_dir . replace ( self . pass_handler . top_dir , ' ' )
label : str = self . pass_handler . cur_dir . replace ( self . pass_handler . top_dir , ' ' )
btn = wx . Button ( self . pnl , label = label + ' ⤴ ' )
btn : wx . Button = wx . Button ( self . pnl , label = label + ' ⤴ ' )
font = btn . GetFont ( ) . MakeItalic ( ) . MakeBold ( )
font : wx . Font = btn . GetFont ( ) . MakeItalic ( ) . MakeBold ( )
btn . SetFont ( font )
btn . SetFont ( font )
return btn
return btn
def password_button_clicked ( self , index ):
def password_button_clicked ( self , index : int ):
""" password_button_clicked.
""" password_button_clicked.
: param index :
: param index :
"""
"""
self . show_password_dialog ( index )
self . show_password_dialog ( index )
def path_button_clicked ( self , path = None ) :
def path_button_clicked ( self , path : Union [ None , str ] = None ) :
""" path_button_clicked.
""" path_button_clicked.
: param path :
: param path :
@ -163,42 +164,42 @@ class PassUi(wx.Frame):
self . pass_handler . cur_passwords = self . pass_handler . get_pass_passwords ( )
self . pass_handler . cur_passwords = self . pass_handler . get_pass_passwords ( )
self . add_buttons ( )
self . add_buttons ( )
def save_to_pass ( self , path , text , name = None ) :
def save_to_pass ( self , path : str , text : wx . TextCtrl , name : Union [ None , wx . TextCtrl ] = None ) :
""" save_to_pass.
""" save_to_pass.
: param path :
: param path :
: param text :
: param text :
: param name :
: param name :
"""
"""
full path = os . path . dirname ( self . pass_handler . top_dir + ' / ' + path . lstrip ( ' / ' ) )
full _ path: str = os . path . dirname ( self . pass_handler . top_dir + ' / ' + path . lstrip ( ' / ' ) )
if name is not None :
if name is not None :
path = name . GetLineText ( 0 )
path : str = name . GetLineText ( 0 )
full path = os . path . dirname ( self . pass_handler . top_dir + ' / ' + path . lstrip ( ' / ' ) )
full _ path: str = os . path . dirname ( self . pass_handler . top_dir + ' / ' + path . lstrip ( ' / ' ) )
filename = full path + ' .gpg '
filename : str = full _ path + ' .gpg '
if os . path . exists ( full path) or os . path . exists ( filename ) :
if os . path . exists ( full _ path) or os . path . exists ( filename ) :
dlg = wx . MessageDialog (
dlg : wx . MessageDialog = wx . MessageDialog (
self . pnl ,
self . pnl ,
" Path: " + path +
" Path: " + path +
" al l ready exists! Please update password path" ,
" al ready exists! Please update password path" ,
" Error " ,
" Error " ,
style = wx . OK )
style = wx . OK )
dlg . ShowModal ( )
dlg . ShowModal ( )
reply = wx . ID_CANCEL
reply : int = wx . ID_CANCEL
else :
else :
dlg = wx . MessageDialog ( self . pnl ,
dlg : wx . MessageDialog = wx . MessageDialog ( self . pnl ,
" Save to " + path + " ? " ,
" Save to " + path + " ? " ,
" Are you sure? " ,
" Are you sure? " ,
style = wx . CANCEL | wx . CANCEL_DEFAULT | wx . OK )
style = wx . CANCEL | wx . CANCEL_DEFAULT | wx . OK )
dlg . SetOKCancelLabels ( " &Yes " , " &Don ' t save " )
dlg . SetOKCancelLabels ( " &Yes " , " &Don ' t save " )
reply = dlg . ShowModal ( )
reply : int = dlg . ShowModal ( )
if reply == wx . ID_CANCEL :
if reply == wx . ID_CANCEL :
return
return
password = str ( )
password : str = str ( )
for line no in range ( text . GetNumberOfLines ( ) ) :
for line _ no in range ( text . GetNumberOfLines ( ) ) :
password + = text . GetLineText ( line no)
password + = text . GetLineText ( line _ no)
password + = ' \n '
password + = ' \n ' # FIXME: Is this right? Maybe we break stuff with the trailing newline?
self . pass_handler . save_to_pass ( password , path , full path)
self . pass_handler . save_to_pass ( password , path , full _ path)
self . back_button_clicked ( )
self . back_button_clicked ( )
@redraw
@redraw
@ -206,134 +207,130 @@ class PassUi(wx.Frame):
""" show_new_dialog.
""" show_new_dialog.
"""
"""
pass path = self . pass_handler . cur_dir . replace ( self . pass_handler . top_dir , ' ' )
pass _ path: str = self . pass_handler . cur_dir . replace ( self . pass_handler . top_dir , ' ' )
btn = self . make_back_button ( )
btn : wx . Button = self . make_back_button ( )
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON ,
self . Bind ( wx . EVT_BUTTON ,
lambda event , path = self . pass_handler . cur_dir : self . path_button_clicked (
lambda event , path = self . pass_handler . cur_dir : self . path_button_clicked (
path ) ,
path ) ,
btn )
btn )
name_sizer = wx . BoxSizer ( orient = wx . VERTICAL ) # pylint: disable=no-member
name_sizer : wx . BoxSizer = wx . BoxSizer ( orient = wx . VERTICAL ) # pylint: disable=no-member
name_sizer . Add ( wx . StaticText ( self . pnl , - 1 , " Password path: " ) , 0 ,
name_sizer . Add ( wx . StaticText ( self . pnl , - 1 , " Password path: " ) , 0 ,
wx . EXPAND ) # pylint: disable=no-member
wx . EXPAND ) # pylint: disable=no-member
pw_sizer = wx . BoxSizer ( orient = wx . VERTICAL ) # pylint: disable=no-member
pw_sizer : wx . BoxSizer = wx . BoxSizer ( orient = wx . VERTICAL ) # pylint: disable=no-member
pw_sizer . Add ( wx . StaticText ( self . pnl , - 1 , " Password: " ) , 0 , wx . EXPAND ) # pylint: disable=no-member
pw_sizer . Add ( wx . StaticText ( self . pnl , - 1 , " Password: " ) , 0 , wx . EXPAND ) # pylint: disable=no-member
name = wx . TextCtrl ( self . pnl , value = pass path, style = wx . TE_DONTWRAP )
name : wx . TextCtrl = wx . TextCtrl ( self . pnl , value = pass _ path, style = wx . TE_DONTWRAP )
text = wx . TextCtrl ( self . pnl , style = wx . TE_MULTILINE | wx . TE_DONTWRAP )
text : wx . TextCtrl = wx . TextCtrl ( self . pnl , style = wx . TE_MULTILINE | wx . TE_DONTWRAP )
s btn = wx . Button ( self . pnl , label = " Save password " )
s _ btn: wx . Butto n = wx . Button ( self . pnl , label = " Save password " )
name_sizer . Add ( name , 0 , wx . EXPAND ) # pylint: disable=no-member
name_sizer . Add ( name , 0 , wx . EXPAND ) # pylint: disable=no-member
pw_sizer . Add ( text , 0 , wx . EXPAND ) # pylint: disable=no-member
pw_sizer . Add ( text , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( name_sizer , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( name_sizer , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( pw_sizer , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( pw_sizer , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( s btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( s _ btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON ,
self . Bind ( wx . EVT_BUTTON ,
lambda event , path = passpath , mtext = text , mname = name : self .
lambda event , path = pass_path , m_text = text , m_name = name : self .
save_to_pass ( path , mtext , mname ) ,
save_to_pass ( path , m_text , m_name ) ,
sbtn )
s_btn )
self . pnl . SetupScrolling ( )
name . SetFocus ( )
name . SetFocus ( )
@redraw
@redraw
def show_password_dialog ( self , index ):
def show_password_dialog ( self , index : int ):
""" show_password_dialog.
""" show_password_dialog.
: param index :
: param index :
"""
"""
self . add_tools ( index )
self . add_tools ( index )
pass path = self . pass_handler . get_pass_path_from_index ( index , " password " )
pass _ path: str = self . pass_handler . get_pass_path_from_index ( index , " password " )
c path = self . pass_handler . top_dir + os . path . dirname ( pass path)
c _ path: str = self . pass_handler . top_dir + os . path . dirname ( pass _ path)
password = get_password_from_path ( pass path)
password : str = get_password_from_path ( pass _ path)
btn = self . make_back_button ( index )
btn : wx . Button = self . make_back_button ( index )
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind (
self . Bind (
wx . EVT_BUTTON ,
wx . EVT_BUTTON ,
lambda event , path = c path: self . path_button_clicked ( path ) ,
lambda event , path = c _ path: self . path_button_clicked ( path ) ,
btn )
btn )
s btn = wx . Button ( self . pnl , label = " Show/edit password " )
s _ btn: wx . Butto n = wx . Button ( self . pnl , label = " Show/edit password " )
c btn = wx . Button ( self . pnl , label = " Copy password " )
c _ btn: wx . Butto n = wx . Button ( self . pnl , label = " Copy password " )
d btn = wx . Button ( self . pnl , label = " Delete password " )
d _ btn: wx . Butto n = wx . Button ( self . pnl , label = " Delete password " )
self . sizer . Add ( s btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( s _ btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( c btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( c _ btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( d btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( d _ btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON ,
self . Bind ( wx . EVT_BUTTON ,
lambda event , text = password : copy_to_clipboard ( text ) ,
lambda event , text = password : copy_to_clipboard ( text ) ,
c btn)
c _ btn)
self . Bind (
self . Bind (
wx . EVT_BUTTON ,
wx . EVT_BUTTON ,
lambda event , m index= index : self . show_password ( m index) ,
lambda event , m _ index= index : self . show_password ( m _ index) ,
s btn)
s _ btn)
self . Bind (
self . Bind (
wx . EVT_BUTTON ,
wx . EVT_BUTTON ,
lambda event , mindex = index : self . delete_password ( mindex ) ,
lambda event , m_index = index : self . delete_password ( m_index ) ,
dbtn )
d_btn )
self . pnl . SetupScrolling ( )
@redraw
@redraw
def show_password ( self , index ):
def show_password ( self , index : int ):
""" show_password.
""" show_password.
: param index :
: param index :
"""
"""
self . add_tools ( index )
self . add_tools ( index )
pass path = self . pass_handler . get_pass_path_from_index ( index , " password " )
pass _ path: str = self . pass_handler . get_pass_path_from_index ( index , " password " )
c path = self . pass_handler . top_dir + os . path . dirname ( pass path)
c _ path: str = self . pass_handler . top_dir + os . path . dirname ( pass _ path)
password = get_password_from_path ( pass path)
password : str = get_password_from_path ( pass _ path)
btn = self . make_back_button ( index )
btn : wx . Button = self . make_back_button ( index )
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind (
self . Bind (
wx . EVT_BUTTON ,
wx . EVT_BUTTON ,
lambda event , path = c path: self . path_button_clicked ( path ) ,
lambda event , path = c _ path: self . path_button_clicked ( path ) ,
btn )
btn )
text = wx . TextCtrl ( self . pnl ,
text : wx . TextCtrl = wx . TextCtrl ( self . pnl ,
value = password ,
value = password ,
style = wx . TE_MULTILINE | wx . TE_DONTWRAP )
style = wx . TE_MULTILINE | wx . TE_DONTWRAP )
c btn = wx . Button ( self . pnl , label = " Copy password " )
c _ btn: wx . Butto n = wx . Button ( self . pnl , label = " Copy password " )
s btn = wx . Button ( self . pnl , label = " Save password " )
s _ btn: wx . Butto n = wx . Button ( self . pnl , label = " Save password " )
self . sizer . Add ( text , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( text , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( c btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( c _ btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( s btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( s _ btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON ,
self . Bind ( wx . EVT_BUTTON ,
lambda event , m text= password : copy_to_clipboard ( m text) ,
lambda event , m _ text= password : copy_to_clipboard ( m _ text) ,
c btn)
c _ btn)
self . Bind ( wx . EVT_BUTTON ,
self . Bind ( wx . EVT_BUTTON ,
lambda event , path = passpath , mtext = text : self . save_to_pass (
lambda event , path = pass_path , m_text = text : self . save_to_pass (
path , mtext ) ,
path , m_text ) ,
sbtn )
s_btn )
self . pnl . SetupScrolling ( )
@redraw
@redraw
def show_tools ( self , index = None ) :
def show_tools ( self , index : Union [ None , int ] = None ) :
""" show_tools.
""" show_tools.
: param index :
: param index :
"""
"""
btn = wx . Button ( self . pnl , label = " Go back " )
btn : wx . Button = wx . Button ( self . pnl , label = " Go back " )
font = btn . GetFont ( ) . MakeBold ( )
font : wx . Font = btn . GetFont ( ) . MakeBold ( )
btn . SetFont ( font )
btn . SetFont ( font )
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( btn , 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind (
self . Bind (
wx . EVT_BUTTON ,
wx . EVT_BUTTON ,
lambda event , m index= index : self . back_button_clicked ( m index) ,
lambda event , m _ index= index : self . back_button_clicked ( m _ index) ,
btn )
btn )
n btn = wx . Button ( self . pnl , label = " Add new password " )
n _ btn: wx . Butto n = wx . Button ( self . pnl , label = " Add new password " )
font = n btn. GetFont ( ) . MakeBold ( )
font : wx . Font = n _ btn. GetFont ( ) . MakeBold ( )
n btn. SetFont ( font )
n _ btn. SetFont ( font )
self . sizer . Add ( n btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . sizer . Add ( n _ btn, 0 , wx . EXPAND ) # pylint: disable=no-member
self . Bind ( wx . EVT_BUTTON , lambda event : self . show_new_dialog ( ) ,
self . Bind ( wx . EVT_BUTTON , lambda event : self . show_new_dialog ( ) ,
n btn)
n _ btn)
self . add_push_pull ( )
self . add_push_pull ( )
self . pnl . SetupScrolling ( )
if __name__ == ' __main__ ' :
if __name__ == ' __main__ ' :
# When this module is run (not imported) then create the app, the
# When this module is run (not imported) then create the app, the
# frame, show it, and start the event loop.
# frame, show it, and start the event loop.
app = wx . App ( )
app : wx . App = wx . App ( )
frm = PassUi ( None , title = ' PassUi ' )
frm : PassUi = PassUi ( None , title = ' PassUi ' )
frm . Show ( )
frm . Show ( )
app . MainLoop ( )
app . MainLoop ( )