mirror of https://github.com/kivy/kivy.git
reworded docs
This commit is contained in:
parent
a8e2c65307
commit
da45c53e5f
|
@ -3,21 +3,29 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
Kivy can use several libraries, but depend only of 1 dependencies : `Cython
|
||||
<http://cython.org>`_ and `Numpy <http://numpy.scipy.org/>`_. If you want
|
||||
support features like Window, Video or Spelling, you must install other
|
||||
libraries. We are recommanding `Pygame <http://pygame.org>`_, `Gst-Python
|
||||
We try not to reinvent the wheel but bring something innovative to the
|
||||
market. As a consequence, we're focused on our own code and use already
|
||||
existing, high-qualitative third-party libraries where possible.
|
||||
For the rich set of features that Kivy offers, several other libraries are
|
||||
required. If you do not use a specific feature (e.g. video playback) you
|
||||
don't need the corresponding dependency, however.
|
||||
That said, there are two dependencies that Kivy **does** require:
|
||||
`Cython <http://cython.org>`_ and `Numpy <http://numpy.scipy.org/>`_.
|
||||
In addition, you need a `Python <http://python.org/>`_ 2.x (**not** 3.x)
|
||||
interpreter. If you want to enable features like windowing (i.e., open a Window),
|
||||
audio/video playback or spelling correction, you must install other
|
||||
dependencies. For these, we recommend `Pygame <http://pygame.org>`_, `Gst-Python
|
||||
<http://www.gstreamer.net/modules/gst-python.html>`_ and `Enchant
|
||||
<http://www.rfk.id.au/software/pyenchant/>`_.
|
||||
<http://www.rfk.id.au/software/pyenchant/>`_, respectively.
|
||||
|
||||
Optional libraries :
|
||||
Other optional libraries (mutually interchangable) are:
|
||||
|
||||
* `OpenCV 2.0 <http://sourceforge.net/projects/opencvlibrary/>`_: camera
|
||||
* `PIL <http://www.pythonware.com/products/pil/index.htm>`_: image and text
|
||||
* `PyCairo <http://www.cairographics.org/pycairo/>`_: text
|
||||
* `PyEnchant <http://www.rfk.id.au/software/pyenchant/>`_: spelling
|
||||
* `Pygame <http://www.pygame.org>`_ : window, image, text and audio
|
||||
* `PyGST <http://gstreamer.freedesktop.org/ + http://pygstdocs.berlios.de/>`_: audio, video and camera
|
||||
* `OpenCV 2.0 <http://sourceforge.net/projects/opencvlibrary/>`_: Camera input.
|
||||
* `PIL <http://www.pythonware.com/products/pil/index.htm>`_: Image and text display.
|
||||
* `PyCairo <http://www.cairographics.org/pycairo/>`_: Text display.
|
||||
* `PyEnchant <http://www.rfk.id.au/software/pyenchant/>`_: Spelling correction.
|
||||
* `Pygame <http://www.pygame.org>`_ : Window creation, image and text display, audio playback.
|
||||
* `PyGST <http://gstreamer.freedesktop.org/ + http://pygstdocs.berlios.de/>`_: Audio/video playback and camera input.
|
||||
|
||||
|
||||
Stable version
|
||||
|
@ -28,7 +36,7 @@ No stable version yet.
|
|||
Development version
|
||||
-------------------
|
||||
|
||||
If you want to work with the latest version of Kivy, you must clone and use our source code from `Github <http://github.com/>`_.
|
||||
If you want to work with the latest version of Kivy, you must clone and use our source code repository from `Github <https://github.com/tito/kivy/>`_.
|
||||
|
||||
Ubuntu
|
||||
~~~~~~
|
||||
|
|
|
@ -3,15 +3,16 @@
|
|||
Quickstart
|
||||
==========
|
||||
|
||||
This page will give you a good introduction in Kivy. This assumes you already
|
||||
have Kivy installed. If you do not, head over to the :ref:`installation`
|
||||
section.
|
||||
This page explains how to create a simple Kivy *"Hello world"* program.
|
||||
This assumes you already have Kivy installed. If you do not, head over to the
|
||||
:ref:`installation` section. We also assume basic `Python <http://docs.python.org/tutorial/>`_
|
||||
2.x knowledge.
|
||||
|
||||
|
||||
Create an application
|
||||
---------------------
|
||||
|
||||
The base code for creating an application look something like that :
|
||||
The base code for creating an application looks like this:
|
||||
|
||||
.. sourcecode:: python
|
||||
|
||||
|
@ -20,7 +21,7 @@ The base code for creating an application look something like that :
|
|||
|
||||
class MyApp(App):
|
||||
def build(self):
|
||||
return Button(label='hello world')
|
||||
return Button(label='Hello World')
|
||||
|
||||
if __name__ == '__main__':
|
||||
MyApp().run()
|
||||
|
@ -33,13 +34,16 @@ You should see a black window open. That's all.
|
|||
|
||||
So what did that code do ?
|
||||
|
||||
1. First, we imported :class:`~kivy.app.App` class, to be able to extend it.
|
||||
2. Next, we imported :class:`~kivy.uix.button.Button` class, to be able to
|
||||
1. First, we import the :class:`~kivy.app.App` class, to be able to extend it.
|
||||
By extending this class, your own class gains several features that
|
||||
we already developed for you to make sure it will be recognized by
|
||||
Kivy.
|
||||
2. Next, we import the :class:`~kivy.uix.button.Button` class, to be able to
|
||||
create an instance of a button with a custom label.
|
||||
2. Then, we have created our application, based from the App class. We have
|
||||
extend the :meth:`~kivy.app.App.build` function to be able to return an
|
||||
2. Then, we create our application, based on the App class.
|
||||
We extend the :meth:`~kivy.app.App.build` function to be able to return an
|
||||
instance of :class:`~kivy.uix.button.Button`. This instance will be used
|
||||
as the root of the widget tree.
|
||||
3. Finally, we use :meth:`~kivy.app.App.run` on our application instance to launch the kivy
|
||||
process with our application inside.
|
||||
3. Finally, we call :meth:`~kivy.app.App.run` on our application instance to
|
||||
launch the Kivy process with our application inside.
|
||||
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
Welcome to Kivy
|
||||
===============
|
||||
|
||||
Welcome to Kivy documentation. Kivy is an open source library for developing
|
||||
multi-touch applications. We recommend that you get started with :ref:`installation` and then head over the :ref:`quickstart`. Besides the quickstart, there is also a more detailed :ref:`tutorial` that show how to create an application with Kivy.
|
||||
Welcome to Kivy's documentation. Kivy is an open source software library for rapid
|
||||
development of applications equipped with novel user interfaces, such as
|
||||
multi-touch apps.
|
||||
We recommend that you get started with :ref:`installation` and then head over to
|
||||
the :ref:`quickstart` document. Besides the quickstart, there is also a more
|
||||
detailed :ref:`tutorial` that shows how to create an application with Kivy.
|
||||
|
||||
.. include:: guide-index.rst
|
||||
.. include:: api-index.rst
|
||||
|
|
Loading…
Reference in New Issue