7 Module implementing a widget to select a symbol in various formats. |
7 Module implementing a widget to select a symbol in various formats. |
8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 import sys |
|
13 import unicodedata |
|
14 try: |
12 try: |
15 # Py3 |
|
16 import html.entities as html_entities |
|
17 except (ImportError): |
|
18 # Py2 |
13 # Py2 |
19 str = unicode # __IGNORE_WARNING__ |
14 str = unicode # __IGNORE_WARNING__ |
20 chr = unichr # __IGNORE_WARNING__ |
15 chr = unichr # __IGNORE_WARNING__ |
21 import htmlentitydefs as html_entities # __IGNORE_WARNING__ |
16 import htmlentitydefs as html_entities # __IGNORE_WARNING__ |
|
17 except NameError: |
|
18 # Py3 |
|
19 import html.entities as html_entities |
|
20 |
|
21 import sys |
|
22 import unicodedata |
22 |
23 |
23 from PyQt5.QtCore import pyqtSlot, pyqtSignal, QAbstractTableModel, \ |
24 from PyQt5.QtCore import pyqtSlot, pyqtSignal, QAbstractTableModel, \ |
24 QModelIndex, Qt, qVersion, QItemSelectionModel, QLocale |
25 QModelIndex, Qt, qVersion, QItemSelectionModel, QLocale |
25 from PyQt5.QtGui import QColor |
26 from PyQt5.QtGui import QColor |
26 from PyQt5.QtWidgets import QWidget, QHeaderView, QAbstractItemView |
27 from PyQt5.QtWidgets import QWidget, QHeaderView, QAbstractItemView |