# Path: gsdview/utils.py
# def default_workdir():
# def _getresource(resource, package):
# def getresource(resource, package=None):
# def format_platform_info():
# def format_bugreport(exctype=None, excvalue=None, tracebackobj=None,
#                      extra_info=None):
#     def isexecutable(cmd):
#     def isexecutable(cmd):
# def isscript(filename):
# def scriptcmd(scriptname):
#     def get_tree_size(path):
#     def get_tree_size(path):
# def data_uuid(path, prefixlen=23):
# def geonormalize(x, angle_range=360.):


import os
import csv
import math
import logging
        import qtpy
import numpy as np
from io import StringIO
from configparser import ConfigParser
from qtpy import QtCore, QtWidgets, QtGui, QtSvg, QtPrintSupport, uic
from gsdview import utils
        from io import StringIO
        from xml.etree.ElementTree import ElementTree
        from qtpy import QtWidgets
            from pyside2uic import compileUi
            from pysideuic import compileUi

            cell = table.cellAt(row + 1, 0)
            cell.setFormat(headerformat)
            cellCursor = cell.firstCursorPosition()
            cellCursor.insertText(text, headerformat)

    cursor.endEditBlock()

    return doc


def exportTable(model, parent=None):
    filters = [
        'CSV file (*.csv)',
        'CSV TAB-delimited file (*.csv)',
        'HTML file (*.html)',
        'All files (*)',
    ]

    try:
        ncols = model.columnCount()
    except TypeError:
        # columnCount is a private method in QAbstractListModel
        ncols = 1

    if ncols == 1:
        filters.insert(0, 'Text file (*.txt)')
        target = os.path.join(utils.default_workdir(), 'data.txt')
    if ncols == 2:
        filters.insert(0, 'INI file format (*.ini)')

# Path: gsdview/utils.py
# def default_workdir():
# def _getresource(resource, package):
# def getresource(resource, package=None):
# def format_platform_info():
# def format_bugreport(exctype=None, excvalue=None, tracebackobj=None,
#                      extra_info=None):
#     def isexecutable(cmd):
#     def isexecutable(cmd):
# def isscript(filename):
# def scriptcmd(scriptname):
#     def get_tree_size(path):
#     def get_tree_size(path):
# def data_uuid(path, prefixlen=23):
# def geonormalize(x, angle_range=360.):


# Path: gsdview/qtsupport.py
import os
import csv
import math
import logging
        import qtpy
import numpy as np
from io import StringIO
from configparser import ConfigParser
from qtpy import QtCore, QtWidgets, QtGui, QtSvg, QtPrintSupport, uic
from gsdview import utils
        from io import StringIO
        from xml.etree.ElementTree import ElementTree
        from qtpy import QtWidgets
            from pyside2uic import compileUi
            from pysideuic import compileUi


            cell = table.cellAt(row + 1, 0)
            cell.setFormat(headerformat)
            cellCursor = cell.firstCursorPosition()
            cellCursor.insertText(text, headerformat)

    cursor.endEditBlock()

    return doc


def exportTable(model, parent=None):
    filters = [
        'CSV file (*.csv)',
        'CSV TAB-delimited file (*.csv)',
        'HTML file (*.html)',
        'All files (*)',
    ]

    try:
        ncols = model.columnCount()
    except TypeError:
        # columnCount is a private method in QAbstractListModel
        ncols = 1

    if ncols == 1:
        filters.insert(0, 'Text file (*.txt)')
        target = os.path.join(utils.default_workdir(), 'data.txt')
    if ncols == 2:
        filters.insert(0, 'INI file format (*.ini)')

        target = os.path.join(utils.default_workdir(), 'data.ini')