Tips: Python: Switch in Python


################################################################

# There is no ‘Switch’ statement in Python, but we can use the following example to simulate switch case.

# We can use dictionary in python to simulate the switch case

################################################################

def f1():

print("Hello f1")

def f2():

print("Hello f2")

funcdict = {

0: f1,

1: f2

}

selection = 1

funcdict.get(selection)()

Tips: Python: Switch in Python


################################################################

# There is no ‘Switch’ statement in Python, but we can use the following example to simulate switch case.

# We can use dictionary in python to simulate the switch case

################################################################

def f1():

print("Hello f1")

def f2():

print("Hello f2")

funcdict = {

0: f1,

1: f2

}

selection = 1

funcdict.get(selection)()

Tips: Python : wxFormBuilder v3.1.67-beta (Febuary 18, 2010) Python Update


Latest version of wxFormBuilder does not support wxAdditions fully, thus I have updated few XML files to support FlatNotebook & wx.propgrid widgets.

  1. Download wx.propgrid and install it.
  2. Download the XML.Zip folder and extract it in plugins\wxAdditions\xml folder.
  3. Restart the wxformbuilder.

I did not tried to update these files for other widgets but it should be similar.