BeremizIDE.py
changeset 2450 5024c19ca8f0
parent 2432 dbc065a2f7a5
child 2459 21164625b393
equal deleted inserted replaced
2449:b0560adec4b7 2450:5024c19ca8f0
    28 import os
    28 import os
    29 import sys
    29 import sys
    30 import tempfile
    30 import tempfile
    31 import shutil
    31 import shutil
    32 import random
    32 import random
    33 import types
       
    34 import time
    33 import time
    35 from time import time as gettime
    34 from time import time as gettime
    36 from threading import Lock, Timer, currentThread
    35 from threading import Lock, Timer, currentThread
    37 
    36 
    38 from six.moves import cPickle, xrange
    37 from six.moves import cPickle, xrange
   715             self.OpenProject(projectpath)
   714             self.OpenProject(projectpath)
   716         return OpenRecentProject
   715         return OpenRecentProject
   717 
   716 
   718     def GenerateMenuRecursive(self, items, menu):
   717     def GenerateMenuRecursive(self, items, menu):
   719         for kind, infos in items:
   718         for kind, infos in items:
   720             if isinstance(kind, types.ListType):
   719             if isinstance(kind, list):
   721                 text, id = infos
   720                 text, id = infos
   722                 submenu = wx.Menu('')
   721                 submenu = wx.Menu('')
   723                 self.GenerateMenuRecursive(kind, submenu)
   722                 self.GenerateMenuRecursive(kind, submenu)
   724                 menu.AppendMenu(id, text, submenu)
   723                 menu.AppendMenu(id, text, submenu)
   725             elif kind == wx.ITEM_SEPARATOR:
   724             elif kind == wx.ITEM_SEPARATOR: