官术网_书友最值得收藏!

  • Kivy Blueprints
  • Mark Vasilkov
  • 327字
  • 2021-08-06 19:18:44

Write once, run anywhere

This whole situation creates a demand for a universal, multi-platform way to program. The problem isn't exactly new: one solution to it, created by Sun in 1995, is the Java programming language. Its marketing promise—write once, run anywhere—was never fulfilled and the language itself is unreasonably cumbersome to use. This led to many mocking variations of the slogan, culminating with write once, run away that refers to many developers abandoning Java in favor of better programming languages, including Python.

Not coincidentally, Kivy—the main topic of this book—is a graphical user interface library facilitating easy creation of multi-platform Python applications. The main features of Kivy toolkit are as follows:

  • Compatibility: Kivy-based apps work in Linux, Mac OS X, Windows, Android, and iOS—all from a single codebase.
  • Natural user interface: Kivy bridges the gap between different input methods, allowing you to handle a multitude of possible user interactions with similar code, mouse events and multitouch gestures alike.
  • Fast hardware-accelerated graphics: OpenGL rendering makes Kivy suitable for creating graphics-heavy applications such as videogames, and also improves the user experience with smooth transitions.
  • The use of Python: Kivy apps are written in Python, one of the better general purpose programming languages. In addition to being inherently portable, expressive, and readable, Python features a useful standard library and a rich ecosystem of third-party packages, the Python Package Index (PyPI).

Speaking of third-party packages, Kivy can be seen as a superset of many battle-tested components: a large part of its functionality relies on well-known libraries such as Pygame, SDL, and GStreamer. The API that Kivy exposes, however, is very high-level and unified.

It's worth mentioning that Kivy is free and open source MIT licensed software. In practice, this means that you can use it commercially without paying licensing fees. Its full source code is hosted on GitHub, so you can also patch bugs or add new features to it.

主站蜘蛛池模板: 吉水县| 晋江市| 延津县| 永平县| 庆城县| 界首市| 舒城县| 久治县| 凭祥市| 霍林郭勒市| 仙游县| 二连浩特市| 广东省| 原阳县| 区。| 九江县| 肥乡县| 谢通门县| 寿光市| 玉门市| 德化县| 濮阳县| 阿坝县| 沙雅县| 沭阳县| 汤阴县| 禹城市| 卓资县| 牡丹江市| 巩义市| 襄城县| 浦东新区| 彭山县| 蓬安县| 五指山市| 邵阳县| 苍南县| 高雄县| 凤翔县| 砀山县| 康定县|