
Value)) 266 # Set the format here to the country u want. Value)) 265 the_surname= single_quote_remover( str( self. auto_number()) 264 the_name= single_quote_remover( str( self. MessageBox( " Some Fields Are Empty! ") 262 else: 263 the_id= str( self. ALIGN_CENTER_VERTICAL, 0) 241 grid_sizer_4. ALIGN_CENTER_VERTICAL, 0) 240 grid_sizer_4. ALIGN_CENTER_VERTICAL, 0) 239 grid_sizer_4. SetColLabelValue( 3, _( " NUMBER ")) 213 self. SetColLabelValue( 2, _( " SURNAME ")) 211 self. SetColLabelValue( 1, _( " NAME ")) 209 self. SetColLabelValue( 0, _( " ID ")) 207 self. SetMinSize(( 120, 27)) 203 r= data_rows_count() 204 # This is to create the grid with same rows as database.

SetCellValue( i, j, str( cell)) 194 195 196 def _set_properties( self): 197 self. fetchall() 190 for i in range ( 0, len( rows)): 191 for j in range( 0, 4): 192 cell = rows 193 self.

execute( " SELECT * FROM Phone ") 189 rows= cur. StaticText( self, - 1, _( " Search Name : ")) 168 self.

StaticText( self, - 1, _( " Number : ")) 161 self. StaticText( self, - 1, _( " Surname : ")) 159 self. Icon( ' icon_wxWidgets.ico ')) 153 154 self. Dialog): 145 """ 146 This is the PhoneBook dialog box. MessageBox( " A simple PhoneBook that resumes basic graphical database configuration \n \n Enjoy.! ") 141 142 #- 143 144 class MyDialog1( wx. Append( wxglade_tmp_menu, _( " About ")) 115 self. Append( wxglade_tmp_menu, _( " Phone Book ")) 112 wxglade_tmp_menu = wx. Icon( ' icon_wxWidgets.ico ')) 107 108 self. Frame): 99 """ 100 This is the parent frame. replace ( " ' ", " / ") 86 87 #- 88 89 def single_quote_returner( text): 90 """ 91 To display the single quote for the user ex: cote d'or as chocolat:))) 92 """ 93 94 return text. title() 77 78 #- 79 80 def single_quote_remover( text): 81 """ 82 To remove single quotes from entry to prevent SQL crash. join( res) 68 69 #- 70 71 def titling( name): 72 """ 73 To display the names and surnames in uppercase for 1st letter. execute( " SELECT * FROM Phone ") 44 rows= cur. close() 33 34 #- 35 36 def data_rows_count(): 37 """ 38 To count the rows in the database. curdir) 21 22 #- 23 24 def connect(): 25 """ 26 This is the sqlite3 connection.

1 # sample_one.py 2 3 import wx 4 import wx.grid 5 import os 6 import sqlite3 7 import re 8 import gettext 9 10 # def connect 11 # def data_rows_count 12 # def fmtstr 13 # def titling 14 # def single_quote_remover 15 # def single_quote_returner 16 # class MyFrame 17 # class MyDialog1 18 # class MyApp 19 20 cwd = os.
