index.lxp@lxpwrap=x4782_252ehtm.htm

来自「GUI Programming with Python」· HTM 代码 · 共 275 行

HTM
275
字号
    <table border="0" cellspacing="0" cellpadding="3" width="100%"><tr><td>    <div align="center" id="bldcontent">      <a href="../default.htm"><img src="../images/opendocs.png" width="63" height="76" border="0"></a>      <br>      <div class="symbol">Your OpenSource Publisher&#153;</div>    </div>      </td></tr></table>    <div align="center" class="author">      	<a href="../products.lxp">Products</a>	&nbsp;|&nbsp;	<a href="../wheretobuy.lxp">Where to buy</a>	&nbsp;|&nbsp;	<a href="../bookstore.lxp">Retailers</a>	&nbsp;|&nbsp;	<a href="../faq.lxp">FAQ</a>	&nbsp;|&nbsp;        <a href="../writeforus.lxp">Write for Us.</a>        &nbsp;|&nbsp;        <a href="#contact">Contact Us.</a>  </div>    <table border="0" cellspacing="3" cellpadding="0" width="100%"><tr><td width="100%">      <div class="content">        <table border="0" cellspacing="2" cellpadding="0" width="100%"><tr><td width="100%">          <div align="center"><H4 CLASS="AUTHOR"><A NAME="AEN5">Boudewijn Rempt</A><br><a href="../../https@secure.linuxports.com/opendocs/default.htm"><img src=odpyqt125.png></a><br>ISBN: 0-97003300-4-4<br><a href="../../https@secure.linuxports.com/opendocs/default.htm">Available from bookstores everywhere or you can order it here.</a><p>You can download the source files for the book <a href="pyqtsrc.tgz">(code / eps) here.</a><hr></div>                    <HTML><HEAD><TITLE>Project layout</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.72"><LINKREL="HOME"TITLE="GUI Programming with Python: QT Edition"HREF="book1.htm"><LINKREL="UP"TITLE="Application Frameworks"HREF="c4631.htm"><LINKREL="PREVIOUS"TITLE="Macro languages"HREF="x4760.htm"><LINKREL="NEXT"TITLE="Actions: menus, toolbars and accelerators"HREF="c4807.htm"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">GUI Programming with Python: QT Edition</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><A accesskey="P" href="index.lxp@lxpwrap=x4760_252ehtm.htm">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 12. Application Frameworks</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><A accesskey="N" href="index.lxp@lxpwrap=c4807_252ehtm.htm">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1">Project layout</A></H1><P>A complex project needs to be      well-organized in order to be able to find your way in the mess      that is created by countless modules, README files, graphics      files and license notices. Most likely, your project directory      layout will also be the layout of the application when you      deliver it to the user. It thus serves a dual purpose:      facilitating development and deployment. For deployment, see      <A href="index.lxp@lxpwrap=c8349_252ehtm.htm">Chapter 26</A>.    </P><P>Over the last decade, a standard project      layout has grown to maturity for open source projects. This      layout consists of a toplevel directory that contains README's,      installation instructions, and directories for documentation,      data and source code.</P><P>A Python project often consists of several modules:      one for your document classes, one for custom GUI widgets and      one for the application classes, and one for scripts      needed to create database definitions. For example:</P><DIVCLASS="MEDIAOBJECT"><P><DIVCLASS="CAPTION"><P>The toplevel directory layout of a large          project</P></DIV></P></DIV><P>Here, the <TTCLASS="FILENAME">datamodel</TT>      directory contains SQL scripts to create the database. The      directory <TTCLASS="FILENAME">dbobj</TT> contains a module which      handles database access. The directory      <TTCLASS="FILENAME">dialogs</TT> contains designer .ui files. The      directory <TTCLASS="FILENAME">html</TT> contains the application      documentation in html format - it would be better to write the      documentation in docbook and automatically generate html and pdf      versions of the manual. Finally, the      <TTCLASS="FILENAME">kuraapp</TT>, <TTCLASS="FILENAME">kuralib</TT> and      <TTCLASS="FILENAME">kuragui</TT> directories are Python modules      (that will have to be put on the Python path) for the      application, document and custom widgets needed for this      application. <TTCLASS="FILENAME">notes</TT> contains implementation      notes and <TTCLASS="FILENAME">pixmaps</TT> graphics needed for the      toolbar. The rest of the files speak for themselves: starter      scripts for Windows and Unix, and various standard files, like      <TTCLASS="FILENAME">INSTALL</TT> and      <TTCLASS="FILENAME">CHANGELOG</TT></P><P>In contrast with Java application, it is      not wise to nest Python modules &#8212; keeping the structure      relatively flat makes it easier to import modules into each      other.</P><P>Generally, Python applications start out      very simple, with just one script file, and then blossom out in      modules and directories. The development of the codebase in this      part is a lively demonstration of that fact.</P></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><A accesskey="P" href="index.lxp@lxpwrap=x4760_252ehtm.htm">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><A accesskey="H" href="index.lxp@lxpwrap=book1_252ehtm">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><A accesskey="N" href="index.lxp@lxpwrap=c4807_252ehtm.htm">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Macro languages</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><A accesskey="U" href="index.lxp@lxpwrap=c4631_252ehtm.htm">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Actions: menus, toolbars and accelerators</TD></TR></TABLE></DIV></BODY></HTML>      </td>      </tr>      </table>      </td>    </tr>  </table>      

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?