PageRenderTime 121ms CodeModel.GetById 40ms app.highlight 32ms RepoModel.GetById 29ms app.codeStats 0ms

/addons/CountryListBox.py

http://pyjamas.googlecode.com/
Python | 257 lines | 256 code | 1 blank | 0 comment | 0 complexity | a28ec96f782f33bd339f2870c2f6d954 MD5 | raw file
  1from ui import ListBox
  2
  3class CountryListBox(ListBox):
  4   country_list = [
  5      ['', ''] ,
  6      ['Afghanistan', 'AF'] ,
  7      ['?fland Islands', 'AX'] ,
  8      ['Albania', 'AL'] ,
  9      ['Algeria', 'DZ'] ,
 10      ['American Samoa', 'AS'] ,
 11      ['Andorra', 'AD'] ,
 12      ['Angola', 'AO'] ,
 13      ['Anguilla', 'AI'] ,
 14      ['Antarctica', 'AQ'] ,
 15      ['Antigua And Barbuda', 'AG'] ,
 16      ['Argentina', 'AR'] ,
 17      ['Armenia', 'AM'] ,
 18      ['Aruba', 'AW'] ,
 19      ['Australia', 'AU'] ,
 20      ['Austria', 'AT'] ,
 21      ['Azerbaijan', 'AZ'] ,
 22      ['Bahamas', 'BS'] ,
 23      ['Bahrain', 'BH'] ,
 24      ['Bangladesh', 'BD'] ,
 25      ['Barbados', 'BB'] ,
 26      ['Belarus', 'BY'] ,
 27      ['Belgium', 'BE'] ,
 28      ['Belize', 'BZ'] ,
 29      ['Benin', 'BJ'] ,
 30      ['Bermuda', 'BM'] ,
 31      ['Bhutan', 'BT'] ,
 32      ['Bolivia', 'BO'] ,
 33      ['Bosnia And Herzegovina', 'BA'] ,
 34      ['Botswana', 'BW'] ,
 35      ['Bouvet Island', 'BV'] ,
 36      ['Brazil', 'BR'] ,
 37      ['British Indian Ocean Territory', 'IO'] ,
 38      ['Brunei Darussalam', 'BN'] ,
 39      ['Bulgaria', 'BG'] ,
 40      ['Burkina Faso', 'BF'] ,
 41      ['Burundi', 'BI'] ,
 42      ['Cambodia', 'KH'] ,
 43      ['Cameroon', 'CM'] ,
 44      ['Canada', 'CA'] ,
 45      ['Cape Verde', 'CV'] ,
 46      ['Cayman Islands', 'KY'] ,
 47      ['Central African Republic', 'CF'] ,
 48      ['Chad', 'TD'] ,
 49      ['Chile', 'CL'] ,
 50      ['China', 'CN'] ,
 51      ['Christmas Island', 'CX'] ,
 52      ['Cocos (keeling) Islands', 'CC'] ,
 53      ['Colombia', 'CO'] ,
 54      ['Comoros', 'KM'] ,
 55      ['Congo', 'CG'] ,
 56      ['Congo, The Democratic Republic Of The', 'CD'] ,
 57      ['Cook Islands', 'CK'] ,
 58      ['Costa Rica', 'CR'] ,
 59      ["Cote D'ivoire", 'CI'] ,
 60      ['Croatia', 'HR'] ,
 61      ['Cuba', 'CU'] ,
 62      ['Cyprus', 'CY'] ,
 63      ['Czech Republic', 'CZ'] ,
 64      ['Denmark', 'DK'] ,
 65      ['Djibouti', 'DJ'] ,
 66      ['Dominica', 'DM'] ,
 67      ['Dominican Republic', 'DO'] ,
 68      ['Ecuador', 'EC'] ,
 69      ['Egypt', 'EG'] ,
 70      ['El Salvador', 'SV'] ,
 71      ['Equatorial Guinea', 'GQ'] ,
 72      ['Eritrea', 'ER'] ,
 73      ['Estonia', 'EE'] ,
 74      ['Ethiopia', 'ET'] ,
 75      ['Falkland Islands (malvinas)', 'FK'] ,
 76      ['Faroe Islands', 'FO'] ,
 77      ['Fiji', 'FJ'] ,
 78      ['Finland', 'FI'] ,
 79      ['France', 'FR'] ,
 80      ['French Guiana', 'GF'] ,
 81      ['French Polynesia', 'PF'] ,
 82      ['French Southern Territories', 'TF'] ,
 83      ['Gabon', 'GA'] ,
 84      ['Gambia', 'GM'] ,
 85      ['Georgia', 'GE'] ,
 86      ['Germany', 'DE'] ,
 87      ['Ghana', 'GH'] ,
 88      ['Gibraltar', 'GI'] ,
 89      ['Greece', 'GR'] ,
 90      ['Greenland', 'GL'] ,
 91      ['Grenada', 'GD'] ,
 92      ['Guadeloupe', 'GP'] ,
 93      ['Guam', 'GU'] ,
 94      ['Guatemala', 'GT'] ,
 95      ['Guernsey', 'GG'] ,
 96      ['Guinea', 'GN'] ,
 97      ['Guinea-bissau', 'GW'] ,
 98      ['Guyana', 'GY'] ,
 99      ['Haiti', 'HT'] ,
100      ['Heard Island And Mcdonald Islands', 'HM'] ,
101      ['Holy See (vatican City State)', 'VA'] ,
102      ['Honduras', 'HN'] ,
103      ['Hong Kong', 'HK'] ,
104      ['Hungary', 'HU'] ,
105      ['Iceland', 'IS'] ,
106      ['India', 'IN'] ,
107      ['Indonesia', 'ID'] ,
108      ['Iran, Islamic Republic Of', 'IR'] ,
109      ['Iraq', 'IQ'] ,
110      ['Ireland', 'IE'] ,
111      ['Isle Of Man', 'IM'] ,
112      ['Israel', 'IL'] ,
113      ['Italy', 'IT'] ,
114      ['Jamaica', 'JM'] ,
115      ['Japan', 'JP'] ,
116      ['Jersey', 'JE'] ,
117      ['Jordan', 'JO'] ,
118      ['Kazakhstan', 'KZ'] ,
119      ['Kenya', 'KE'] ,
120      ['Kiribati', 'KI'] ,
121      ["Korea, Democratic People's Republic Of", 'KP'] ,
122      ['Korea, Republic Of', 'KR'] ,
123      ['Kuwait', 'KW'] ,
124      ['Kyrgyzstan', 'KG'] ,
125      ["Lao People's Democratic Republic", 'LA'] ,
126      ['Latvia', 'LV'] ,
127      ['Lebanon', 'LB'] ,
128      ['Lesotho', 'LS'] ,
129      ['Liberia', 'LR'] ,
130      ['Libyan Arab Jamahiriya', 'LY'] ,
131      ['Liechtenstein', 'LI'] ,
132      ['Lithuania', 'LT'] ,
133      ['Luxembourg', 'LU'] ,
134      ['Macao', 'MO'] ,
135      ['Macedonia, The Former Yugoslav Republic Of', 'MK'] ,
136      ['Madagascar', 'MG'] ,
137      ['Malawi', 'MW'] ,
138      ['Malaysia', 'MY'] ,
139      ['Maldives', 'MV'] ,
140      ['Mali', 'ML'] ,
141      ['Malta', 'MT'] ,
142      ['Marshall Islands', 'MH'] ,
143      ['Martinique', 'MQ'] ,
144      ['Mauritania', 'MR'] ,
145      ['Mauritius', 'MU'] ,
146      ['Mayotte', 'YT'] ,
147      ['Mexico', 'MX'] ,
148      ['Micronesia, Federated States Of', 'FM'] ,
149      ['Moldova, Republic Of', 'MD'] ,
150      ['Monaco', 'MC'] ,
151      ['Mongolia', 'MN'] ,
152      ['Montenegro', 'ME'] ,
153      ['Montserrat', 'MS'] ,
154      ['Morocco', 'MA'] ,
155      ['Mozambique', 'MZ'] ,
156      ['Myanmar', 'MM'] ,
157      ['Namibia', 'NA'] ,
158      ['Nauru', 'NR'] ,
159      ['Nepal', 'NP'] ,
160      ['Netherlands', 'NL'] ,
161      ['Netherlands Antilles', 'AN'] ,
162      ['New Caledonia', 'NC'] ,
163      ['New Zealand', 'NZ'] ,
164      ['Nicaragua', 'NI'] ,
165      ['Niger', 'NE'] ,
166      ['Nigeria', 'NG'] ,
167      ['Niue', 'NU'] ,
168      ['Norfolk Island', 'NF'] ,
169      ['Northern Mariana Islands', 'MP'] ,
170      ['Norway', 'NO'] ,
171      ['Oman', 'OM'] ,
172      ['Pakistan', 'PK'] ,
173      ['Palau', 'PW'] ,
174      ['Palestinian Territory, Occupied', 'PS'] ,
175      ['Panama', 'PA'] ,
176      ['Papua New Guinea', 'PG'] ,
177      ['Paraguay', 'PY'] ,
178      ['Peru', 'PE'] ,
179      ['Philippines', 'PH'] ,
180      ['Pitcairn', 'PN'] ,
181      ['Poland', 'PL'] ,
182      ['Portugal', 'PT'] ,
183      ['Puerto Rico', 'PR'] ,
184      ['Qatar', 'QA'] ,
185      ['Reunion', 'RE'] ,
186      ['Romania', 'RO'] ,
187      ['Russian Federation', 'RU'] ,
188      ['Rwanda', 'RW'] ,
189      ['Saint Helena', 'SH'] ,
190      ['Saint Kitts And Nevis', 'KN'] ,
191      ['Saint Lucia', 'LC'] ,
192      ['Saint Pierre And Miquelon', 'PM'] ,
193      ['Saint Vincent And The Grenadines', 'VC'] ,
194      ['Samoa', 'WS'] ,
195      ['San Marino', 'SM'] ,
196      ['Sao Tome And Principe', 'ST'] ,
197      ['Saudi Arabia', 'SA'] ,
198      ['Senegal', 'SN'] ,
199      ['Serbia', 'RS'] ,
200      ['Seychelles', 'SC'] ,
201      ['Sierra Leone', 'SL'] ,
202      ['Singapore', 'SG'] ,
203      ['Slovakia', 'SK'] ,
204      ['Slovenia', 'SI'] ,
205      ['Solomon Islands', 'SB'] ,
206      ['Somalia', 'SO'] ,
207      ['South Africa', 'ZA'] ,
208      ['South Georgia And The South Sandwich Islands', 'GS'] ,
209      ['Spain', 'ES'] ,
210      ['Sri Lanka', 'LK'] ,
211      ['Sudan', 'SD'] ,
212      ['Suriname', 'SR'] ,
213      ['Svalbard And Jan Mayen', 'SJ'] ,
214      ['Swaziland', 'SZ'] ,
215      ['Sweden', 'SE'] ,
216      ['Switzerland', 'CH'] ,
217      ['Syrian Arab Republic', 'SY'] ,
218      ['Taiwan, Province Of China', 'TW'] ,
219      ['Tajikistan', 'TJ'] ,
220      ['Tanzania, United Republic Of', 'TZ'] ,
221      ['Thailand', 'TH'] ,
222      ['Timor-leste', 'TL'] ,
223      ['Togo', 'TG'] ,
224      ['Tokelau', 'TK'] ,
225      ['Tonga', 'TO'] ,
226      ['Trinidad And Tobago', 'TT'] ,
227      ['Tunisia', 'TN'] ,
228      ['Turkey', 'TR'] ,
229      ['Turkmenistan', 'TM'] ,
230      ['Turks And Caicos Islands', 'TC'] ,
231      ['Tuvalu', 'TV'] ,
232      ['Uganda', 'UG'] ,
233      ['Ukraine', 'UA'] ,
234      ['United Arab Emirates', 'AE'] ,
235      ['United Kingdom', 'GB'] ,
236      ['United States', 'US'] ,
237      ['United States Minor Outlying Islands', 'UM'] ,
238      ['Uruguay', 'UY'] ,
239      ['Uzbekistan', 'UZ'] ,
240      ['Vanuatu', 'VU'] ,
241      ['Venezuela', 'VE'] ,
242      ['Viet Nam', 'VN'] ,
243      ['Virgin Islands, British', 'VG'] ,
244      ['Virgin Islands, U.s.', 'VI'] ,
245      ['Wallis And Futuna', 'WF'] ,
246      ['Western Sahara', 'EH'] ,
247      ['Yemen', 'YE'] ,
248      ['Zambia', 'ZM'] ,
249      ['Zimbabwe', 'ZW']
250   ]
251   def __init__(self):
252      ListBox.__init__(self)
253      self.addCountries()
254      
255   def addCountries(self):
256      for countryItem in self.country_list:
257         self.addItem(countryItem[0], countryItem[1])