| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
7 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ VIM | |||
| 14 | 14 | ||
| 15 | 15 | Vim is a text editor which uses keyboard shortcuts for editing instead of menus | |
| 16 | 16 | or icons. There exist a couple of plugins and settings for the VIM editor to | |
| 17 | - aid python development. If you only develop in Python, a good start is to set | ||
| 17 | + aid Python development. If you only develop in Python, a good start is to set | ||
| 18 | 18 | the default settings for indentation and line-wrapping to values compliant with | |
| 19 | 19 | `PEP 8 <http://www.python.org/dev/peps/pep-0008/>`_. In your home directory, | |
| 20 | 20 | open a file called `.vimrc` and add the following lines::: | |
@@ -29,7 +29,7 @@ open a file called `.vimrc` and add the following lines::: | |||
| 29 | 29 | ||
| 30 | 30 | With these settings, newlines are inserted after 79 characters and indentation | |
| 31 | 31 | is set to 4 spaces per tab. If you also use VIM for other languages, there is a | |
| 32 | - handy plugin at indent_, which handles indentation settings for python source | ||
| 32 | + handy plugin at indent_, which handles indentation settings for Python source | ||
| 33 | 33 | files. | |
| 34 | 34 | ||
| 35 | 35 | There is also a handy syntax plugin at syntax_ featuring some improvements over | |
@@ -67,12 +67,12 @@ Python-mode | |||
| 67 | 67 | Python-mode_ is a complex solution in VIM for working with python code. | |
| 68 | 68 | It has: | |
| 69 | 69 | ||
| 70 | - - Async python code checking (pylint, pyflakes, pep8, mccabe) in any combination | ||
| 70 | + - Asynchronous Python code checking (pylint, pyflakes, pep8, mccabe) in any combination | ||
| 71 | 71 | - Code refactoring and autocompletion with Rope | |
| 72 | - - Fast python folding | ||
| 72 | + - Fast Python folding | ||
| 73 | 73 | - Virtualenv support | |
| 74 | - - Search by python documentation and run python code | ||
| 75 | - - Auto pep8 error fixes | ||
| 74 | + - Search by Python documentation and run Python code | ||
| 75 | + - Auto PEP8 error fixes | ||
| 76 | 76 | ||
| 77 | 77 | And more. | |
| 78 | 78 | ||
@@ -148,7 +148,7 @@ Spyder | |||
| 148 | 148 | ------ | |
| 149 | 149 | ||
| 150 | 150 | `Spyder <http://code.google.com/p/spyderlib/>`_ is an IDE specifically geared | |
| 151 | - toward working with scientific python libraries (namely `Scipy <http://www.scipy.org/>`_). | ||
| 151 | + toward working with scientific Python libraries (namely `Scipy <http://www.scipy.org/>`_). | ||
| 152 | 152 | It includes integration with pyflakes_, `pylint <http://www.logilab.org/857>`_, | |
| 153 | 153 | and `rope <http://rope.sourceforge.net/>`_. | |
| 154 | 154 | ||
@@ -159,7 +159,7 @@ class and function browser, and object inspection. | |||
| 159 | 159 | WingIDE | |
| 160 | 160 | ------- | |
| 161 | 161 | ||
| 162 | - `WingIDE <http://wingware.com/>`_ is a python specific IDE. It runs on Linux, | ||
| 162 | + `WingIDE <http://wingware.com/>`_ is a Python specific IDE. It runs on Linux, | ||
| 163 | 163 | Windows, and Mac (as an X11 application, which frustrates some Mac users). | |
| 164 | 164 | ||
| 165 | 165 | WingIDE offers code completion, syntax highlighting, source browser, graphical | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,13 +4,14 @@ Systems Administration | |||
| 4 | 4 | Fabric | |
| 5 | 5 | ------ | |
| 6 | 6 | ||
| 7 | - `Fabric <http://docs.fabfile.org>`_ is a library for simplifying system administration tasks. While Chef | ||
| 8 | - and Puppet tend to focus on managing servers and system libraries, | ||
| 9 | - fabric is more focused on application level tasks such as deployment. | ||
| 7 | + `Fabric <http://docs.fabfile.org>`_ is a library for simplifying system | ||
| 8 | + administration tasks. While Chef and Puppet tend to focus on managing servers | ||
| 9 | + and system libraries, fabric is more focused on application level tasks such | ||
| 10 | + as deployment. | ||
| 10 | 11 | ||
| 11 | 12 | Install Fabric: | |
| 12 | 13 | ||
| 13 | - .. code-block:: bash | ||
| 14 | + .. code-block:: console | ||
| 14 | 15 | ||
| 15 | 16 | $ pip install fabric | |
| 16 | 17 | ||
@@ -40,7 +41,7 @@ server. | |||
| 40 | 41 | With the previous code saved in a file named fabfile.py, we can check memory | |
| 41 | 42 | usage with: | |
| 42 | 43 | ||
| 43 | - .. code-block:: bash | ||
| 44 | + .. code-block:: console | ||
| 44 | 45 | ||
| 45 | 46 | $ fab memory_usage | |
| 46 | 47 | [my_server1] Executing task 'memory' | |
@@ -59,7 +60,7 @@ usage with: | |||
| 59 | 60 | ||
| 60 | 61 | and we can deploy with: | |
| 61 | 62 | ||
| 62 | - .. code-block:: bash | ||
| 63 | + .. code-block:: console | ||
| 63 | 64 | ||
| 64 | 65 | $ fab deploy | |
| 65 | 66 | ||
@@ -78,7 +79,7 @@ multiple servers using simple template files. | |||
| 78 | 79 | ||
| 79 | 80 | Salt supports python versions 2.6 and 2.7 and can be installed via pip: | |
| 80 | 81 | ||
| 81 | - .. code-block:: bash | ||
| 82 | + .. code-block:: console | ||
| 82 | 83 | ||
| 83 | 84 | $ pip install salt | |
| 84 | 85 | ||
@@ -87,7 +88,7 @@ shell commands or use pre-built modules of complex commands on our minions. | |||
| 87 | 88 | ||
| 88 | 89 | The following command lists all available minion hosts, using the ping module. | |
| 89 | 90 | ||
| 90 | - .. code-block:: bash | ||
| 91 | + .. code-block:: console | ||
| 91 | 92 | ||
| 92 | 93 | $ salt '*' test.ping | |
| 93 | 94 | ||
@@ -98,7 +99,7 @@ provide a host taxonomy for the salt modules. | |||
| 98 | 99 | ||
| 99 | 100 | The following command lists all available minions running CentOS using the grains system: | |
| 100 | 101 | ||
| 101 | - .. code-block:: bash | ||
| 102 | + .. code-block:: console | ||
| 102 | 103 | ||
| 103 | 104 | $ salt -G 'os:CentOS' test.ping | |
| 104 | 105 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,14 +29,18 @@ PyObjC | |||
| 29 | 29 | ||
| 30 | 30 | wxPython | |
| 31 | 31 | -------- | |
| 32 | - wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module (native code) that wraps the popular wxWidgets cross platform GUI library, which is written in C++. | ||
| 32 | + wxPython is a GUI toolkit for the Python programming language. It allows | ||
| 33 | + Python programmers to create programs with a robust, highly functional | ||
| 34 | + graphical user interface, simply and easily. It is implemented as a Python | ||
| 35 | + extension module (native code) that wraps the popular wxWidgets cross platform | ||
| 36 | + GUI library, which is written in C++. | ||
| 33 | 37 | ||
| 34 | 38 | Install (Stable) | |
| 35 | 39 | ~~~~~~~~~~~~~~~~ | |
| 36 | 40 | *Go to http://www.wxpython.org/download.php#stable and download the appropriate | |
| 37 | 41 | package for your OS.* | |
| 38 | 42 | ||
| 39 | - Gtk | ||
| 43 | + GTk | ||
| 40 | 44 | --- | |
| 41 | 45 | PyGTK provides Python bindings for the GTK+ toolkit. Like the GTK+ library | |
| 42 | 46 | itself, it is currently licensed under the GNU LGPL. It is worth noting that | |
@@ -60,10 +64,15 @@ available on the `Python Wiki <http://wiki.python.org/moin/TkInter>`_. | |||
| 60 | 64 | ||
| 61 | 65 | Kivy | |
| 62 | 66 | ---- | |
| 63 | - `Kivy <http://kivy.org>`_ is a Python library for development of multi-touch enabled media rich applications. The aim is to allow for quick and easy interaction design and rapid prototyping, while making your code reusable and deployable. | ||
| 67 | + `Kivy <http://kivy.org>`_ is a Python library for development of multi-touch | ||
| 68 | + enabled media rich applications. The aim is to allow for quick and easy | ||
| 69 | + interaction design and rapid prototyping, while making your code reusable | ||
| 70 | + and deployable. | ||
| 64 | 71 | ||
| 65 | - Kivy is written in Python, based on OpenGL and supports different input devices such as: Mouse, Dual Mouse, TUIO, WiiMote, WM_TOUCH, HIDtouch, Apple's products and so on. | ||
| 72 | + Kivy is written in Python, based on OpenGL and supports different input devices | ||
| 73 | + such as: Mouse, Dual Mouse, TUIO, WiiMote, WM_TOUCH, HIDtouch, Apple's products and so on. | ||
| 66 | 74 | ||
| 67 | - Kivy is actively being developed by a community and free to use. It operates on all major platforms (Linux, OSX, Windows, Android). | ||
| 75 | + Kivy is actively being developed by a community and free to use. It operates | ||
| 76 | + on all major platforms (Linux, OSX, Windows, Android). | ||
| 68 | 77 | ||
| 69 | 78 | The main resource for information is the website: http://kivy.org | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,10 +4,10 @@ Networking | |||
| 4 | 4 | Twisted | |
| 5 | 5 | ------- | |
| 6 | 6 | ||
| 7 | - `Twisted <http://twistedmatrix.com/trac/>`_ is an event-driven networking engine. It can be | ||
| 8 | - used to build applications around many different networking protocols, including http servers | ||
| 9 | - and clients, applications using SMTP, POP3, IMAP or SSH protocols, instant messaging and | ||
| 10 | - `many more <http://twistedmatrix.com/trac/wiki/Documentation>`_. | ||
| 7 | + `Twisted <http://twistedmatrix.com/trac/>`_ is an event-driven networking | ||
| 8 | + engine. It can be used to build applications around many different networking | ||
| 9 | + protocols, including http servers and clients, applications using SMTP, POP3, | ||
| 10 | + IMAP or SSH protocols, instant messaging and `much more <http://twistedmatrix.com/trac/wiki/Documentation>`_. | ||
| 11 | 11 | ||
| 12 | 12 | PyZMQ | |
| 13 | 13 | ----- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -26,6 +26,11 @@ by downloading `XCode <http://developer.apple.com/xcode/>`_, the smaller | |||
| 26 | 26 | Apple account) or the even smaller `OSX-GCC-Installer <https://github.com/kennethreitz/osx-gcc-installer#readme>`_ | |
| 27 | 27 | package. | |
| 28 | 28 | ||
| 29 | + .. note:: | ||
| 30 | + If you already have XCode installed, do not install OSX-GCC-Installer. | ||
| 31 | + In combination, the software can cause issues that are difficult to | ||
| 32 | + diagnose. | ||
| 33 | + | ||
| 29 | 34 | While Lion comes with a large number of UNIX utilities, those familiar with | |
| 30 | 35 | Linux systems will notice one key component missing: a decent package manager. | |
| 31 | 36 | `Homebrew <http://mxcl.github.com/homebrew/>`_ fills this void. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -47,11 +47,11 @@ level of compatibility with Python packages and C extension modules. | |||
| 47 | 47 | ||
| 48 | 48 | If you are writing open-source Python code and want to reach the widest possible | |
| 49 | 49 | audience, targeting CPython is your best bet. If you need to use any packages | |
| 50 | - that rely on C extensions for their functionality (eg: numpy) then CPython | ||
| 50 | + that rely on C extensions for their functionality (e.g. numpy) then CPython | ||
| 51 | 51 | is your only choice. | |
| 52 | 52 | ||
| 53 | 53 | Being the reference implementation, all versions of the Python language are | |
| 54 | - available as CPython. Python 3 is only available in a CPython implementation. | ||
| 54 | + available as CPython. Python 3 is only available as a CPython implementation. | ||
| 55 | 55 | ||
| 56 | 56 | PyPy | |
| 57 | 57 | ---- | |
@@ -73,14 +73,14 @@ Jython | |||
| 73 | 73 | ------ | |
| 74 | 74 | ||
| 75 | 75 | `Jython <http://www.jython.org/>`_ is a Python implementation that compiles | |
| 76 | - Python code to Java byte code that then executes on a JVM. It has the additional | ||
| 77 | - advantage of being able to import and use any Java class the same as a Python | ||
| 76 | + Python code to Java byte code that is then executed in a JVM. It has the additional | ||
| 77 | + advantage of being able to import and use any Java class like a Python | ||
| 78 | 78 | module. | |
| 79 | 79 | ||
| 80 | 80 | If you need to interface with an existing Java codebase or have other reasons to | |
| 81 | 81 | need to write Python code for the JVM, Jython is the best choice. | |
| 82 | 82 | ||
| 83 | - Currently Jython supports up to Python 2.5. [#jython_ver]_ | ||
| 83 | + Jython currently supports up to Python 2.5. [#jython_ver]_ | ||
| 84 | 84 | ||
| 85 | 85 | IronPython | |
| 86 | 86 | ---------- | |
@@ -90,7 +90,7 @@ framework. It can use both Python and .NET framework libraries, and can also | |||
| 90 | 90 | expose Python code to other .NET languages. | |
| 91 | 91 | ||
| 92 | 92 | `Python Tools for Visual Studio <http://ironpython.net/tools/>`_ integrates | |
| 93 | - IronPython directly in to the Visual Studio development environment, making it | ||
| 93 | + IronPython directly into the Visual Studio development environment, making it | ||
| 94 | 94 | an ideal choice for Windows developers. | |
| 95 | 95 | ||
| 96 | 96 | IronPython supports Python 2.7. [#iron_ver]_ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,11 +2,11 @@ Common Gotchas | |||
| 2 | 2 | ============== | |
| 3 | 3 | ||
| 4 | 4 | For the most part, Python aims to be a clean and consistent language that | |
| 5 | - avoids surprises, but there are a few cases where newcomers to the language | ||
| 6 | - often get tripped up. | ||
| 5 | + avoids surprises. However, there are a few cases that can be confusing to | ||
| 6 | + newcomers. | ||
| 7 | 7 | ||
| 8 | - Some of these are intentional but potentially surprising. Some could arguably | ||
| 9 | - be considered language warts. In general though, what follows is a collection | ||
| 8 | + Some of these cases are intentional but can be potentially surprising. Some | ||
| 9 | + could arguably be considered language warts. In general though, what follows is a collection | ||
| 10 | 10 | of potentially tricky behavior that might seem strange at first glance, but is | |
| 11 | 11 | generally sensible once you're aware of the underlying cause for the surprise. | |
| 12 | 12 | ||
@@ -157,7 +157,7 @@ What You Should Do Instead | |||
| 157 | 157 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 158 | 158 | ||
| 159 | 159 | The most general solution is arguably a bit of a hack. Due to Python's | |
| 160 | - afformentioned behavior concerning evaluating default arguments to functions | ||
| 160 | + aforementioned behavior concerning evaluating default arguments to functions | ||
| 161 | 161 | (see :ref:`default_args`), you can create a closure that binds immediately to | |
| 162 | 162 | its arguments by using a default arg like so: | |
| 163 | 163 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments