예제 #1
0
 def on_wizard_finish(self, wizard):
     """
     Create the ninja_porject (.nja file), create the main __init__.py
     and open the project
     """
     ids = wizard.pageIds()
     page = wizard.page(ids[1])
     name = page.txtName.text()
     path = os.path.join(page.txtPlace.text(), name)
     if not path:
         QMessageBox.critical(self, self.tr("Incorrect Location"),
                              self.tr("The project couldn\'t be create"))
         return
     if not os.path.exists(path):
         os.makedirs(path)
     project = {}
     project['name'] = name
     project['description'] = page.txtDescription.toPlainText()
     project['license'] = page.cboLicense.currentText()
     project['venv'] = page.vtxtPlace.text()
     json_manager.create_ninja_project(path, name, project)
     try:
         file_manager.create_init_file(path)
     except:
         logger.debug("The __init__ file already exists - Import Sources.")
     wizard._load_project(path)
예제 #2
0
 def on_wizard_finish(self, wizard):
     """
     Create the ninja_porject (.nja file), create the main __init__.py
     and open the project
     """
     ids = wizard.pageIds()
     page = wizard.page(ids[1])
     name = page.txtName.text()
     path = os.path.join(page.txtPlace.text(), name)
     if not path:
         QMessageBox.critical(self, _translate("PythonProjectHandler", "Incorrect Location"),
             _translate("PythonProjectHandler", "The project couldn\'t be create"))
         return
     if not os.path.exists(path):
         os.makedirs(path)
     project = {}
     project['name'] = name
     project['description'] = page.txtDescription.toPlainText()
     project['license'] = page.cboLicense.currentText()
     project['venv'] = page.vtxtPlace.text()
     json_manager.create_ninja_project(path, name, project)
     try:
         file_manager.create_init_file(path)
     except:
         logger.debug("The __init__ file already exists - Import Sources.")
     wizard._load_project(path)
예제 #3
0
 def on_wizard_finish(self, wizard):
     """
     Create the ninja_porject (.nja file), create the main __init__.py
     and open the project
     """
     ids = wizard.pageIds()
     page = wizard.page(ids[1])
     path = unicode(page.txtPlace.text())
     if not path:
         QMessageBox.critical(self, self.tr("Incorrect Location"),
             self.tr("The project couldn\'t be create"))
         return
     project = {}
     name = unicode(page.txtName.text())
     project['name'] = name
     project['description'] = unicode(page.txtDescription.toPlainText())
     project['license'] = unicode(page.cboLicense.currentText())
     project['venv'] = unicode(page.vtxtPlace.text())
     json_manager.create_ninja_project(path, name, project)
     file_manager.create_init_file(path)
     wizard._load_project(path)
예제 #4
0
 def on_wizard_finish(self, wizard):
     """
     Create the ninja_porject (.nja file), create the main __init__.py
     and open the project
     """
     ids = wizard.pageIds()
     page = wizard.page(ids[1])
     path = page.txtPlace.text()
     if not path:
         QMessageBox.critical(self, self.tr("Incorrect Location"), self.tr("The project couldn't be create"))
         return
     project = {}
     name = page.txtName.text()
     project["name"] = name
     project["description"] = page.txtDescription.toPlainText()
     project["license"] = page.cboLicense.currentText()
     project["venv"] = page.vtxtPlace.text()
     json_manager.create_ninja_project(path, name, project)
     try:
         file_manager.create_init_file(path)
     except:
         logger.debug("The __init__ file already exists - Import Sources.")
     wizard._load_project(path)