7 Module implementing the setup.py wizard dialog. |
7 Module implementing the setup.py wizard dialog. |
8 """ |
8 """ |
9 |
9 |
10 |
10 |
11 import os |
11 import os |
12 import sys |
|
13 import datetime |
12 import datetime |
14 |
13 |
15 from PyQt5.QtCore import pyqtSlot, Qt, QUrl |
14 from PyQt5.QtCore import pyqtSlot, Qt, QUrl |
16 from PyQt5.QtWidgets import ( |
15 from PyQt5.QtWidgets import ( |
17 QDialog, QDialogButtonBox, QTreeWidgetItem, QListWidgetItem, QApplication |
16 QDialog, QDialogButtonBox, QTreeWidgetItem, QListWidgetItem, QApplication |
251 i2string = (il + 2) * indString |
250 i2string = (il + 2) * indString |
252 estring = os.linesep + indLevel * indString |
251 estring = os.linesep + indLevel * indString |
253 |
252 |
254 # now generate the code |
253 # now generate the code |
255 if self.introCheckBox.isChecked(): |
254 if self.introCheckBox.isChecked(): |
256 code = "#!/usr/bin/env python{0}{1}".format( |
255 code = "#!/usr/bin/env python3{0}".format(os.linesep) |
257 sys.version_info[0], os.linesep) |
|
258 code += "# -*- coding: utf-8 -*-{0}{0}".format(os.linesep) |
256 code += "# -*- coding: utf-8 -*-{0}{0}".format(os.linesep) |
259 else: |
257 else: |
260 code = "" |
258 code = "" |
261 |
259 |
262 if self.metaDataCheckBox.isChecked(): |
260 if self.metaDataCheckBox.isChecked(): |