objdictgen/networkedit.py
changeset 206 6787754b251b
parent 205 dac0f9b4e3f8
child 238 be485a93e3f7
equal deleted inserted replaced
205:dac0f9b4e3f8 206:6787754b251b
   433         else:
   433         else:
   434             defaultpath = os.getcwd()
   434             defaultpath = os.getcwd()
   435         dialog = wxDirDialog(self , "Choose a project", defaultpath, wxDD_NEW_DIR_BUTTON)
   435         dialog = wxDirDialog(self , "Choose a project", defaultpath, wxDD_NEW_DIR_BUTTON)
   436         if dialog.ShowModal() == wxID_OK:
   436         if dialog.ShowModal() == wxID_OK:
   437             projectpath = dialog.GetPath()
   437             projectpath = dialog.GetPath()
   438             if os.path.isdir(projectpath) and len(os.path.listdir(projectpath)) == 0:
   438             if os.path.isdir(projectpath) and len(os.listdir(projectpath)) == 0:
   439                 manager = NodeManager(ScriptDirectory)
   439                 manager = NodeManager(ScriptDirectory)
   440                 nodelist = NodeList(manager)
   440                 nodelist = NodeList(manager)
   441                 result = nodelist.LoadProject(projectpath)
   441                 result = nodelist.LoadProject(projectpath)
   442                 if not result:
   442                 if not result:
   443                     self.Manager = manager
   443                     self.Manager = manager