

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>utool._internal package &mdash; utool 1.1.2.dev1 documentation</title>
  

  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  

  

  
    <link rel="top" title="utool 1.1.2.dev1 documentation" href="index.html"/>
        <link rel="up" title="utool package" href="utool.html"/>
        <link rel="next" title="utool.experimental package" href="utool.experimental.html"/>
        <link rel="prev" title="utool package" href="utool.html"/> 

  
  <script src="_static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="index.html" class="icon icon-home"> utool
          

          
          </a>

          
            
            
              <div class="version">
                1.1.2.dev1
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
                <ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="utool.html">utool package</a><ul class="current">
<li class="toctree-l2 current"><a class="reference internal" href="utool.html#subpackages">Subpackages</a><ul class="current">
<li class="toctree-l3 current"><a class="current reference internal" href="">utool._internal package</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#submodules">Submodules</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.__prefwidg_dep">utool._internal.__prefwidg_dep module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.meta_util_arg">utool._internal.meta_util_arg module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.meta_util_cache">utool._internal.meta_util_cache module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.meta_util_constants">utool._internal.meta_util_constants module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.meta_util_cplat">utool._internal.meta_util_cplat module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.meta_util_dbg">utool._internal.meta_util_dbg module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.meta_util_git">utool._internal.meta_util_git module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.meta_util_iter">utool._internal.meta_util_iter module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.meta_util_path">utool._internal.meta_util_path module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.meta_util_six">utool._internal.meta_util_six module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.py2_syntax_funcs">utool._internal.py2_syntax_funcs module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.randomwrap">utool._internal.randomwrap module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal.util_importer">utool._internal.util_importer module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#utool-internal-win32-send-keys-module">utool._internal.win32_send_keys module</a></li>
<li class="toctree-l4"><a class="reference internal" href="#module-utool._internal">Module contents</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="utool.experimental.html">utool.experimental package</a></li>
<li class="toctree-l3"><a class="reference internal" href="utool.tests.html">utool.tests package</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#submodules">Submodules</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.DynamicStruct">utool.DynamicStruct module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.Preferences">utool.Preferences module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.Printable">utool.Printable module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.__main__">utool.__main__ module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.oldalg">utool.oldalg module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.sandbox">utool.sandbox module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_alg">utool.util_alg module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_aliases">utool.util_aliases module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_arg">utool.util_arg module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_assert">utool.util_assert module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_autogen">utool.util_autogen module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_cache">utool.util_cache module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_class">utool.util_class module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_config">utool.util_config module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_const">utool.util_const module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_cplat">utool.util_cplat module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_csv">utool.util_csv module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_dbg">utool.util_dbg module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_decor">utool.util_decor module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_depricated">utool.util_depricated module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_dev">utool.util_dev module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_dict">utool.util_dict module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_distances">utool.util_distances module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_func">utool.util_func module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_git">utool.util_git module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_grabdata">utool.util_grabdata module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_graph">utool.util_graph module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_gridsearch">utool.util_gridsearch module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_hash">utool.util_hash module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_import">utool.util_import module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_inject">utool.util_inject module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_inspect">utool.util_inspect module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_io">utool.util_io module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_ipynb">utool.util_ipynb module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_iter">utool.util_iter module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_latex">utool.util_latex module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_list">utool.util_list module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_logging">utool.util_logging module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_num">utool.util_num module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_numpy">utool.util_numpy module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_parallel">utool.util_parallel module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_path">utool.util_path module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_print">utool.util_print module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_progress">utool.util_progress module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_project">utool.util_project module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_regex">utool.util_regex module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_resources">utool.util_resources module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_set">utool.util_set module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_setup">utool.util_setup module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_six">utool.util_six module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_sqlite">utool.util_sqlite module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_str">utool.util_str module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_sysreq">utool.util_sysreq module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_tags">utool.util_tags module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_tests">utool.util_tests module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_time">utool.util_time module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_type">utool.util_type module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_ubuntu">utool.util_ubuntu module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_web">utool.util_web module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool.util_win32">utool.util_win32 module</a></li>
<li class="toctree-l2"><a class="reference internal" href="utool.html#module-utool">Module contents</a></li>
</ul>
</li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
        <a href="index.html">utool</a>
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          





<div role="navigation" aria-label="breadcrumbs navigation">
  <ul class="wy-breadcrumbs">
    <li><a href="index.html">Docs</a> &raquo;</li>
      
          <li><a href="utool.html">utool package</a> &raquo;</li>
      
    <li>utool._internal package</li>
      <li class="wy-breadcrumbs-aside">
        
          
            <a href="_sources/utool._internal.txt" rel="nofollow"> View page source</a>
          
        
      </li>
  </ul>
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="utool-internal-package">
<h1>utool._internal package<a class="headerlink" href="#utool-internal-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-utool._internal.__prefwidg_dep">
<span id="utool-internal-prefwidg-dep-module"></span><h2>utool._internal.__prefwidg_dep module<a class="headerlink" href="#module-utool._internal.__prefwidg_dep" title="Permalink to this headline">¶</a></h2>
<p>from __future__ import absolute_import, division, print_function
import sys
import traceback
from utool.Preferences import Pref
# Qt
from guitool.__PyQt__ import QtCore, QtGui
from guitool.__PyQt__.Qt import (QAbstractItemModel, QModelIndex, QVariant, QWidget,</p>
<blockquote>
<div>QString, Qt, QObject, pyqtSlot)</div></blockquote>
<p># Decorator to help catch errors that QT wont report
def report_thread_error(fn):</p>
<blockquote>
<div><dl class="docutils">
<dt>def report_thread_error_wrapper(<a href="#id1"><span class="problematic" id="id2">*</span></a>args, <a href="#id3"><span class="problematic" id="id4">**</span></a>kwargs):</dt>
<dd><dl class="first last docutils">
<dt>try:</dt>
<dd>ret = fn(<a href="#id5"><span class="problematic" id="id6">*</span></a>args, <a href="#id7"><span class="problematic" id="id8">**</span></a>kwargs)
return ret</dd>
<dt>except Exception as ex:</dt>
<dd>print(&#8216;nn <em>!!</em> Thread Raised Exception: &#8216; + str(ex))
print(&#8216;nn <em>!!</em> Thread Exception Traceback: nn&#8217; + traceback.format_exc())
sys.stdout.flush()
et, ei, tb = sys.exc_info()
raise</dd>
</dl>
</dd>
</dl>
<p>return report_thread_error_wrapper</p>
</div></blockquote>
<p># &#8212;
# Functions
# &#8212;
try:</p>
<blockquote>
<div>_fromUtf8 = QtCore.QString.fromUtf8</div></blockquote>
<dl class="docutils">
<dt>except AttributeError:</dt>
<dd><dl class="first last docutils">
<dt>def _fromUtf8(s):</dt>
<dd>return s</dd>
</dl>
</dd>
<dt>try:</dt>
<dd><p class="first">_encoding = QtGui.QApplication.UnicodeUTF8</p>
<dl class="last docutils">
<dt>def _translate(context, text, disambig):</dt>
<dd>return QtGui.QApplication.translate(context, text, disambig, _encoding)</dd>
</dl>
</dd>
<dt>except AttributeError:</dt>
<dd><dl class="first last docutils">
<dt>def _translate(context, text, disambig):</dt>
<dd>return QtGui.QApplication.translate(context, text, disambig)</dd>
</dl>
</dd>
</dl>
<p># &#8212;
# THE ABSTRACT ITEM MODEL
# &#8212;
#QComboBox
class QPreferenceModel(QAbstractItemModel):</p>
<blockquote>
<div><p>&#8220;&#8221;&#8221; Convention states only items with column index 0 can have children &#8220;&#8221;&#8221;
&#64;report_thread_error
def __init__(self, pref_struct, parent=None):</p>
<blockquote>
<div>super(QPreferenceModel, self).__init__(parent)
self.rootPref  = pref_struct</div></blockquote>
<p>&#64;report_thread_error
def index2Pref(self, index=QModelIndex()):</p>
<blockquote>
<div><p>&#8220;&#8221;&#8221; Internal helper method &#8220;&#8221;&#8221;
if index.isValid():</p>
<blockquote>
<div><p>item = index.internalPointer()
if item:</p>
<blockquote>
<div>return item</div></blockquote>
</div></blockquote>
<p>return self.rootPref</p>
</div></blockquote>
<p>#&#8212;&#8212;&#8212;&#8211;
# Overloaded ItemModel Read Functions
&#64;report_thread_error
def rowCount(self, parent=QModelIndex()):</p>
<blockquote>
<div>parentPref = self.index2Pref(parent)
return parentPref.qt_row_count()</div></blockquote>
<p>&#64;report_thread_error
def columnCount(self, parent=QModelIndex()):</p>
<blockquote>
<div>parentPref = self.index2Pref(parent)
return parentPref.qt_col_count()</div></blockquote>
<p>&#64;report_thread_error
def data(self, index, role=Qt.DisplayRole):</p>
<blockquote>
<div><p>&#8220;&#8221;&#8221; Returns the data stored under the given role
for the item referred to by the index. &#8220;&#8221;&#8221;
if not index.isValid():</p>
<blockquote>
<div>return QVariant()</div></blockquote>
<dl class="docutils">
<dt>if role != Qt.DisplayRole and role != Qt.EditRole:</dt>
<dd>return QVariant()</dd>
</dl>
<p>nodePref = self.index2Pref(index)
data = nodePref.qt_get_data(index.column())
var = QVariant(data)
#print(&#8216;&#8212; data() &#8212;&#8217;)
#print(&#8216;role = %r&#8217; % role)
#print(&#8216;data = %r&#8217; % data)
#print(&#8216;type(data) = %r&#8217; % type(data))
if isinstance(data, float):</p>
<blockquote>
<div>var = QVariant(QString.number(data, format=&#8217;g&#8217;, precision=6))</div></blockquote>
<dl class="docutils">
<dt>if isinstance(data, bool):</dt>
<dd>var = QVariant(data).toString()</dd>
<dt>if isinstance(data, int):</dt>
<dd>var = QVariant(data).toString()</dd>
</dl>
<p>#print(&#8216;var= %r&#8217; % var)
#print(&#8216;type(var)= %r&#8217; % type(var))
return var</p>
</div></blockquote>
<p>&#64;report_thread_error
def index(self, row, col, parent=QModelIndex()):</p>
<blockquote>
<div><p>&#8220;&#8221;&#8220;Returns the index of the item in the model specified
by the given row, column and parent index.&#8221;&#8220;&#8221;
if parent.isValid() and parent.column() != 0:</p>
<blockquote>
<div>return QModelIndex()</div></blockquote>
<p>parentPref = self.index2Pref(parent)
childPref  = parentPref.qt_get_child(row)
if childPref:</p>
<blockquote>
<div>return self.createIndex(row, col, childPref)</div></blockquote>
<dl class="docutils">
<dt>else:</dt>
<dd>return QModelIndex()</dd>
</dl>
</div></blockquote>
<p>&#64;report_thread_error
def parent(self, index=None):</p>
<blockquote>
<div><p>&#8220;&#8221;&#8220;Returns the parent of the model item with the given index.
If the item has no parent, an invalid QModelIndex is returned.&#8221;&#8220;&#8221;
if index is None:  # Overload with QObject.parent()</p>
<blockquote>
<div>return QObject.parent(self)</div></blockquote>
<dl class="docutils">
<dt>if not index.isValid():</dt>
<dd>return QModelIndex()</dd>
</dl>
<p>nodePref = self.index2Pref(index)
parentPref = nodePref.qt_get_parent()
if parentPref == self.rootPref:</p>
<blockquote>
<div>return QModelIndex()</div></blockquote>
<p>return self.createIndex(parentPref.qt_parents_index_of_me(), 0, parentPref)</p>
</div></blockquote>
<p>#&#8212;&#8212;&#8212;&#8211;
# Overloaded ItemModel Write Functions
&#64;report_thread_error
def flags(self, index):</p>
<blockquote>
<div><p>&#8220;&#8221;&#8220;Returns the item flags for the given index.&#8221;&#8220;&#8221;
if index.column() == 0:</p>
<blockquote>
<div># The First Column is just a label and unchangable
return Qt.ItemIsEnabled | Qt.ItemIsSelectable</div></blockquote>
<dl class="docutils">
<dt>if not index.isValid():</dt>
<dd>return Qt.ItemFlag(0)</dd>
</dl>
<p>childPref = self.index2Pref(index)
if childPref:</p>
<blockquote>
<div><dl class="docutils">
<dt>if childPref.qt_is_editable():</dt>
<dd>return Qt.ItemIsEditable | Qt.ItemIsEnabled | Qt.ItemIsSelectable</dd>
</dl>
</div></blockquote>
<p>return Qt.ItemFlag(0)</p>
</div></blockquote>
<p>&#64;report_thread_error
def setData(self, index, data, role=Qt.EditRole):</p>
<blockquote>
<div><p>&#8220;&#8221;&#8220;Sets the role data for the item at index to value.&#8221;&#8220;&#8221;
if role != Qt.EditRole:</p>
<blockquote>
<div>return False</div></blockquote>
<p>#print(&#8216;&#8212; setData() &#8212;&#8217;)
#print(&#8216;role = %r&#8217; % role)
#print(&#8216;data = %r&#8217; % data)
#print(&#8216;type(data) = %r&#8217; % type(data))
leafPref = self.index2Pref(index)
result = leafPref.qt_set_leaf_data(data)
if result is True:</p>
<blockquote>
<div>self.dataChanged.emit(index, index)</div></blockquote>
<p>return result</p>
</div></blockquote>
<p>&#64;report_thread_error
def headerData(self, section, orientation, role=Qt.DisplayRole):</p>
<blockquote>
<div><dl class="docutils">
<dt>if orientation == Qt.Horizontal and role == Qt.DisplayRole:</dt>
<dd><dl class="first last docutils">
<dt>if section == 0:</dt>
<dd>return QVariant(&#8216;Config Key&#8217;)</dd>
<dt>if section == 1:</dt>
<dd>return QVariant(&#8216;Config Value&#8217;)</dd>
</dl>
</dd>
</dl>
<p>return QVariant()</p>
</div></blockquote>
</div></blockquote>
<p># &#8212;
# THE PREFERENCE SKELETON
# &#8212;
class Ui_editPrefSkel(object):</p>
<blockquote>
<div><dl class="docutils">
<dt>def setupUi(self, editPrefSkel):</dt>
<dd>editPrefSkel.setObjectName(_fromUtf8(&#8216;editPrefSkel&#8217;))
editPrefSkel.resize(668, 530)
# Add Pane for TreeView
self.verticalLayout = QtGui.QVBoxLayout(editPrefSkel)
self.verticalLayout.setObjectName(_fromUtf8(&#8216;verticalLayout&#8217;))
# The TreeView for QAbstractItemModel to attach to
self.prefTreeView = QtGui.QTreeView(editPrefSkel)
self.prefTreeView.setObjectName(_fromUtf8(&#8216;prefTreeView&#8217;))
self.verticalLayout.addWidget(self.prefTreeView)
# Add Pane for buttons
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8(&#8216;horizontalLayout&#8217;))
#
#self.redrawBUT = QtGui.QPushButton(editPrefSkel)
#self.redrawBUT.setObjectName(_fromUtf8(&#8216;redrawBUT&#8217;))
#self.horizontalLayout.addWidget(self.redrawBUT)
##
#self.unloadFeaturesAndModelsBUT = QtGui.QPushButton(editPrefSkel)
#self.unloadFeaturesAndModelsBUT.setObjectName(_fromUtf8(&#8216;unloadFeaturesAndModelsBUT&#8217;))
#self.horizontalLayout.addWidget(self.unloadFeaturesAndModelsBUT)
#
self.defaultPrefsBUT = QtGui.QPushButton(editPrefSkel)
self.defaultPrefsBUT.setObjectName(_fromUtf8(&#8216;defaultPrefsBUT&#8217;))
self.horizontalLayout.addWidget(self.defaultPrefsBUT)
# Buttons are a child of the View
self.verticalLayout.addLayout(self.horizontalLayout)
self.retranslateUi(editPrefSkel)
QtCore.QMetaObject.connectSlotsByName(editPrefSkel)</dd>
<dt>def retranslateUi(self, editPrefSkel):</dt>
<dd># UTF-8 Support
editPrefSkel.setWindowTitle(_translate(&#8216;editPrefSkel&#8217;, &#8216;Edit Preferences&#8217;, None))
#self.redrawBUT.setText(_translate(&#8216;editPrefSkel&#8217;, &#8216;Redraw&#8217;, None))
#self.unloadFeaturesAndModelsBUT.setText(_translate(&#8216;editPrefSkel&#8217;, &#8216;Unload Features and Models&#8217;, None))
self.defaultPrefsBUT.setText(_translate(&#8216;editPrefSkel&#8217;, &#8216;Defaults&#8217;, None))</dd>
</dl>
</div></blockquote>
<p># &#8212;
# THE PREFERENCE WIDGET
# &#8212;
class EditPrefWidget(QWidget):</p>
<blockquote>
<div><p>&#8220;&#8221;&#8220;The Settings Pane; Subclass of Main Windows.&#8221;&#8220;&#8221;
def __init__(self, pref_struct):</p>
<blockquote>
<div>super(EditPrefWidget, self).__init__()
self.ui = Ui_editPrefSkel()
self.ui.setupUi(self)
self.pref_model = None
self.populatePrefTreeSlot(pref_struct)
#self.ui.redrawBUT.clicked.connect(fac.redraw)
#self.ui.defaultPrefsBUT.clicked.connect(fac.default_prefs)
#self.ui.unloadFeaturesAndModelsBUT.clicked.connect(fac.unload_features_and_models)</div></blockquote>
<p>&#64;pyqtSlot(Pref, name=&#8217;populatePrefTreeSlot&#8217;)
def populatePrefTreeSlot(self, pref_struct):</p>
<blockquote>
<div>&#8220;&#8221;&#8220;Populates the Preference Tree Model&#8221;&#8220;&#8221;
#printDBG(&#8216;Bulding Preference Model of: &#8216; + repr(pref_struct))
#Creates a QStandardItemModel that you can connect to a QTreeView
self.pref_model = QPreferenceModel(pref_struct)
#printDBG(&#8216;Built: &#8216; + repr(self.pref_model))
self.ui.prefTreeView.setModel(self.pref_model)
self.ui.prefTreeView.header().resizeSection(0, 250)</div></blockquote>
<dl class="docutils">
<dt>def refresh_layout(self):</dt>
<dd>self.pref_model.layoutAboutToBeChanged.emit()
self.pref_model.layoutChanged.emit()</dd>
</dl>
</div></blockquote>
</div>
<div class="section" id="module-utool._internal.meta_util_arg">
<span id="utool-internal-meta-util-arg-module"></span><h2>utool._internal.meta_util_arg module<a class="headerlink" href="#module-utool._internal.meta_util_arg" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="utool._internal.meta_util_arg.get_argflag">
<code class="descclassname">utool._internal.meta_util_arg.</code><code class="descname">get_argflag</code><span class="sig-paren">(</span><em>flag</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_arg.html#get_argflag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_arg.get_argflag" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_arg.get_argval">
<code class="descclassname">utool._internal.meta_util_arg.</code><code class="descname">get_argval</code><span class="sig-paren">(</span><em>argstr</em>, <em>type_=None</em>, <em>default=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_arg.html#get_argval"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_arg.get_argval" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a value of an argument specified on the command line after some flag</p>
<p>python -c &#8220;import utool; print([(type(x), x) for x in [utool.get_argval(&#8216;&#8211;quest&#8217;)]])&#8221; &#8211;quest=&#8221;holy grail&#8221;
python -c &#8220;import utool; print([(type(x), x) for x in [utool.get_argval(&#8216;&#8211;quest&#8217;)]])&#8221; &#8211;quest=&#8221;42&#8221;
python -c &#8220;import utool; print([(type(x), x) for x in [utool.get_argval(&#8216;&#8211;quest&#8217;)]])&#8221; &#8211;quest=42
python -c &#8220;import utool; print([(type(x), x) for x in [utool.get_argval(&#8216;&#8211;quest&#8217;)]])&#8221; &#8211;quest 42
python -c &#8220;import utool; print([(type(x), x) for x in [utool.get_argval(&#8216;&#8211;quest&#8217;, float)]])&#8221; &#8211;quest 42</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">utool.util_arg</span> <span class="kn">import</span> <span class="o">*</span>  <span class="c"># NOQA</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">sys</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="o">.</span><span class="n">extend</span><span class="p">([</span><span class="s">&#39;--spam&#39;</span><span class="p">,</span> <span class="s">&#39;eggs&#39;</span><span class="p">,</span> <span class="s">&#39;--quest=holy grail&#39;</span><span class="p">,</span> <span class="s">&#39;--ans=42&#39;</span><span class="p">])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">get_argval</span><span class="p">(</span><span class="s">&#39;--spam&#39;</span><span class="p">,</span> <span class="n">type_</span><span class="o">=</span><span class="nb">str</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
<span class="go">eggs</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">get_argval</span><span class="p">(</span><span class="s">&#39;--quest&#39;</span><span class="p">,</span> <span class="n">type_</span><span class="o">=</span><span class="nb">str</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
<span class="go">holy grail</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">get_argval</span><span class="p">(</span><span class="s">&#39;--ans&#39;</span><span class="p">,</span> <span class="n">type_</span><span class="o">=</span><span class="nb">int</span><span class="p">,</span> <span class="n">default</span><span class="o">=</span><span class="bp">None</span><span class="p">)</span>
<span class="go">42</span>
</pre></div>
</div>
</dd></dl>

</div>
<div class="section" id="module-utool._internal.meta_util_cache">
<span id="utool-internal-meta-util-cache-module"></span><h2>utool._internal.meta_util_cache module<a class="headerlink" href="#module-utool._internal.meta_util_cache" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="utool._internal.meta_util_cache.global_cache_read">
<code class="descclassname">utool._internal.meta_util_cache.</code><code class="descname">global_cache_read</code><span class="sig-paren">(</span><em>key</em>, <em>appname=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_cache.html#global_cache_read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_cache.global_cache_read" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
<div class="section" id="module-utool._internal.meta_util_constants">
<span id="utool-internal-meta-util-constants-module"></span><h2>utool._internal.meta_util_constants module<a class="headerlink" href="#module-utool._internal.meta_util_constants" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-utool._internal.meta_util_cplat">
<span id="utool-internal-meta-util-cplat-module"></span><h2>utool._internal.meta_util_cplat module<a class="headerlink" href="#module-utool._internal.meta_util_cplat" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="utool._internal.meta_util_cplat.get_app_resource_dir">
<code class="descclassname">utool._internal.meta_util_cplat.</code><code class="descname">get_app_resource_dir</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_cplat.html#get_app_resource_dir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_cplat.get_app_resource_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a writable directory for an application
Input: appname - the name of the application</p>
<blockquote>
<div><a href="#id9"><span class="problematic" id="id10">*</span></a>args, - any other subdirectories may be specified</div></blockquote>
</dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_cplat.get_resource_dir">
<code class="descclassname">utool._internal.meta_util_cplat.</code><code class="descname">get_resource_dir</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_cplat.html#get_resource_dir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_cplat.get_resource_dir" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a directory which should be writable for any application</p>
</dd></dl>

</div>
<div class="section" id="module-utool._internal.meta_util_dbg">
<span id="utool-internal-meta-util-dbg-module"></span><h2>utool._internal.meta_util_dbg module<a class="headerlink" href="#module-utool._internal.meta_util_dbg" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="utool._internal.meta_util_dbg.get_caller_lineno">
<code class="descclassname">utool._internal.meta_util_dbg.</code><code class="descname">get_caller_lineno</code><span class="sig-paren">(</span><em>N=0</em>, <em>strict=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_dbg.html#get_caller_lineno"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_dbg.get_caller_lineno" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_dbg.get_caller_name">
<code class="descclassname">utool._internal.meta_util_dbg.</code><code class="descname">get_caller_name</code><span class="sig-paren">(</span><em>N=0</em>, <em>strict=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_dbg.html#get_caller_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_dbg.get_caller_name" title="Permalink to this definition">¶</a></dt>
<dd><p>Standalone version of get_caller_name</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_dbg.get_stack_frame">
<code class="descclassname">utool._internal.meta_util_dbg.</code><code class="descname">get_stack_frame</code><span class="sig-paren">(</span><em>N=0</em>, <em>strict=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_dbg.html#get_stack_frame"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_dbg.get_stack_frame" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
<div class="section" id="module-utool._internal.meta_util_git">
<span id="utool-internal-meta-util-git-module"></span><h2>utool._internal.meta_util_git module<a class="headerlink" href="#module-utool._internal.meta_util_git" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="utool._internal.meta_util_git.can_push">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">can_push</code><span class="sig-paren">(</span><em>repo_url</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#can_push"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.can_push" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_git.cd">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">cd</code><span class="sig-paren">(</span><em>dir_</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#cd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.cd" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_git.cmd">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">cmd</code><span class="sig-paren">(</span><em>command</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.cmd" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_git.ensure_ssh_url">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">ensure_ssh_url</code><span class="sig-paren">(</span><em>repo_url</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#ensure_ssh_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.ensure_ssh_url" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_git.fix_repo_url">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">fix_repo_url</code><span class="sig-paren">(</span><em>repo_url</em>, <em>in_type=u'https'</em>, <em>out_type=u'ssh'</em>, <em>format_dict={u'ssh': (u'.com:'</em>, <em>u'git&#64;')</em>, <em>u'https': (u'.com/'</em>, <em>u'https://')}</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#fix_repo_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.fix_repo_url" title="Permalink to this definition">¶</a></dt>
<dd><p>Changes the repo_url format</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_git.get_computer_name">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">get_computer_name</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#get_computer_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.get_computer_name" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_git.get_repo_dirs">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">get_repo_dirs</code><span class="sig-paren">(</span><em>repo_urls</em>, <em>checkout_dir</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#get_repo_dirs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.get_repo_dirs" title="Permalink to this definition">¶</a></dt>
<dd><p># TODO Fix name</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_git.get_repo_dname">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">get_repo_dname</code><span class="sig-paren">(</span><em>repo_url</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#get_repo_dname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.get_repo_dname" title="Permalink to this definition">¶</a></dt>
<dd><p>Break url into a dirname</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_git.repo_list">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">repo_list</code><span class="sig-paren">(</span><em>repo_urls</em>, <em>checkout_dir</em>, <em>forcessh=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#repo_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.repo_list" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_git.set_userid">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">set_userid</code><span class="sig-paren">(</span><em>userid=None</em>, <em>permitted_repos=[]</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#set_userid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.set_userid" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_git.url_list">
<code class="descclassname">utool._internal.meta_util_git.</code><code class="descname">url_list</code><span class="sig-paren">(</span><em>repo_urls</em>, <em>forcessh=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_git.html#url_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_git.url_list" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
<div class="section" id="module-utool._internal.meta_util_iter">
<span id="utool-internal-meta-util-iter-module"></span><h2>utool._internal.meta_util_iter module<a class="headerlink" href="#module-utool._internal.meta_util_iter" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="utool._internal.meta_util_iter.ensure_iterable">
<code class="descclassname">utool._internal.meta_util_iter.</code><code class="descname">ensure_iterable</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_iter.html#ensure_iterable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_iter.ensure_iterable" title="Permalink to this definition">¶</a></dt>
<dd><table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>obj</strong> (<em>scalar or iterable</em>) &#8211; </td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">obj if it was iterable otherwise [obj]</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">it3erable</td>
</tr>
</tbody>
</table>
<p class="rubric">CommandLine:</p>
<div class="highlight-bash"><div class="highlight"><pre>python -m utool._internal.meta_util_iter --test-ensure_iterable
</pre></div>
</div>
<dl class="docutils">
<dt>Timeit:</dt>
<dd>%timeit ut.ensure_iterable([1])
%timeit ut.ensure_iterable(1)
%timeit ut.ensure_iterable(np.array(1))
%timeit ut.ensure_iterable([1])
%timeit [1]</dd>
</dl>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="c"># DISABLE_DOCTEST</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">utool._internal.meta_util_iter</span> <span class="kn">import</span> <span class="o">*</span>  <span class="c"># NOQA</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># build test data</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj_list</span> <span class="o">=</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="p">[</span><span class="mi">3</span><span class="p">],</span> <span class="s">&#39;3&#39;</span><span class="p">,</span> <span class="p">(</span><span class="mi">3</span><span class="p">,),</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">]]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># execute function</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span> <span class="o">=</span> <span class="p">[</span><span class="n">ensure_iterable</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span> <span class="k">for</span> <span class="n">obj</span> <span class="ow">in</span> <span class="n">obj_list</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># verify results</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span> <span class="o">=</span> <span class="nb">str</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="go">[[3], [3], [&#39;3&#39;], (3,), [3, 4, 5]]</span>
</pre></div>
</div>
</dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_iter.isiterable">
<code class="descclassname">utool._internal.meta_util_iter.</code><code class="descname">isiterable</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_iter.html#isiterable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_iter.isiterable" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns if the object can be iterated over and is NOT a string
# TODO: implement isscalar similar to numpy</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>obj</strong> (<em>scalar or iterable</em>) &#8211; </td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"></td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">bool</td>
</tr>
</tbody>
</table>
<p class="rubric">CommandLine:</p>
<div class="highlight-bash"><div class="highlight"><pre>python -m utool._internal.meta_util_iter --test-isiterable
</pre></div>
</div>
<p class="rubric">Example</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="c"># DISABLE_DOCTEST</span>
<span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">utool._internal.meta_util_iter</span> <span class="kn">import</span> <span class="o">*</span>  <span class="c"># NOQA</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># build test data</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">obj_list</span> <span class="o">=</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="p">[</span><span class="mi">3</span><span class="p">],</span> <span class="s">&#39;3&#39;</span><span class="p">,</span> <span class="p">(</span><span class="mi">3</span><span class="p">,),</span> <span class="p">[</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">]]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># execute function</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">result</span> <span class="o">=</span> <span class="p">[</span><span class="n">isiterable</span><span class="p">(</span><span class="n">obj</span><span class="p">)</span> <span class="k">for</span> <span class="n">obj</span> <span class="ow">in</span> <span class="n">obj_list</span><span class="p">]</span>
<span class="gp">&gt;&gt;&gt; </span><span class="c"># verify results</span>
<span class="gp">&gt;&gt;&gt; </span><span class="k">print</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="go">[False, True, False, True, True]</span>
</pre></div>
</div>
</dd></dl>

</div>
<div class="section" id="module-utool._internal.meta_util_path">
<span id="utool-internal-meta-util-path-module"></span><h2>utool._internal.meta_util_path module<a class="headerlink" href="#module-utool._internal.meta_util_path" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="utool._internal.meta_util_path.ensuredir">
<code class="descclassname">utool._internal.meta_util_path.</code><code class="descname">ensuredir</code><span class="sig-paren">(</span><em>dpath</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_path.html#ensuredir"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_path.ensuredir" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_path.truepath">
<code class="descclassname">utool._internal.meta_util_path.</code><code class="descname">truepath</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_path.html#truepath"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_path.truepath" title="Permalink to this definition">¶</a></dt>
<dd><p>Normalizes and returns absolute path with so specs</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_path.unixjoin">
<code class="descclassname">utool._internal.meta_util_path.</code><code class="descname">unixjoin</code><span class="sig-paren">(</span><em>*args</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_path.html#unixjoin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_path.unixjoin" title="Permalink to this definition">¶</a></dt>
<dd><p>Like os.path.join, but uses forward slashes on win32</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_path.unixpath">
<code class="descclassname">utool._internal.meta_util_path.</code><code class="descname">unixpath</code><span class="sig-paren">(</span><em>path</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_path.html#unixpath"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_path.unixpath" title="Permalink to this definition">¶</a></dt>
<dd><p>TODO: rename to unix_truepath
Corrects fundamental problems with windows paths.~</p>
</dd></dl>

</div>
<div class="section" id="module-utool._internal.meta_util_six">
<span id="utool-internal-meta-util-six-module"></span><h2>utool._internal.meta_util_six module<a class="headerlink" href="#module-utool._internal.meta_util_six" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="utool._internal.meta_util_six.ensure_unicode">
<code class="descclassname">utool._internal.meta_util_six.</code><code class="descname">ensure_unicode</code><span class="sig-paren">(</span><em>str_</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_six.html#ensure_unicode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_six.ensure_unicode" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>TODO:</dt>
<dd>rob gp &#8220;isinstance(.*\bstr\b)&#8221;</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_six.get_funccode">
<code class="descclassname">utool._internal.meta_util_six.</code><code class="descname">get_funccode</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_six.html#get_funccode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_six.get_funccode" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_six.get_funcdoc">
<code class="descclassname">utool._internal.meta_util_six.</code><code class="descname">get_funcdoc</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_six.html#get_funcdoc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_six.get_funcdoc" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_six.get_funcglobals">
<code class="descclassname">utool._internal.meta_util_six.</code><code class="descname">get_funcglobals</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_six.html#get_funcglobals"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_six.get_funcglobals" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_six.get_funcname">
<code class="descclassname">utool._internal.meta_util_six.</code><code class="descname">get_funcname</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_six.html#get_funcname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_six.get_funcname" title="Permalink to this definition">¶</a></dt>
<dd><p>Weird behavior for classes
I dont know why this returns type / None
import lasagne
lasagne.layers.InputLayer
lasagne.layers.InputLayer.__module__
lasagne.layers.InputLayer.__class__.__name__ == &#8216;type&#8217;
lasagne.layers.InputLayer.__class__ is type
wtf</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_six.get_imfunc">
<code class="descclassname">utool._internal.meta_util_six.</code><code class="descname">get_imfunc</code><span class="sig-paren">(</span><em>func</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_six.html#get_imfunc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_six.get_imfunc" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_six.set_funcdoc">
<code class="descclassname">utool._internal.meta_util_six.</code><code class="descname">set_funcdoc</code><span class="sig-paren">(</span><em>func</em>, <em>newdoc</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_six.html#set_funcdoc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_six.set_funcdoc" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.meta_util_six.set_funcname">
<code class="descclassname">utool._internal.meta_util_six.</code><code class="descname">set_funcname</code><span class="sig-paren">(</span><em>func</em>, <em>newname</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/meta_util_six.html#set_funcname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.meta_util_six.set_funcname" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>
<div class="section" id="module-utool._internal.py2_syntax_funcs">
<span id="utool-internal-py2-syntax-funcs-module"></span><h2>utool._internal.py2_syntax_funcs module<a class="headerlink" href="#module-utool._internal.py2_syntax_funcs" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="utool._internal.py2_syntax_funcs.ignores_exc_tb">
<code class="descclassname">utool._internal.py2_syntax_funcs.</code><code class="descname">ignores_exc_tb</code><span class="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/py2_syntax_funcs.html#ignores_exc_tb"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.py2_syntax_funcs.ignores_exc_tb" title="Permalink to this definition">¶</a></dt>
<dd><p>PYTHON 2 ONLY VERSION &#8211; needs to be in its own file for syntactic reasons</p>
<p>ignore_exc_tb decorates a function and remove both itself
and the function from any exception traceback that occurs.</p>
<p>This is useful to decorate other trivial decorators
which are polluting your stacktrace.</p>
</dd></dl>

</div>
<div class="section" id="module-utool._internal.randomwrap">
<span id="utool-internal-randomwrap-module"></span><h2>utool._internal.randomwrap module<a class="headerlink" href="#module-utool._internal.randomwrap" title="Permalink to this headline">¶</a></h2>
<p>This is a minimal Python client for Mads Haahr&#8217;s random number generator at www.random.org</p>
<p># This tiny set of functions only implements a subset of the HTTP interface available. In particular it only uses the &#8216;live&#8217;
# random number generator, and doesn&#8217;t offer the option of using the alternative &#8216;stored&#8217; random
# number sets. However, it should be obvious how to extend it by sending requests with different parameters.
# The web service code is modelled on Mark Pilgrim&#8217;s &#8220;Dive into Python&#8221; tutorial at <a class="reference external" href="http://www.diveintopython.org/http_web_services">http://www.diveintopython.org/http_web_services</a>
# This client by George Dunbar, University of Warwick (Copyright George Dunbar, 2008)
# It is distributed under the Gnu General Public License.</p>
<blockquote>
<div><p>This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.</p>
<p>See &lt;<a class="reference external" href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt; for a copy of the GNU General Public License.
For use that falls outside this license, please contact me.</p>
</div></blockquote>
<p>To use in a python script or at the interactive prompt
(randomwrapy.py has to be in the Python search path, of course):</p>
<p>from randomwrapy import *</p>
<dl class="docutils">
<dt>rnumlistwithoutreplacement(0, 12)</dt>
<dd># returns a list of the integers 0 - 12 inclusive, in a random order</dd>
<dt>rnumlistwithreplacement(12, 5)</dt>
<dd># returns 12 integers from the range [0, 5]</dd>
<dt>rnumlistwithreplacement(12, 5, 2)</dt>
<dd># returns 12 integers from the range [2, 5]</dd>
<dt>rrandom()</dt>
<dd># returns a random float in the range [0, 1]</dd>
<dt>reportquota()</dt>
<dd># tells you how many bits you have available; visit www.random.org/quota for more information</dd>
</dl>
<p>Arguments where given are (must be) numbers, of course.
There is almost no error checking in these scripts! For example, if
the web site is down, Python will simply raise an exception and report the
http error code. See worldrandom.py for an alternative implementation
that goes a little further with error checking.</p>
<dl class="function">
<dt id="utool._internal.randomwrap.build_request_parameterNR">
<code class="descclassname">utool._internal.randomwrap.</code><code class="descname">build_request_parameterNR</code><span class="sig-paren">(</span><em>min</em>, <em>max</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/randomwrap.html#build_request_parameterNR"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.randomwrap.build_request_parameterNR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.randomwrap.build_request_parameterWR">
<code class="descclassname">utool._internal.randomwrap.</code><code class="descname">build_request_parameterWR</code><span class="sig-paren">(</span><em>howmany</em>, <em>min</em>, <em>max</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/randomwrap.html#build_request_parameterWR"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.randomwrap.build_request_parameterWR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.randomwrap.checkquota">
<code class="descclassname">utool._internal.randomwrap.</code><code class="descname">checkquota</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/randomwrap.html#checkquota"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.randomwrap.checkquota" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.randomwrap.reportquota">
<code class="descclassname">utool._internal.randomwrap.</code><code class="descname">reportquota</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/randomwrap.html#reportquota"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.randomwrap.reportquota" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="utool._internal.randomwrap.rnumlistwithoutreplacement">
<code class="descclassname">utool._internal.randomwrap.</code><code class="descname">rnumlistwithoutreplacement</code><span class="sig-paren">(</span><em>min</em>, <em>max</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/randomwrap.html#rnumlistwithoutreplacement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.randomwrap.rnumlistwithoutreplacement" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a randomly ordered list of the integers between min and max</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.randomwrap.rnumlistwithreplacement">
<code class="descclassname">utool._internal.randomwrap.</code><code class="descname">rnumlistwithreplacement</code><span class="sig-paren">(</span><em>howmany</em>, <em>max</em>, <em>min=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/randomwrap.html#rnumlistwithreplacement"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.randomwrap.rnumlistwithreplacement" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of howmany integers with a maximum value = max.
The minimum value defaults to zero.</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.randomwrap.rrandom">
<code class="descclassname">utool._internal.randomwrap.</code><code class="descname">rrandom</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/randomwrap.html#rrandom"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.randomwrap.rrandom" title="Permalink to this definition">¶</a></dt>
<dd><p>Get the next random number in the range [0.0, 1.0].
Returns a float.</p>
</dd></dl>

</div>
<div class="section" id="module-utool._internal.util_importer">
<span id="utool-internal-util-importer-module"></span><h2>utool._internal.util_importer module<a class="headerlink" href="#module-utool._internal.util_importer" title="Permalink to this headline">¶</a></h2>
<p>NEEDS CLEANUP SO IT EITHER DOES THE IMPORTS OR GENERATES THE FILE</p>
<p>python -c &#8220;import utool&#8221;</p>
<dl class="function">
<dt id="utool._internal.util_importer.dynamic_import">
<code class="descclassname">utool._internal.util_importer.</code><code class="descname">dynamic_import</code><span class="sig-paren">(</span><em>modname</em>, <em>IMPORT_TUPLES</em>, <em>developing=True</em>, <em>ignore_froms=[]</em>, <em>dump=False</em>, <em>ignore_startswith=[]</em>, <em>ignore_endswith=[]</em>, <em>ignore_list=[]</em>, <em>verbose=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/util_importer.html#dynamic_import"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.util_importer.dynamic_import" title="Permalink to this definition">¶</a></dt>
<dd><p>MAIN ENTRY POINT</p>
<p>Dynamically import listed util libraries and their attributes.
Create reload_subs function.</p>
<p>Using __import__ like this is typically not considered good style However,
it is better than import * and this will generate the good file text that
can be used when the module is &#8216;frozen&#8221;</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.util_importer.make_import_tuples">
<code class="descclassname">utool._internal.util_importer.</code><code class="descname">make_import_tuples</code><span class="sig-paren">(</span><em>module_path</em>, <em>exclude_modnames=[]</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/util_importer.html#make_import_tuples"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.util_importer.make_import_tuples" title="Permalink to this definition">¶</a></dt>
<dd><p>Infer the IMPORT_TUPLES from a module_path</p>
</dd></dl>

<dl class="function">
<dt id="utool._internal.util_importer.make_initstr">
<code class="descclassname">utool._internal.util_importer.</code><code class="descname">make_initstr</code><span class="sig-paren">(</span><em>modname</em>, <em>IMPORT_TUPLES</em>, <em>verbose=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/utool/_internal/util_importer.html#make_initstr"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#utool._internal.util_importer.make_initstr" title="Permalink to this definition">¶</a></dt>
<dd><p>Just creates the string representation. Does no importing.</p>
</dd></dl>

</div>
<div class="section" id="utool-internal-win32-send-keys-module">
<h2>utool._internal.win32_send_keys module<a class="headerlink" href="#utool-internal-win32-send-keys-module" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-utool._internal">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-utool._internal" title="Permalink to this headline">¶</a></h2>
<p>Need to hack to make work for internal modules and reload subs properly</p>
<dl class="docutils">
<dt>Regen Command:</dt>
<dd>cd /home/joncrall/code/utool/utool/_internal
makeinit.py -x win32_send_keys</dd>
</dl>
</div>
</div>


           </div>
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="utool.experimental.html" class="btn btn-neutral float-right" title="utool.experimental package" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="utool.html" class="btn btn-neutral" title="utool package" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2016, Jon Crall.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'1.1.2.dev1',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true
        };
    </script>
      <script type="text/javascript" src="_static/jquery.js"></script>
      <script type="text/javascript" src="_static/underscore.js"></script>
      <script type="text/javascript" src="_static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="_static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>