lines less than 80 chars in /scenarios/
authorTomas Thor Jonsson <benregn@gmail.com>
Mon, 23 Apr 2012 18:32:00 +0000 (20:32 +0200)
committerTomas Thor Jonsson <benregn@gmail.com>
Mon, 23 Apr 2012 18:32:00 +0000 (20:32 +0200)
docs/scenarios/ci.rst
docs/scenarios/client.rst
docs/scenarios/db.rst
docs/scenarios/gui.rst
docs/scenarios/scientific.rst
docs/scenarios/speed.rst
docs/scenarios/web.rst

index e8e11c2..659f440 100644 (file)
@@ -5,20 +5,29 @@ Continuous Integration
 Why?
 ----
 
-Martin Fowler, who first wrote about `Continuous Integration <http://martinfowler.com/articles/continuousIntegration.html>`_ (short: CI) together with Kent Beck, describes the CI as follows:
+Martin Fowler, who first wrote about `Continuous Integration <http://martinfowler.com/articles/continuousIntegration.html>`_
+(short: CI) together with Kent Beck, describes the CI as follows:
 
-    Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.
+    Continuous Integration is a software development practice where members of
+    a team integrate their work frequently, usually each person integrates at
+    least daily - leading to multiple integrations per day. Each integration is
+    verified by an automated build (including test) to detect integration errors
+    as quickly as possible. Many teams find that this approach leads to
+    significantly reduced integration problems and allows a team to develop
+    cohesive software more rapidly.
 
 Jenkins
 -------
 
-`Jenkins CI <http://jenkins-ci.org>`_ is an extensible continuous integration engine. Use it.
+`Jenkins CI <http://jenkins-ci.org>`_ is an extensible continuous integration
+engine. Use it.
 
 
 
 Buildbot
 --------
-`Buildbot <http://buildbot.net/buildbot/docs/current>`_ is a Python system to automate the compile/test cycle to validate code changes. 
+`Buildbot <http://buildbot.net/buildbot/docs/current>`_ is a Python system to
+automate the compile/test cycle to validate code changes.
 
 
 Mule?
@@ -29,12 +38,17 @@ Mule?
 Tox
 ---
 
-`tox <https://bitbucket.org/hpk42/tox>`_ is an automation tool providing packaging, testing and deployment of Python software right from the console or CI server.
-It is a generic virtualenv management and test command line tool which provides the following features:
-
-* Checking that packages install correctly with different Python versions and interpreters
-* Running tests in each of the environments, configuring your test tool of choice
-* Acting as a frontend to Continuous Integration servers, reducing boilerplate and merging CI and shell-based testing.
+`tox <https://bitbucket.org/hpk42/tox>`_ is an automation tool providing
+packaging, testing and deployment of Python software right from the console or
+CI server. It is a generic virtualenv management and test command line tool
+which provides the following features:
+
+* Checking that packages install correctly with different Python versions and
+  interpreters
+* Running tests in each of the environments, configuring your test tool of
+  choice
+* Acting as a frontend to Continuous Integration servers, reducing boilerplate
+  and merging CI and shell-based testing.
 
 
 Travis-CI
index db0d28a..e2d8202 100644 (file)
@@ -6,14 +6,23 @@ Network Applications
 HTTP
 ::::
 
-The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide Web.
+The Hypertext Transfer Protocol (HTTP) is an application protocol for
+distributed, collaborative, hypermedia information systems. HTTP is the
+foundation of data communication for the World Wide Web.
 
 Requests
 --------
 
-Python’s standard urllib2 module provides most of the HTTP capabilities you need, but the API is thoroughly broken. It was built for a different time — and a different web. It requires an enormous amount of work (even method overrides) to perform the simplest of tasks.
+Python’s standard urllib2 module provides most of the HTTP capabilities you
+need, but the API is thoroughly broken. It was built for a different time —
+and a different web. It requires an enormous amount of work (even method
+overrides) to perform the simplest of tasks.
 
-Requests takes all of the work out of Python HTTP — making your integration with web services seamless. There’s no need to manually add query strings to your URLs, or to form-encode your POST data. Keep-alive and HTTP connection pooling are 100% automatic, powered by urllib3, which is embedded within Requests
+Requests takes all of the work out of Python HTTP — making your integration
+with web services seamless. There’s no need to manually add query strings to
+your URLs, or to form-encode your POST data. Keep-alive and HTTP connection
+pooling are 100% automatic, powered by urllib3, which is embedded within
+Requests.
 
 - `Documention <http://docs.python-requests.org/en/latest/index.html>`_
 - `PyPi <http://pypi.python.org/pypi/requests>`_
@@ -27,4 +36,8 @@ Distributed Systems
 ZeroMQ
 ------
 
-ØMQ (also spelled ZeroMQ, 0MQ or ZMQ) is a high-performance asynchronous messaging library aimed at use in scalable distributed or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ØMQ system can run without a dedicated message broker. The library is designed to have a familiar socket-style API.
+ØMQ (also spelled ZeroMQ, 0MQ or ZMQ) is a high-performance asynchronous
+messaging library aimed at use in scalable distributed or concurrent
+applications. It provides a message queue, but unlike message-oriented
+middleware, a ØMQ system can run without a dedicated message broker. The
+library is designed to have a familiar socket-style API.
index b77ddd6..2c4c17b 100644 (file)
@@ -14,9 +14,9 @@ Nearly all Python database modules such as `sqlite3`, `psycopg` and
 SQLAlchemy
 ----------
 
-`SQLAlchemy <http://www.sqlalchemy.org/>`_ is a commonly used database toolkit. Unlike many database libraries
-it not only provides an ORM layer but also a generalized API for writing
-database-agnostic code without SQL.
+`SQLAlchemy <http://www.sqlalchemy.org/>`_ is a commonly used database toolkit.
+Unlike many database libraries it not only provides an ORM layer but also a
+generalized API for writing database-agnostic code without SQL.
 
 ::
 
@@ -25,8 +25,10 @@ database-agnostic code without SQL.
 Django ORM
 ----------
 
-The Django ORM is the interface used by `Django <http://www.djangoproject.com>`_ to provide database access.
+The Django ORM is the interface used by `Django <http://www.djangoproject.com>`_
+to provide database access.
 
-It's based on the idea of models, an abstraction that makes it easier to manipulate data in Python.
+It's based on the idea of models, an abstraction that makes it easier to
+manipulate data in Python.
 
 Documentation can be found `here <https://docs.djangoproject.com/en/1.3/#the-model-layer>`_
\ No newline at end of file
index 2490d98..8a08e68 100644 (file)
@@ -4,7 +4,8 @@ GUI Applications
 
 Qt
 ::
-Qt is a cross-platform application framework that is widely used for developing software with a GUI but can also be used for non-GUI applications.
+Qt is a cross-platform application framework that is widely used for developing
+software with a GUI but can also be used for non-GUI applications.
 
 PySide
 ------
@@ -30,15 +31,16 @@ WXPython
 
 Install (Stable)
 ----------------
-*Go to http://www.wxpython.org/download.php#stable and download the appropriate package for your OS.*
+*Go to http://www.wxpython.org/download.php#stable and download the appropriate
+package for your OS.*
 
 Gtk
 :::
 PyGTK provides Python bindings for the GTK+ toolkit. Like the GTK+ library
 itself, it is currently licensed under the GNU LGPL. It is worth noting that
 PyGTK only currenty supports the Gtk-2.X API (NOT Gtk-3.0). It is currently
-recommended that PyGTK is not used for new projects and existing applications be
-ported from PyGTK to PyGObject.
+recommended that PyGTK is not used for new projects and existing applications
+be ported from PyGTK to PyGObject.
 
 Tk
 ::
index 3b038ad..c549190 100644 (file)
@@ -5,59 +5,71 @@ Scientific Applications
 Context
 :::::::
 
-Python is frequently used for high-performance scientific applications. Python is widely used in academia 
-and scientific projects because it is easy to write, and it performs really well. 
+Python is frequently used for high-performance scientific applications. Python
+is widely used in academia and scientific projects because it is easy to write,
+and it performs really well.
 
-Due to its high performance nature, scientific computing in python often refers to external libraries, typically 
-written in faster languages (like C, or FORTRAN for matrix operations). The main libraries used are NumPy and SciPy 
+Due to its high performance nature, scientific computing in python often refers
+to external libraries, typically written in faster languages (like C, or FORTRAN
+for matrix operations). The main libraries used are NumPy and SciPy
 
 Libraries
 :::::::::
 
 Numpy
 -----
-`NumPy <http://numpy.scipy.org/>`_ is a low level library written in C (and FORTRAN) for high level mathematical functions.
-NumPy cleverly overcomes the problem of running slower algorithms on Python by using multidimensional arrays and functions that operate on arrays.
-Any algorithm can then be expressed as a function on arrays, allowing the algorithms to be run quickly. 
+`NumPy <http://numpy.scipy.org/>`_ is a low level library written in C (and
+FORTRAN) for high level mathematical functions. NumPy cleverly overcomes the
+problem of running slower algorithms on Python by using multidimensional arrays
+and functions that operate on arrays. Any algorithm can then be expressed as a
+function on arrays, allowing the algorithms to be run quickly.
 
 
-NumPy is part of the SciPy project, and is released as a separate library so people who only need the basic requirements can just use NumPy.
+NumPy is part of the SciPy project, and is released as a separate library so
+people who only need the basic requirements can just use NumPy.
 
-NumPy is compatible with Python versions 2.4 through to 2.7.2 and 3.1+. 
+NumPy is compatible with Python versions 2.4 through to 2.7.2 and 3.1+.
 
 SciPy
 -----
-`SciPy <http://scipy.org/>`_ is a library that uses Numpy for more mathematical function. SciPy uses NumPy arrays as its basic data structure.
-SciPy comes with modules for various commonly used tasks in scientific programing like linear algebra, integration (calculus), 
-ordinary differential equation solvers and signal processing. 
+`SciPy <http://scipy.org/>`_ is a library that uses Numpy for more mathematical
+function. SciPy uses NumPy arrays as its basic data structure. SciPy comes with
+modules for various commonly used tasks in scientific programing like linear
+algebra, integration (calculus), ordinary differential equation solvers and
+signal processing.
 
 Enthought
 ---------
 
-Installing NumPy and SciPy can be a daunting task. Which is why the `Enthought Python distribution <http://enthought.com/>`_ was created. With Enthought,
-scientific python has never been easier (one click to install about 100 scientific python packages). User beware: Enthought is not free. 
+Installing NumPy and SciPy can be a daunting task. Which is why the
+`Enthought Python distribution <http://enthought.com/>`_ was created. With
+Enthought, scientific python has never been easier (one click to install about
+100 scientific python packages). User beware: Enthought is not free.
 
 Matplotlib
 ----------
 
-`matplotlib <http://matplotlib.sourceforge.net/>`_ is a flexible plotting library
-for creating interactive 2D and 3D plots that can also be saved as manuscript-quality
-figures.  The API in many ways reflects that of `MATLAB <http://www.mathworks.com/products/matlab/>`_, easing transition of MATLAB
-users to Python.  Many examples, along with the source code to re-create them,
-can be browsed at the `matplotlib gallery <http://matplotlib.sourceforge.net/gallery.html>`_.
+`matplotlib <http://matplotlib.sourceforge.net/>`_ is a flexible plotting
+library for creating interactive 2D and 3D plots that can also be saved as
+manuscript-quality figures.  The API in many ways reflects that of `MATLAB <http://www.mathworks.com/products/matlab/>`_,
+easing transition of MATLAB users to Python.  Many examples, along with the
+source code to re-create them, can be browsed at the `matplotlib gallery <http://matplotlib.sourceforge.net/gallery.html>`_.
 
 
 PyQwt
 -----
 
 `PyQwt <http://pyqwt.sourceforge.net/>`_ is a solid library for plotting
-numerical data.  It is built on top of the popular `PyQt <http://www.riverbankcomputing.co.uk/software/pyqt/intro>`_ GUI framework.
-It typically has better performance than matplotlib, but the range of built-in
-chart/plot types is slightly smaller than matplotlib.
+numerical data.  It is built on top of the popular `PyQt <http://www.riverbankcomputing.co.uk/software/pyqt/intro>`_
+GUI framework. It typically has better performance than matplotlib, but the
+range of built-in chart/plot types is slightly smaller than matplotlib.
 
 Resources
 :::::::::
 
-Many people who do scientific computing are on Windows. And yet many of the scientific computing packages are notoriously difficult to build and install.
-`Christoph Gohlke <http://www.lfd.uci.edu/~gohlke/pythonlibs/>`_ however, has compiled a list of Windows binaries for many useful Python packages. 
-The list of packages has grown from a mainly scientific python resource to a more general list. It might be a good idea to check it out if you're on Windows.
+Many people who do scientific computing are on Windows. And yet many of the
+scientific computing packages are notoriously difficult to build and install.
+`Christoph Gohlke <http://www.lfd.uci.edu/~gohlke/pythonlibs/>`_ however, has
+compiled a list of Windows binaries for many useful Python packages. The list
+of packages has grown from a mainly scientific python resource to a more
+general list. It might be a good idea to check it out if you're on Windows.
index bd83cde..f0d6c78 100644 (file)
@@ -1,13 +1,16 @@
 Speed
 =====
 
-CPython, the most commonly used implementation of Python, is slow for CPU bound tasks. `PyPy`_ is fast.
+CPython, the most commonly used implementation of Python, is slow for CPU bound
+tasks. `PyPy`_ is fast.
 
-Using a slightly modified version of `David Beazleys`_ CPU bound test code(added loop for multiple tests), you can see the difference between CPython and PyPy's processing.
+Using a slightly modified version of `David Beazleys`_ CPU bound test code
+(added loop for multiple tests), you can see the difference between CPython
+and PyPy's processing.
 
 ::
 
-   PyPy 
+   PyPy
    $ ./pypy -V
    Python 2.7.1 (7773f8fc4223, Nov 18 2011, 18:47:10)
    [PyPy 1.7.0 with GCC 4.4.3]
@@ -23,7 +26,7 @@ Using a slightly modified version of `David Beazleys`_ CPU bound test code(added
    CPython
    $ ./python -V
    Python 2.7.1
-   $ ./python measure2.py 
+   $ ./python measure2.py
    1.06774401665
    1.45412397385
    1.51485204697
@@ -37,13 +40,16 @@ Context
 The GIL
 -------
 
-`The GIL`_ (Global Interpreter Lock) is how Python allows multiple threads to operate at the same time. Python's
-memory management isn't entirely thread-safe, so the GIL is requried to prevents multiple threads from running
-the same Python code at once.
+`The GIL`_ (Global Interpreter Lock) is how Python allows multiple threads to
+operate at the same time. Python's memory management isn't entirely thread-safe,
+so the GIL is requried to prevents multiple threads from running the same
+Python code at once.
 
-David Beazley has a great `guide`_ on how the GIL operates. He also covers the `new GIL`_ in Python 3.2. His
-results show that maximizing performance in a Python application requires a strong understanding of the GIL,
-how it affects your specific application, how many cores you have, and where your application bottlenecks are.
+David Beazley has a great `guide`_ on how the GIL operates. He also covers the
+`new GIL`_ in Python 3.2. His results show that maximizing performance in a
+Python application requires a strong understanding of the GIL, how it affects
+your specific application, how many cores you have, and where your application
+bottlenecks are.
 
 C Extentions
 ------------
@@ -52,8 +58,8 @@ C Extentions
 The GIL
 -------
 
-`Special care`_ must be taken when writing C extensions to make sure you register your threads
-with the interpreter.
+`Special care`_ must be taken when writing C extensions to make sure you r
+egister your threads with the interpreter.
 
 C Extentions
 ::::::::::::
index bd65373..7b20c7d 100644 (file)
@@ -14,8 +14,8 @@ The Web Server Gateway Interface (or "WSGI" for short) is a standard
 interface between web servers and Python web application frameworks. By
 standardizing behavior and communication between web servers and Python web
 frameworks, WSGI makes it possible to write portable Python web code that
-can be deployed in any :ref:`WSGI-compliant web server <wsgi-servers-ref>`. WSGI is
-documented in `PEP-3333 <http://www.python.org/dev/peps/pep-3333/>`_.
+can be deployed in any :ref:`WSGI-compliant web server <wsgi-servers-ref>`.
+WSGI is documented in `PEP-3333 <http://www.python.org/dev/peps/pep-3333/>`_.
 
 
 Frameworks
@@ -71,8 +71,8 @@ you may need, such as database access or form generation and validation. For
 many popular modules, `Extensions <http://flask.pocoo.org/extensions/>`_ may
 already exist to suit your needs.
 
-**Support** for flask can best be found in its mailing list. Just shoot an email to
-flask@librelist.com and reply to the confirmation email.
+**Support** for flask can best be found in its mailing list. Just shoot an
+email to flask@librelist.com and reply to the confirmation email.
 
 
 .. todo:: Explain Pyramid
@@ -126,8 +126,8 @@ The majority of self hosted Python applications today are hosted with a WSGI
 server such as :ref:`gUnicorn <gunicorn-ref>`, either directly or behind a
 lightweight web server such as :ref:`nginx <nginx-ref>`.
 
-The WSGI servers serve the Python applications while the web server handles tasks
-better suited for it such as static file serving, request routing, DDoS
+The WSGI servers serve the Python applications while the web server handles
+tasks better suited for it such as static file serving, request routing, DDoS
 protection, and basic authentication.
 
 Hosting
@@ -158,10 +158,10 @@ Heroku
 `Cedar stack <http://devcenter.heroku.com/articles/cedar>`_ offers first class
 support for Python 2.7 applications.
 
-Heroku allows you to run as many Python web applications as you like, 24/7 and free
-of charge. Heroku is best described as a horizontal scaling platform. They start
-to charge you once you "scale" you application to run on more than one Dyno
-(abstacted servers) at a time.
+Heroku allows you to run as many Python web applications as you like, 24/7 and
+free of charge. Heroku is best described as a horizontal scaling platform. They
+start to charge you once you "scale" you application to run on more than one
+Dyno (abstacted servers) at a time.
 
 Heroku publishes `step-by-step instructions
 <http://devcenter.heroku.com/articles/python>`_ on how to set up your first