亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? c88.htm

?? GUI Programming with Python
?? HTM
字號(hào):
<HTML><HEAD><TITLE>Introduction</TITLE><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.72"><LINKREL="HOME"TITLE="GUI Programming with Python: QT Edition"HREF="book1.htm"><LINKREL="PREVIOUS"TITLE="Acknowledgments"HREF="x76.htm"><LINKREL="NEXT"TITLE="GUI programming with Python"HREF="x179.htm"></HEAD><BODYCLASS="CHAPTER"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"><AHREF="x76.htm"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom"></TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="x179.htm"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="CHAPTER"><H1><ANAME="INTRODUCTION">Chapter 1. Introduction</A></H1><DIVCLASS="TOC"><DL><DT><B>Table of Contents</B></DT><DT><AHREF="c88.htm#AEN112">Python</A></DT><DT><AHREF="x179.htm">GUI programming with Python</A></DT><DT><AHREF="x258.htm">About the BlackAdder IDE</A></DT></DL></DIV><P>Developing decent software is difficult    &#8212; monstrously difficult, in fact. People are always looking    for miracle cures, silver bullets that will help them creating    great software in no time with no conscious effort. In fact,    almost everyone will agree to the existence of a &#8216;software    crisis'. Projects <SPAN><ICLASS="EMPHASIS">do</I></SPAN> deliver too little    functionality, too late and often of a too low quality. Frederick    Brooks was the first to note this, in his famous book    <ICLASS="CITETITLE">The燤ythical燤an-Month</I>. More's    the pity that there aren't any miraculous solutions for the many    problems that plague software development. </P><P>There is simply no single innovation that    will make you ten times more productive, no single innovation that    will ensure that whatever you do, you will produce bug-free    software and no single innovation that will make your applications    run will all the vim and vigor your users desire and    deserve.</P><P>However, it is quite possible, by simply    using the best possible tools and  practices, to be far more    productive than would be possible by following the usual practices    and by using inferior tools.  </P><P>It's amazing how many software development    environments have been designed with something else than developer    productivity as the main goal. There's Visual Basic, which, while    infinitely more productive than previous attempts at creating a    rapid development environment for Windows, still is mainly    concerned with preventing people from creating applications that    can compete with Microsofts' own applications. Java, while quite    usable, tries far too hard to protect me from myself and my    colleagues &#8212;  like early versions of Pascal. C++ is    enormously large and complicated, because of its compatibility    goals with C &#8212; almost too big to learn to handle. In    contrast, Python was designed to be small, practical and to be as    open as possible to the developer.</P><P>In Python, all other considerations, are    secondary to considerations of development speed, code    maintainability and code reusability.</P><P>Python offers everything you need to put the    best practices into practice, like object oriented design, unit    testing and maintaining documentation in the code, but it doesn't    keep you from messing with the more messy parts of the operating    system &#8212; you can always use an extension module written in C    or C++ &#8212; or with the internals of Python itself. It is ideal    for rapid prototyping, but also for the development of large    applications by large teams of programmers.</P><P>Python code is meant to be readable.    Indenting correctly and neatly is not merely a good habit: it is    essential to delimit blocks of code. Likewise, there is little use    for comic-book swearing characters like &#8216;!@#$#%$' that other    languages use to indicate the type of a variable, or even for    variable declarations and all those other things that keep you    from writing the logic of your application. The most famous    description of Python is that it's &#8216;executable    pseudo-code'!</P><P>However, what Python has been lacking until    recently was a good development environment. Of course, since all    Python code is simple text, and since you don't need    pre-processors or compilers, you can get by with nothing more than    a text editor, like <SPANCLASS="APPLICATION">XEmacs</SPAN>    <SPANCLASS="APPLICATION">Nedit</SPAN>, or    <SPANCLASS="APPLICATION">MultiEdit</SPAN>. Indeed, I've used    <SPANCLASS="APPLICATION">Nedit</SPAN> exclusively for years &#8212; but    some project management facilities, a tighter integration with a    GUI builder and a good debugger can make life infinitely more    pleasant, and thus productive.</P><P><SPANCLASS="APPLICATION">BlackAdder</SPAN> is    such an environment. Others are <SPANCLASS="APPLICATION">Wing      IDE</SPAN>, <SPANCLASS="APPLICATION">PythonWorks</SPAN>,    <SPANCLASS="APPLICATION">PythonWin</SPAN>,    <SPANCLASS="APPLICATION">Komodo</SPAN> and, perhaps,    <SPANCLASS="APPLICATION">IDLE</SPAN>. Of these, only    <SPANCLASS="APPLICATION">BlackAdder</SPAN> runs on both Windows and    Linux, includes a full-featured GUI designer and provides a    dependable debugger. Applications developed with Python and    BlackAdder can run on any Unix platform with X11 and on any    32-bits Windows platform (and in the near future on Apple's OS X,    too).</P><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="AEN112">Python</A></H1><P>Python is a modern programming language, with strong      object-oriented features, a small set of basic functions and      large set of libraries. The most important features of Python      are:</P><P></P><UL><LI><P>Compiled to byte-code, interpreted by a virtual            machine.</P></LI><LI><P>High-level data structures: lists, tuples and            dictionaries</P></LI><LI><P>Dynamic: you can even add new base-classes to an            existing object, run-time.</P></LI><LI><P>Portable: the same Python bytecode          will run &#8212; depending on which version of Python you          use and which C or C++ extensions are used &#8212; on Unix,          Windows, MacOS, Amiga, Palm OS and many others.</P></LI><LI><P>Extensible with modules written in          C or C++: there is <SPAN><ICLASS="EMPHASIS">no</I></SPAN> performance          penalty for calling native code, as there is when calling          native code from Java.</P></LI><LI><P>An object-oriented programming          model, but also supports functional programming (a bit) and          old-fashioned structured programming.</P></LI><LI><P>Enormous set of extension          libraries: for database access, high-performance          number-crunching, for sound-file analysis, for GUI          programming and countless other tasks.</P></LI><LI><P>Built-in regular expression engine          that works on both regular and Unicode strings.          </P></LI><LI><P>Use of indentation instead of braces          <TTCLASS="FUNCTION">begin</TT>/<TTCLASS="FUNCTION">end</TT> pairs to          delimit blocks of code. This practically forces readable          code.</P></LI></UL><P>Your Python code resides in files, ending      with <TTCLASS="FILENAME">.py</TT> suffix. These files can be grouped      in modules, in the form of directories with an indexfile called      <TTCLASS="FILENAME">__init__.py</TT>, and you can import elements      from modules and files in other files. There is one file you use      to start your application. It will usually simply import the      necessary modules and start the application explicitly in a      <TTCLASS="FUNCTION">main (args)</TT> function.</P><P>Maybe the introduction is bit <SPAN><ICLASS="EMPHASIS">early</I></SPAN> to      start with actual code examples, but let's have an example of a      Python bootstrap script anyway:</P><DIVCLASS="EXAMPLE"><ANAME="AEN143"></A><P><B>Example 1-1. Bootstrapping a Python application</B></P><PRECLASS="PROGRAMLISTING">#!/usr/bin/env python                                      <ANAME="HASHBANG"><IMGSRC="images/callouts/1.gif"HSPACE="0"VSPACE="0"BORDER="0"ALT="(1)"></A>## bootstrap.py#import sys                                                 <ANAME="IMPSYS"><IMGSRC="images/callouts/2.gif"HSPACE="0"VSPACE="0"BORDER="0"ALT="(2)"></A>from myapp import SomeClass                                <ANAME="IMPMYAPP"><IMGSRC="images/callouts/3.gif"HSPACE="0"VSPACE="0"BORDER="0"ALT="(3)"></A>def main(args):                                            <ANAME="DEFMAIN"><IMGSRC="images/callouts/4.gif"HSPACE="0"VSPACE="0"BORDER="0"ALT="(4)"></A>    class=SomeClass(args)    class.exec_loop()if __name__=="__main__":                                   <ANAME="IFNAME"><IMGSRC="images/callouts/5.gif"HSPACE="0"VSPACE="0"BORDER="0"ALT="(5)"></A>    main(sys.argv)        </PRE><DIVCLASS="CALLOUTLIST"><DLCOMPACT="COMPACT"><DT><AHREF="c88.htm#HASHBANG"><IMGSRC="images/callouts/1.gif"HSPACE="0"VSPACE="0"BORDER="0"ALT="(1)"></A></DT><DD>The              so-called &#8216;hash-bang' trick is useful on Unix systems              only. If the first line of any text file starts with #!,              then the system will try to execute the application that              follows the #! with the rest of the file as input. In              this case, the <BCLASS="COMMAND">env</B> utility starts              <BCLASS="COMMAND">python</B>, which runs the rest of the              script.</DD><DT><AHREF="c88.htm#IMPSYS"><IMGSRC="images/callouts/2.gif"HSPACE="0"VSPACE="0"BORDER="0"ALT="(2)"></A></DT><DD>The              standard Python module <BCLASS="COMMAND">sys</B> handles              tasks like passing on command-line arguments and lots of              other things. Here we import the module, so we can pass              the command-line arguments to the application. </DD><DT><AHREF="c88.htm#IMPMYAPP"><IMGSRC="images/callouts/3.gif"HSPACE="0"VSPACE="0"BORDER="0"ALT="(3)"></A></DT><DD>All              application code is in separate modules; the first of              these we import here.</DD><DT><AHREF="c88.htm#DEFMAIN"><IMGSRC="images/callouts/4.gif"HSPACE="0"VSPACE="0"BORDER="0"ALT="(4)"></A></DT><DD>This is              the definition of the main function. By encapsulating              this code in a function, it won't get run if this file              were imported from another file.</DD><DT><AHREF="c88.htm#IFNAME"><IMGSRC="images/callouts/5.gif"HSPACE="0"VSPACE="0"BORDER="0"ALT="(5)"></A></DT><DD>In this              line, we check if this is a top-level script, instead of              a file imported from another file. This is done by              looking at the variable <TTCLASS="VARNAME">__name__</TT>. If              this is the toplevel file, then the              <TTCLASS="FUNCTION">main(args)</TT> is run.</DD></DL></DIV></DIV><P>Python is, like Java, a language that is      compiled to bytecode. Python uses a virtual machine to run the      bytecode. This virtual machine is written in C and interprets      each byte-code instruction, translates it to real machine code      and then runs it. The Python virtual machine differs from the      Java virtual machine in that the byte-code instructions are a      bit more high-level, and that there are no JIT-compilers that      pre-compile chunks of byte-code to native machine code.</P><P>The translation from Python code to      byte-code only happens once: Python saves a compiled version of      your code in another file with the extension      <TTCLASS="FILENAME">.pyc</TT>, or an optimized compiled version of      your code that removes assert statements and line-number      tracking in a file with the extension      <TTCLASS="FILENAME">.pyo</TT>.</P><P>However, that is only done with Python      files that are imported from other files: the bootstrap script      will be compiled to bytecode every time you run it, but python      will create a <TTCLASS="FILENAME">myapp.pyc</TT> from a file      <TTCLASS="FILENAME">myapp.py</TT> (which is not shown here).</P><P>Interpreted languages, even byte-code      interpreted languages, have a reputation for sluggishness. On      the other hand, modern computers have a well-deserved reputation      for excessive processing power. The combination means that an      application written in a interpreted language can be fast enough      for almost any needs.</P><P>Certainly, anyone who has ever tried to      use a full-scale Java GUI application will know the exact      meaning of the expression &#8216;slow as frozen treacle'. There      are several reasons for the abominable slowness of Java      applications, the most important of which is the fact that all      Java Swing gui elements are also written in Java. Every pixel is      put on screen by Java. Python, on the other hand, makes clever      use of available GUI libraries that are coded in C or C++ and      thus run as native machine code.</P><P>The ease with which Python can make use      of native libraries is one of its strong points. Thanks to this      extensibility, you can write the logic of your application in      Python, and later rewrite the bottlenecks in C or C++. But even      without writing extension libraries, I have never encountered      any problem with the performance of a Python application.    </P></DIV></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"><AHREF="x76.htm"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="book1.htm"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="x179.htm"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Acknowledgments</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top">&nbsp;</TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">GUI programming with Python</TD></TR></TABLE></DIV></BODY></HTML>

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩成人高清| 午夜精品成人在线| 日韩一级大片在线| 欧美中文字幕一区二区三区亚洲| 激情都市一区二区| 日韩专区在线视频| 亚洲一区二区三区在线| 国产精品美女久久久久久| 精品电影一区二区| 久久在线免费观看| 2020国产精品自拍| 麻豆精品国产传媒mv男同| 天天综合网 天天综合色| 国产精品毛片大码女人| 久久精品人人做人人综合| 日韩欧美的一区二区| 欧美xxxx在线观看| 欧美大片国产精品| 久久蜜桃av一区二区天堂| 精品国产乱码久久久久久久| 日韩一区二区三区视频| 久久99久久精品欧美| 久久久久亚洲蜜桃| 久久久一区二区| 久久综合久久综合久久| 2021国产精品久久精品| 久久亚洲二区三区| 国产日韩欧美精品综合| 国产午夜精品在线观看| 中文字幕免费不卡| 中文字幕一区在线| 亚洲欧美福利一区二区| 一区二区三区四区乱视频| 亚洲福利一区二区| 91一区二区三区在线播放| 激情久久五月天| 精品一区二区三区视频 | 国产精品77777竹菊影视小说| 老司机精品视频导航| 久久爱www久久做| 国产成人在线观看| 色综合色综合色综合| 欧美日韩在线精品一区二区三区激情| 欧美精品在线一区二区| 欧美xxxxxxxx| 国产精品三级久久久久三级| 亚洲激情网站免费观看| 日韩一区精品字幕| 国内精品不卡在线| www.性欧美| 在线观看免费视频综合| 日韩欧美色综合| 欧美极品美女视频| 一区二区三区日韩欧美精品| 五月天激情综合| 国产精选一区二区三区| 成人av网在线| 在线一区二区视频| 色欧美88888久久久久久影院| 国产91富婆露脸刺激对白| 色综合亚洲欧洲| 欧美成人国产一区二区| 有坂深雪av一区二区精品| 久久国产麻豆精品| 国产精品一级黄| 欧美一区二区在线播放| 国产精品日韩成人| 狠狠网亚洲精品| 色欧美乱欧美15图片| 国产色婷婷亚洲99精品小说| 亚洲精品高清在线| 国产成人在线视频网址| 日韩一级二级三级| 亚洲免费电影在线| 成人蜜臀av电影| 欧美一级电影网站| 亚洲欧洲韩国日本视频| 久久99日本精品| 一本到三区不卡视频| 国产精品色噜噜| 精品一区二区在线观看| 欧美一级免费大片| 老司机精品视频线观看86| 一本一本久久a久久精品综合麻豆| 精品毛片乱码1区2区3区| 亚洲卡通欧美制服中文| 国产精品影视在线观看| 在线电影院国产精品| 亚洲美女视频在线| 国产一区二区三区av电影| 欧美日韩黄视频| 国产精品免费人成网站| 国产精品一品二品| 欧美电影免费观看高清完整版在| 亚洲人成精品久久久久| 国产成人鲁色资源国产91色综| 69p69国产精品| 一区二区三区国产精品| 99久久久免费精品国产一区二区| 久久综合色8888| 美女精品一区二区| 色94色欧美sute亚洲线路二| 精品国产髙清在线看国产毛片| 日韩理论片在线| 成人动漫一区二区三区| 久久影院电视剧免费观看| 亚洲国产裸拍裸体视频在线观看乱了 | 波波电影院一区二区三区| 欧美不卡一区二区| 免费观看一级特黄欧美大片| 欧美在线播放高清精品| 亚洲裸体在线观看| 黄页网站大全一区二区| 欧美一级夜夜爽| 三级不卡在线观看| 欧美日韩国产首页| 亚洲高清视频的网址| 欧美日韩一本到| 偷窥国产亚洲免费视频| 欧美性受极品xxxx喷水| 亚洲第一会所有码转帖| 欧美三级电影网站| 一区二区三区国产精品| 91官网在线免费观看| 一区二区不卡在线播放| 欧美这里有精品| 日本一区免费视频| 久久综合九色综合97_久久久| 一区二区三区在线视频观看| 在线精品亚洲一区二区不卡| 一区二区三区四区亚洲| 欧美男同性恋视频网站| 日本成人在线一区| 国产色综合久久| 97久久精品人人做人人爽| 国产喂奶挤奶一区二区三区| 91免费小视频| 亚洲成人动漫在线观看| 欧美电影免费观看完整版| 国产一区二区不卡在线| 亚洲免费av高清| 欧美精品v国产精品v日韩精品| 亚洲一区自拍偷拍| 日韩欧美专区在线| 国产激情一区二区三区| 日韩一区在线看| 亚洲精品视频在线看| 国产精品一区二区免费不卡| 日韩一卡二卡三卡四卡| 国产在线视频不卡二| 久久婷婷国产综合国色天香 | 亚洲第一激情av| 欧美成人伊人久久综合网| 综合色天天鬼久久鬼色| 日韩高清不卡一区二区| 日韩视频免费观看高清完整版 | 香蕉av福利精品导航| 欧美成人激情免费网| 成人av在线看| 亚洲一级二级三级| 亚洲精品在线电影| 成人国产精品视频| 午夜久久久久久久久| 欧美精品一区二区三区在线播放 | 性感美女久久精品| 欧美成人综合网站| 韩国av一区二区三区四区| 亚洲激情六月丁香| 欧美日韩在线直播| 国产精品影视在线| 亚洲一区电影777| 国产日韩在线不卡| 在线播放日韩导航| 国产成人亚洲综合a∨猫咪| 一区二区三区在线视频免费观看 | 国产欧美日韩三区| 7878成人国产在线观看| 国产.精品.日韩.另类.中文.在线.播放| 亚洲欧美日韩久久精品| 精品日韩在线一区| 欧美亚洲综合另类| 懂色av中文字幕一区二区三区| 午夜精品成人在线视频| 久久婷婷国产综合国色天香| 色悠悠久久综合| 激情图片小说一区| 亚洲在线观看免费视频| 亚洲特黄一级片| 久久亚洲综合av| 精品久久久久久久久久久久久久久久久| 91激情在线视频| 成人午夜av在线| 国产精品一区二区不卡| 日本三级韩国三级欧美三级| 亚洲成人第一页| 一区二区三区 在线观看视频| 国产精品国产自产拍在线| 久久久精品影视| 欧美高清一级片在线| 欧美日韩色综合|