<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Lloyd,<br>
    <br>
    Yes I would agree that this seems to be a limitation in sqlite. I
    had hoped that there was an alternate connect() method that would
    take a file descriptor as an argument as QFile can return its file
    descriptor, unfortunately no such luck.<br>
    <br>
    How difficult would it be to "connect" the resource file the python
    filesystem as a read-only filesystem? Or perhaps "hook" the open()
    command and somehow insert pyqt's resource file system.<br>
    <br>
    Cheers,<br>
    Michael<br>
    <br>
    <div class="moz-cite-prefix">On 2/25/15 5:28 AM, lloyd konneker
      wrote:<br>
    </div>
    <blockquote cite="mid:54EDCE0F.7020905@nc.rr.com" type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      <div class="moz-cite-prefix">Just talking, to check our
        understanding ...<br>
        <br>
        So 'pyqt's resource file system' is not a file system of the OS,
        and must be accessed via Qt functions.  Sqllite does not use
        those Qt functions.<br>
        <br>
        It seems to me it is a limitation of Sqllite:   it only supports
        file systems offered by the OS, and doesn't allow the database
        data to be in say a stream that you can pass to connect().  I am
        not sure if that makes sense, I suppose the data file must offer
        block access instead of just sequential access for it to be of
        use as a database.  Unless you are really talking about a small
        amount of data, or data for which you really don't need
        relational database access.<br>
        <br>
        <br>
        On 02/24/2015 06:17 PM, Drembedded wrote:<br>
      </div>
      <blockquote cite="mid:54ED0682.4050301@yahoo.com" type="cite">
        <meta content="text/html; charset=utf-8"
          http-equiv="Content-Type">
        Lloyd,<br>
        <br>
        Thank you for your response. Doing this results in the same
        directory structure: ':/pyqtdeploy_ptest1' that I've hardcoded
        into the sqlite3.connect() call: essentially the directory
        within the resource file.<br>
        <br>
        Thats a great way to discover the full path into the resource
        file if you're using pyqt calls but unfortunately any other
        methods that use "standard Python file access functions such as
        sqlite3.connect() don't seem to be able to access the pyqt's
        resource file system. <br>
        <br>
        This limitation is noted in the tutorial: <a
          moz-do-not-send="true" class="moz-txt-link-freetext"
          href="http://pyqt.sourceforge.net/Docs/pyqtdeploy/tutorial.html">http://pyqt.sourceforge.net/Docs/pyqtdeploy/tutorial.html</a><br>
        <br>
        <meta charset="utf-8">
        <p class="first admonition-title" style="margin: 0px 10px 5px
          0px; font-weight: bold; display: inline; text-align: justify;
          line-height: 15.6000003814697px; color: rgb(0, 0, 0);
          font-family: Times; font-size: 12px; font-style: normal;
          font-variant: normal; letter-spacing: normal; orphans: auto;
          text-indent: 0px; text-transform: none; white-space: normal;
          widows: auto; word-spacing: 0px; -webkit-text-stroke-width:
          0px;">Note</p>
        <span style="color: rgb(0, 0, 0); font-family: Times; font-size:
          12px; font-style: normal; font-variant: normal; font-weight:
          normal; letter-spacing: normal; line-height:
          15.6000003814697px; orphans: auto; text-align: justify;
          text-indent: 0px; text-transform: none; white-space: normal;
          widows: auto; word-spacing: 0px; -webkit-text-stroke-width:
          0px; display: inline !important; float: none;
          background-color: rgb(238, 238, 238);"><span
            class="Apple-converted-space"> </span></span>
        <p class="last" style="margin-top: 0px; text-align: justify;
          line-height: 15.6000003814697px; margin-bottom: 5px; display:
          inline; color: rgb(0, 0, 0); font-family: Times; font-size:
          12px; font-style: normal; font-variant: normal; font-weight:
          normal; letter-spacing: normal; orphans: auto; text-indent:
          0px; text-transform: none; white-space: normal; widows: auto;
          word-spacing: 0px; -webkit-text-stroke-width: 0px;">Non-Python
          (i.e. data) files can also be included in the package. An
          application typically accesses such files by using the<span
            class="Apple-converted-space"> </span><tt class="xref py
            py-func docutils literal" style="padding: 0px 1px;
            font-size: 0.95em; font-weight: bold; background: rgb(214,
            214, 214);"><span class="pre">QFileInfo.absolutePath()</span></tt><span
            class="Apple-converted-space"> </span>function on the<span
            class="Apple-converted-space"> </span><tt class="xref py
            py-data docutils literal" style="padding: 0px 1px;
            font-size: 0.95em; font-weight: bold; background: rgb(214,
            214, 214);"><span class="pre">__file__</span></tt><span
            class="Apple-converted-space"> </span>attribute of a module
          to obtain the name of the directory containing the data file.
          This approach will also work with deployed applications so
          long as the file is accessed using the<span
            class="Apple-converted-space"> </span><tt class="xref py
            py-class docutils literal" style="padding: 0px 1px;
            font-size: 0.95em; font-weight: bold; background: rgb(214,
            214, 214);"><span class="pre">QFile</span></tt><span
            class="Apple-converted-space"> </span>class (rather than the
          standard Python file access functions). However QML files
          require slightly different treatment as their locations are
          specified using a URL.</p>
        <br>
        <br>
        So right now my only way around this issue is to copy my sqlite3
        database file on to the IPad's file system which I can "see"
        using standrd Pythn file access functions such as
        pprint.pprint(os.listdir()) which returns:<br>
        <br>
        <meta name="qrichtext" content="1">
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><!--StartFragment--><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;">['.Trashes',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> '.file',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> '.fseventsd',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'Applications',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'Developer',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'Library',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'System',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'bin',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'cores',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'dev',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'etc',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'private',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'sbin',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'tmp',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'usr',</span></p>
        <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
          margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span
            style=" font-family:'Monaco'; font-size:12pt;
            color:#000000;"> 'var']</span><!--EndFragment--></p>
        <meta http-equiv="Content-Type" content="text/html;
          charset=utf-8">
        <style type="text/css">
p, li { white-space: pre-wrap; }
</style><br>
        Hopefully someone at Riverbank will chime in here and set me
        straight.<br>
        <br>
        Cheers,<br>
        Michael<br>
        <br>
        <div class="moz-cite-prefix">On 2/24/15 5:36 AM, lloyd konneker
          wrote:<br>
        </div>
        <blockquote cite="mid:54EC7E41.8040607@nc.rr.com" type="cite">Did

          you try using __file__ per the documentation here: <a
            moz-do-not-send="true" class="moz-txt-link-freetext"
            href="http://pyqt.sourceforge.net/Docs/pyqtdeploy/pyrcc.html">http://pyqt.sourceforge.net/Docs/pyqtdeploy/pyrcc.html</a>  

          ?? <br>
          <br>
          <br>
          _______________________________________________ <br>
          PyQt mailing list    <a moz-do-not-send="true"
            class="moz-txt-link-abbreviated"
            href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
          <br>
          <a moz-do-not-send="true" class="moz-txt-link-freetext"
            href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br>
        </blockquote>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>