<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Txzone</title>
	<atom:link href="http://txzone.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://txzone.net</link>
	<description>Stuff about Python, multitouch, optical tracking and audio</description>
	<lastBuildDate>Sun, 19 May 2013 07:48:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4</generator>
		<item>
		<title>Kivy 1.7.0 is out</title>
		<link>http://txzone.net/2013/05/kivy-1-7-0-is-out/</link>
		<comments>http://txzone.net/2013/05/kivy-1-7-0-is-out/#comments</comments>
		<pubDate>Sun, 19 May 2013 07:48:23 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Planet Python]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=550</guid>
		<description><![CDATA[If you missed it, Kivy 1.7.0 is out last Monday. It&#8217;s quite a big release that include some big fixes we did during the : Android Emulator is now supported ScrollView has been re-factored with new physics calculations. To be &#8230; <a href="http://txzone.net/2013/05/kivy-1-7-0-is-out/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you missed it, <a href="http://kivy.org/">Kivy 1.7.0</a> is out last Monday. It&#8217;s quite a big release that include some big fixes we did during the <a href="https://us.pycon.org/2013/" title="Pycon US"></a>:</p>
<ul>
<li><a href="http://developer.android.com/tools/devices/emulator.html">Android Emulator</a> is now supported</li>
<li><a href="http://kivy.org/docs/api-kivy.uix.scrollview.html">ScrollView</a> has been re-factored with new physics calculations. To be exact, the scrollview doesn&#8217;t calculate anything now, it just pass the touch position to an <a href="http://kivy.org/docs/api-kivy.effects.scroll.html">Scroll effect</a>. This class calculate the movement&#8217;s velocity, and the over-scroll&#8217;s distance (means how far you scrolled out of the bounds). Then, we implemented 2 visual effects that use the over-scroll to make the scrollview act as a <a href="http://kivy.org/docs/api-kivy.effects.dampedscroll.html">Damped spring<a>, and/or to <a href="http://kivy.org/docs/api-kivy.effects.opacityscroll.html">fade out</a> the scrollview if you over-scroll too much.</li>
<li><a href="http://kivy-garden.github.io/">Garden</a>: a separated organization for centralize user&#8217;s widgets and addons. You can create garden packages very easily, and import it in the source code with just &#8220;kivy.garden.<em>packagename</em>&#8220;. <a href="https://github.com/kivy-garden/">Few garden packages</a> are already available!</li>
<li>And more, <a href="https://groups.google.com/forum/?fromgroups#!topic/kivy-users/TyOzyLtYKMw">Check the announcement </a> <img src='http://txzone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
<p>If you like my work, <a href="https://www.gittip.com/tito/">tip me!</a> <iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/tito/widget.html"
width="48pt" height="20pt"></iframe>
</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2013/05/kivy-1-7-0-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crowdfunding Kivy on Raspberry Pi</title>
		<link>http://txzone.net/2013/02/crowdfunding-kivy-on-raspberry-pi/</link>
		<comments>http://txzone.net/2013/02/crowdfunding-kivy-on-raspberry-pi/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 17:06:37 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=540</guid>
		<description><![CDATA[Kivy doesn&#8217;t run yet on the Raspberry Pi, and we need your help to crowdfund it! Even is Kivy is built to be compatible for GLES 2.0, we lack of a python EGL support. The plan is to add a &#8230; <a href="http://txzone.net/2013/02/crowdfunding-kivy-on-raspberry-pi/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://kivy.org">Kivy</a> doesn&#8217;t run yet on the <a href="http://www.raspberrypi.com/">Raspberry Pi</a>, and we need your help to crowdfund it!<br />
Even is Kivy is built to be compatible for GLES 2.0, we lack of a python EGL support.</p>
<p>The plan is to add a new EGL Window provider, in addition to the detection of non-multitouch devices such as keyboard and mouse.</p>
<p>All the informations are available at: https://www.bountysource.com/#fundraisers/143-kivy-on-raspberry-pi</p>
<p>If you like my work, <a href="https://www.gittip.com/tito/">tip me!</a> <iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/tito/widget.html"
width="48pt" height="20pt"></iframe>
</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2013/02/crowdfunding-kivy-on-raspberry-pi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pyjnius: Accessing Java classes from Python</title>
		<link>http://txzone.net/2012/08/pyjnius-accessing-java-classes-from-python/</link>
		<comments>http://txzone.net/2012/08/pyjnius-accessing-java-classes-from-python/#comments</comments>
		<pubDate>Mon, 20 Aug 2012 13:43:43 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=508</guid>
		<description><![CDATA[We&#8217;re pleased to announce the Pyjnius project. It&#8217;s a Python library to access Java classes from Python, on the desktop or on Android. Source code: github.com/kivy/pyjnius Documentation: pyjnius.readthedocs.org We found others libraries such as JPype or Py4j, but we weren&#8217;t &#8230; <a href="http://txzone.net/2012/08/pyjnius-accessing-java-classes-from-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re pleased to announce the <a href="http://pyjnius.readthedocs.org">Pyjnius</a> project. It&#8217;s a Python library to access Java classes from Python, on the desktop or on Android.</p>
<ul>
<li>Source code: <a href="http://github.com/kivy/pyjnius">github.com/kivy/pyjnius</a></li>
<li>Documentation: <a href="http://pyjnius.readthedocs.org">pyjnius.readthedocs.org</a></li>
</ul>
<p>We found others libraries such as <a href="http://jpype.sourceforge.net/">JPype</a> or <a href="http://py4j.sourceforge.net/">Py4j</a>, but we weren&#8217;t happy with the design and the usability. Using <a href="http://www.jython.org/">Jython</a> wasn&#8217;t an option either, because we wanted to use the library within our <a href="http://github.com/kivy/python-for-android">python for android</a> project.</p>
<p>Let me show you how simple it is to use Pyjnius:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #66cc66;">&gt;&gt;&gt;</span> <span style="color: #ff7700;font-weight:bold;">from</span> jnius <span style="color: #ff7700;font-weight:bold;">import</span> autoclass
<span style="color: #66cc66;">&gt;&gt;&gt;</span> Stack = autoclass<span style="color: black;">&#40;</span><span style="color: #483d8b;">'java.util.Stack'</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> stack = Stack<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> stack.<span style="color: black;">push</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'hello'</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> stack.<span style="color: black;">push</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'world'</span><span style="color: black;">&#41;</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> stack.<span style="color: black;">pop</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #483d8b;">'world'</span>
<span style="color: #66cc66;">&gt;&gt;&gt;</span> stack.<span style="color: black;">pop</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
<span style="color: #483d8b;">'hello'</span></pre></div></div>

<p>What we demonstrate here is the <a href="http://pyjnius.readthedocs.org/en/latest/api.html#jnius.autoclass">autoclass</a> function that create kind-of proxy that reflect all the methods and fields available from the Java class <code>java.util.Stack</code>.</p>
<p>Ok, maybe you want an Android-related example? Just have a look:</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> jnius <span style="color: #ff7700;font-weight:bold;">import</span> autoclass
<span style="color: #ff7700;font-weight:bold;">from</span> <span style="color: #dc143c;">time</span> <span style="color: #ff7700;font-weight:bold;">import</span> sleep
&nbsp;
MediaRecorder = autoclass<span style="color: black;">&#40;</span><span style="color: #483d8b;">'android.media.MediaRecorder'</span><span style="color: black;">&#41;</span>
AudioSource = autoclass<span style="color: black;">&#40;</span><span style="color: #483d8b;">'android.media.MediaRecorder$AudioSource'</span><span style="color: black;">&#41;</span>
OutputFormat = autoclass<span style="color: black;">&#40;</span><span style="color: #483d8b;">'android.media.MediaRecorder$OutputFormat'</span><span style="color: black;">&#41;</span>
AudioEncoder = autoclass<span style="color: black;">&#40;</span><span style="color: #483d8b;">'android.media.MediaRecorder$AudioEncoder'</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Record the Microphone with a 3GP recorder</span>
mRecorder = MediaRecorder<span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
mRecorder.<span style="color: black;">setAudioSource</span><span style="color: black;">&#40;</span>AudioSource.<span style="color: black;">MIC</span><span style="color: black;">&#41;</span>
mRecorder.<span style="color: black;">setOutputFormat</span><span style="color: black;">&#40;</span>OutputFormat.<span style="color: black;">THREE_GPP</span><span style="color: black;">&#41;</span>
mRecorder.<span style="color: black;">setOutputFile</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'/sdcard/testrecorder.3gp'</span><span style="color: black;">&#41;</span>
mRecorder.<span style="color: black;">setAudioEncoder</span><span style="color: black;">&#40;</span>AudioEncoder.<span style="color: black;">ARM_NB</span><span style="color: black;">&#41;</span>
mRecorder.<span style="color: black;">prepare</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
<span style="color: #808080; font-style: italic;"># Record 5 seconds</span>
mRecorder.<span style="color: black;">start</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
sleep<span style="color: black;">&#40;</span><span style="color: #ff4500;">5</span><span style="color: black;">&#41;</span>
mRecorder.<span style="color: black;">stop</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
mRecorder.<span style="color: black;">release</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>More examples are available in the documentation. We have a mapping between Java/Python type, native arrays, support for methods with multiple signatures, and a lot more. We are using <a href="http://cython.org">Cython</a> + <a href="http://en.wikipedia.org/wiki/Java_Native_Interface">JNI</a> internally. The performance cost is minimal.</p>
<p>The library is already available for <a href="http://github.com/kivy/python-for-android">Python for android</a>.</p>
<p>The library have been done by <a href="http://blog.tshirtman.fr/">Gabriel Pettier</a> and myself, under the <a href="http://kivy.org/">Kivy organization</a>.</p>
<p>If you like my work, <a href="https://www.gittip.com/tito/">tip me!</a> <iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/tito/widget.html"
width="48pt" height="20pt"></iframe>
</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2012/08/pyjnius-accessing-java-classes-from-python/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>IOS Support for Kivy</title>
		<link>http://txzone.net/2012/03/ios-support-for-kivy/</link>
		<comments>http://txzone.net/2012/03/ios-support-for-kivy/#comments</comments>
		<pubDate>Sun, 11 Mar 2012 22:45:42 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=479</guid>
		<description><![CDATA[Kivy has now added official support for IOS platform. You can now package your Kivy application for the Ipad (and other iOS devices, testers needed). The current instructions are available here: http://kivy.org/docs/guide/packaging-ios.html For the full story on the multiple Apple &#8230; <a href="http://txzone.net/2012/03/ios-support-for-kivy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Kivy has now added <a href="https://groups.google.com/d/topic/kivy-users/EoujXCpMSSk/discussion">official support for IOS platform</a>. You can now package your Kivy application for the Ipad (and other iOS devices, testers needed).</p>
<p>The current instructions are available here: <a href="http://kivy.org/docs/guide/packaging-ios.html">http://kivy.org/docs/guide/packaging-ios.html</a></p>
<p>For the full story on the multiple Apple limitations we are working with, i want to share the hardest part for Python integration: Apple&#8217;s prohibition on using dlopen() to load dynamic libraries.<br />
In a typical case, a compiled Python library&#8217;s extension is a &#8220;.so&#8221;, and the &#8220;.so&#8221; is dlopen() at import.</p>
<p>That being said, as we did for the <a href="http://txzone.net/2012/01/introducing-python-for-android/">python-for-android</a> project published in January, we are redirecting the compilation object to create static libraries. Theses libraries are included in the final application binary. But it&#8217;s not enough: we must also tell to Python to look for the library entry point in the application binary, instead of dlopen(). So in the python dynload loader:</p>
<pre>return (dl_funcptr) dlsym(RTLD_MAIN_ONLY, funcname)</pre>
<p>This way, Python will always look at the application binary, and never need to use dlopen().</p>
<p>If you are worried that Apple would reject a Python-based application, or even using Kivy altogether, we have tested it for you: the game that won the Kivy contest has been packaged for IOS, submitted to Apple&#8230; and accepted. You can found <a href="http://itunes.apple.com/us/app/deflectouch/id505729681">Deflectouch on iTunes</a> (<a href="https://github.com/stocyr/Deflectouch">source code</a>).</p>
<p>Anyway, <a href="http://kivy.org">Kivy</a> is now officially supporting 5 platforms: Windows, Linux, MacOSX, Android and IOS!</p>
<p>Enjoy <img src='http://txzone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you like my work, <a href="https://www.gittip.com/tito/">tip me!</a> <iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/tito/widget.html"
width="48pt" height="20pt"></iframe>
</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2012/03/ios-support-for-kivy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Kivy programming contest #1 is over!</title>
		<link>http://txzone.net/2012/02/kivy-programming-contest-1-is-over/</link>
		<comments>http://txzone.net/2012/02/kivy-programming-contest-1-is-over/#comments</comments>
		<pubDate>Mon, 06 Feb 2012 10:34:54 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=462</guid>
		<description><![CDATA[During January, we hosted a contest for promoting the Kivy framework. The goal was simple: create a game using Kivy, without external non-pure python dependencies. All the entries have been submitted on our sponsor Github (and thanks to NotionInk), under &#8230; <a href="http://txzone.net/2012/02/kivy-programming-contest-1-is-over/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>During January, we hosted a contest for promoting the <a href="http://kivy.org/">Kivy</a> framework. The goal was simple: create a game using Kivy, without external non-pure python dependencies. All the entries have been submitted on our sponsor <a href="http://github.com/">Github</a> (and thanks to <a href="http://notionink.com">NotionInk</a>), under a compatible OSS licence. The contest registered 21 entries, and <a href="http://kivy.org/#contest">11 submissions</a> was valid.</p>
<p><a href="http://kivy.org/#contest"><img alt="" src="http://kivy.org/slides/contest2012-end-featured.jpg" class="aligncenter" width="580" height="260" /></a></p>
<p>Our winners are:</p>
<ol>
<li>
		<a href="https://github.com/stocyr/Deflectouch">Deflectouch</a>, from Cyril Stoller
	</li>
<li>
		<a href="https://github.com/Zogg/FishLife">FishLife</a>, from Zogg
	</li>
<li>
		<a href="https://github.com/niavlys/memoryKivy">memoryKivy</a>, from Niavlys
	</li>
<li>
		<a href="https://github.com/dcower/centripetal">Centripetal</a>, from Dilon Cower
	</li>
<li>
		<a href="https://github.com/wilsaj/flingy">Flingy</a>, from Andy Wilson
	</li>
</ol>
<p>In term of numbers, everything is growing:</p>
<ul>
<li>19919 unique visitors for the website (vs 9772 in December)</li>
<li>+56 subscribers on the mailing list (192 in total)</li>
<li>229 messages on kivy-users (vs 94 in December)</li>
<li>23 pull requests (vs 6 in December)</li>
</ul>
<p>That was a great event so far, with a perfect timing: Kivy have now 1 year old! (first release was 1st February 2011).</p>
<p>If you like my work, <a href="https://www.gittip.com/tito/">tip me!</a> <iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/tito/widget.html"
width="48pt" height="20pt"></iframe>
</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2012/02/kivy-programming-contest-1-is-over/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing &#8220;Python for Android&#8221;</title>
		<link>http://txzone.net/2012/01/introducing-python-for-android/</link>
		<comments>http://txzone.net/2012/01/introducing-python-for-android/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 16:20:06 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>
		<category><![CDATA[PyMT]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=430</guid>
		<description><![CDATA[I&#8217;m glad to share a new project called Python for Android. The goal of this project is to package your python application into an APK. https://github.com/kivy/python-for-android The project is under the umbrella of Kivy organization, but is not designed to &#8230; <a href="http://txzone.net/2012/01/introducing-python-for-android/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m glad to share a new project called <a href="https://github.com/kivy/python-for-android">Python for Android</a>. The goal of this project is to <strong>package your python application into an APK</strong>.</p>
<p><a href="https://github.com/kivy/python-for-android">https://github.com/kivy/python-for-android</a></p>
<p>The project is under the umbrella of Kivy organization, but is not designed to be limited to Kivy only. Read the documentation to correctly install the NDK/SDK Android, and set the needed environment variables.</p>
<p>The packaging is done in 4 steps:<br />
1. Ensure you have Android SDK/NDK downloaded and correctly installed<br />
2. Ensure you have some environment set<br />
3. Create a Python distribution containing the selected modules<br />
4. Use that distribution to build an APK of your Python application</p>
<p>Creating the python distribution is as simple as that:</p>
<pre>
# create a simple distribution with python + PIL + Kivy
./distribute.sh -m "pil kivy"

# create a distribution with python + openssl + pil + kivy
./distribute.sh -m "openssl pil kivy"
</pre>
<p>A directory <code>dist/default</code> will be created, including the result of the whole arm compilation.<br />
Available libraries as for today: jpeg pil png sdl sqlite3 pygame kivy android libxml2 libxslt lxml ffmpeg openssl.</p>
<p>The second step is a little bit harder, since you need to provide more information for Android:</p>
<pre>
cd dist/default
./build.py --package org.test.touchtracer --name touchtracer \
--version 1.0 --dir ~/code/kivy/examples/demo/touchtracer debug installd

# --package: java name of your application
# --name: title of your application
# --version: version of your application
# --dir: location of your application containing the main.py
</pre>
<p>Then you&#8217;ll get a nicely <code>bin/touchtracer-1.0-debug.apk</code></p>
<p>Pro:</p>
<ul>
<li>A blacklist.txt file that can be used to exclude files in the final APK</li>
<li>Reusable distribution for other applications</li>
<li>Modular recipes architecture</li>
<li>Be able to build independents python distributions</li>
</ul>
<p>Cons:</p>
<ul>
<li>You need a main.py file that will be used for starting your application</li>
<li>Only one java bootstrap available, using OpenGL ES 2.0.</li>
<li>Only Kivy toolkit is working. I&#8217;m sure that other people can enhance it to add other toolkit recipes. But for example, pygame is not gonna to work because the android project is OpenGL ES 2.0: pygame drawing will not work.</li>
</ul>
<p>I hope you&#8217;ll like it <img src='http://txzone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><em>We would like to thank Renpy / PGS4A for its initial pygame for android project</em></p>
<p>If you like my work, <a href="https://www.gittip.com/tito/">tip me!</a> <iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/tito/widget.html"
width="48pt" height="20pt"></iframe>
</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2012/01/introducing-python-for-android/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Kivy programming contest #1</title>
		<link>http://txzone.net/2011/12/kivy-programming-contest-1/</link>
		<comments>http://txzone.net/2011/12/kivy-programming-contest-1/#comments</comments>
		<pubDate>Mon, 26 Dec 2011 10:29:55 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=422</guid>
		<description><![CDATA[Kivy, an open source project for building cross platform applications and user interfaces, is announcing its 1st programming contest. The contest will start with the publication of official rules on January 1st. Registrations will be accepted through January 25th, and &#8230; <a href="http://txzone.net/2011/12/kivy-programming-contest-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://txzone.net/wp-content/uploads/2011/12/kivy-icon-128.png" alt="" title="kivy-icon-128" width="128" height="128" class="alignright size-full wp-image-424" /></p>
<p><a href="http://kivy.org/">Kivy</a>, an open source project for building cross platform applications and user interfaces, is announcing its 1st programming contest. The contest will start with the publication of official rules on January 1st. Registrations will be accepted through January 25th, and submissions will be accepted through January 31st. Prizes include Nvidia Tegra 2 android tablets from NotionInk, One-year “bronze” plans and t-shirts.</p>
<p>The goal of the contest is to encourage interested developers to learn more about Kivy, which is a cross platform Application and User Interface software library for the python programming language. Kivy applications run on Linux, Windows, OSX, Android (and iOS).  The framework supports most inputs protocols and devices like WM_Touch, WM_Pen, Mac OS X Trackpad and Magic Mouse, single/multi touch screens, Mtdev, Linux Kernel HID, TUIO, and uses pure hardware accelerated rendering to enable developers to really take user interfaces to a new level.</p>
<p>The contest is sponsored by <a href="http://www.notionink.com/">NotionInk</a>, an indian company that designs tablets PCs, and <a href="http://github.com/">Github</a>, a web-based hosting service for software developments projects.</p>
<p>Join the contest at : <a href="http://kivy.org/#contest">http://kivy.org/#contest</a></p>
<p>If you like my work, <a href="https://www.gittip.com/tito/">tip me!</a> <iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/tito/widget.html"
width="48pt" height="20pt"></iframe>
</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/12/kivy-programming-contest-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kivy 1.0.8 released ! What&#8217;s next ?</title>
		<link>http://txzone.net/2011/10/kivy-1-0-8-released-whats-next/</link>
		<comments>http://txzone.net/2011/10/kivy-1-0-8-released-whats-next/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 23:09:07 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=403</guid>
		<description><![CDATA[101 days after 1.0.7, Kivy 1.0.8 have been released (changelog). This release include: New widgets: Virtual Keyboard, Accordion, ProgressBar Video support on android &#8211; Python bindings for ffmpeg have been done and are available on github. Theses are focused to &#8230; <a href="http://txzone.net/2011/10/kivy-1-0-8-released-whats-next/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>101 days after 1.0.7, <a href="http://kivy.org/">Kivy 1.0.8</a> have been released (<a href="http://kivy.org/#changelog">changelog</a>).</p>
<p><img src="http://txzone.net/wp-content/uploads/2011/10/kivy-1.0.81.jpg" alt="" title="Kivy 1.0.8 - Virtual Keyboard - Accordion Widget" width="600" height="256" class="aligncenter size-full wp-image-405" /></p>
<p>This release include:</p>
<ul>
<li>New widgets: Virtual Keyboard, Accordion, ProgressBar</li>
<li>Video support on android &#8211; <a href="http://github.com/tito/ffmpeg-android">Python bindings for ffmpeg</a> have been done and are available on github. Theses are focused to be usable on android within Kivy project, but any help to clean and make the code more crossplatform is welcome !</li>
<li>Scroll wheel support in scrollview</li>
<li>+ 1.6x more performance on Kivy langage</li>
<li>Support for GIF image + set of images in Zip files</li>
<li>Bezier and stipple lines in graphics instructions</li>
<li>&#8230; and lot of improvements and fixes !</li>
</ul>
<p>A documentation translation project have been <a href="https://groups.google.com/d/topic/kivy-dev/2s5sA8PHb4U/discussion">started</a> (thanks for <a href="http://sphinx.pocoo.org/">Sphinx</a> for generating gettext translations automatically from python autodoc). Help us at: <a href="http://translation.kivy.org/">http://translation.kivy.org/</a>.</p>
<p>And now, where to go ?</p>
<p>The roadmap is not written, since what we do is mostly depending of our interests / jobs / contributions.<br />
But community is growing fast ! I see <a href="https://github.com/tito/kivy/pull/281">$N multistroke recognizer</a>, GSOC integration (better macosx integration), iOS port, better android packaging, unit test, better desktop integration, widget theming support, 3D graphics instructions&#8230;</p>
<p>If you still hesitating about using Kivy&#8230; just look at the frontpage for the current awesome projects made by the community. And they are lot of others projects going to be released during the next month ! We are also glad to see some big companies to use Kivy as the base for building their products.<br />
If you have also cool project going on, don&#8217;t hesitate to share <img src='http://txzone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>To finish, here is a video from Cyril that playing on <a href="https://github.com/stocyr/IcarusTouch">Icarus Touch</a>, an instrument that use Kivy for his UI. Awesome work !</p>
<p><object width="420" height="315"><param name="movie" value="http://www.youtube.com/v/u4NRu7mBXtA?version=3&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/u4NRu7mBXtA?version=3&amp;hl=en_US" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>If you like my work, <a href="https://www.gittip.com/tito/">tip me!</a> <iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/tito/widget.html"
width="48pt" height="20pt"></iframe>
</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/10/kivy-1-0-8-released-whats-next/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing perl errors when using gitolite + ssh + custom locales</title>
		<link>http://txzone.net/2011/10/fixing-perl-errors-when-using-gitolite-ssh-custom-locales/</link>
		<comments>http://txzone.net/2011/10/fixing-perl-errors-when-using-gitolite-ssh-custom-locales/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 09:44:09 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=395</guid>
		<description><![CDATA[If you have locale issues on a server, and your server is english only, this kind of issues can happen: $ git push origin master perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = &#8230; <a href="http://txzone.net/2011/10/fixing-perl-errors-when-using-gitolite-ssh-custom-locales/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you have locale issues on a server, and your server is english only, this kind of issues can happen:</p>
<pre>
$ git push origin master
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_MESSAGES = "fr_FR.UTF-8",
	LC_COLLATE = "fr_FR.UTF-8",
	LC_CTYPE = "fr_FR.UTF-8",
	LANG = "en_US.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Everything up-to-date
</pre>
<p>You might want to check your <code>/etc/ssh/sshd_config</code> and look at the <code>AcceptEnv</code> token.<br />
On this ssh server, it was:</p>
<pre>
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
</pre>
<p>My locale environment was passed to the server, but the server doesn&#8217;t know about fr. Since i don&#8217;t want to install fr locales, just comment that line:</p>
<pre>
# Allow client to pass locale environment variables
# AcceptEnv LANG LC_*
</pre>
<p>Done.</p>
<p>If you like my work, <a href="https://www.gittip.com/tito/">tip me!</a> <iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/tito/widget.html"
width="48pt" height="20pt"></iframe>
</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/10/fixing-perl-errors-when-using-gitolite-ssh-custom-locales/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Texture compression, why does it matter ?</title>
		<link>http://txzone.net/2011/09/texture-compression-why-does-it-matter/</link>
		<comments>http://txzone.net/2011/09/texture-compression-why-does-it-matter/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 10:44:22 +0000</pubDate>
		<dc:creator>tito</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Kivy]]></category>
		<category><![CDATA[Planet Python]]></category>
		<category><![CDATA[Planet Ubuntu]]></category>

		<guid isPermaLink="false">http://txzone.net/?p=378</guid>
		<description><![CDATA[We all care about cash, time, life, love, and if you&#8217;re doing computer graphics, you might care about the memory consumption of your graphics card. Why ? For the same reason when you running out of cash I&#8217;ll explain why &#8230; <a href="http://txzone.net/2011/09/texture-compression-why-does-it-matter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://txzone.net/wp-content/uploads/2011/09/museotouch2.png"><img src="http://txzone.net/wp-content/uploads/2011/09/museotouch2-300x168.png" alt="" title="Museotouch" width="300" height="168" class="alignright size-medium wp-image-390" /></a></p>
<p>We all care about cash, time, life, love, and if you&#8217;re doing computer graphics, you might care about the memory consumption of your graphics card. Why ? For the same reason when you running out of cash <img src='http://txzone.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ll explain why does it matter to compress texture, and compare available possibilities. My personnal goal is to be able to load a lot of FULL HD pictures on tablet, for a museum project. The analysis is focused on DXT1 compression and size. I&#8217;m looking forward to ETC1 and will update that blog post with the result in the future.</p>
<h2>What are we dealing with</h2>
<p>If you are doing an application that display lot of hd pictures, that&#8217;s matter. We&#8217;ll start from this simple math statement: a full HD picture is 1980&#215;1020 with 4 channels (RGBA). Whatever if your pictures is in PNG, or JPEG, your graphics card is not able to understand it, and will store it in its memory decompressed. So this image will eat:</p>
<p><code>1920 x 1080 x 4 = 8294400 bytes = 7.91MB</code><br />
<code>1920 x 1080 x 4 + mipmaps = 10769252 bytes = 10.27MB</code></p>
<p>In theory. Because it might be more if your graphics card doesn&#8217;t support NPOT texture. If not, usually, the texture will be resized to the closest POT texture available, mean for us: 2048 x 2048. Then the size for POT will be:</p>
<p><code>2048 x 2048 x 4 = 16777216 bytes = 16MB</code><br />
<code>2048 x 2048 x 4 + mipmaps = 22369620 bytes = 21MB</code></p>
<h2>Compressions types</h2>
<p>They are plenty types of compression availables. The most common are S3TC (including DXT1, DXT3, DXT5) from Savage3 originally, LATC from Nvidia, PVRTC from PowerVR, ETC1 from Ericsson&#8230;</p>
<p>Not all of them are available everywhere, and it&#8217;s depending a lot from your hardware. Here is a list of tablet / vendor / texture compression available. (only tablet, not desktop computer.) Thanks to this <a href="http://stackoverflow.com/questions/3881197/opengl-es-2-0-extensions-on-android-devices">stackoverflow thread  about supported OpenGL ES 2.0 extensions on Android devices</a></p>
<table>
<tbody>
<tr>
<th>Tablette</th>
<th>Vendor</th>
<th><a href="http://www.opengl.org/registry/specs/EXT/texture_compression_dxt1.txt">DXT1</a></th>
<th><a href="http://www.opengl.org/registry/specs/EXT/texture_compression_s3tc.txt">S3TC</a></th>
<th><a href="http://www.opengl.org/registry/specs/EXT/texture_compression_latc.txt">LATC</a></th>
<th><a href="http://www.khronos.org/registry/gles/extensions/IMG/IMG_texture_compression_pvrtc.txt">PVRTC</a></th>
<th><a href="http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt">ETC1</a></th>
<th><a href="http://en.wikipedia.org/wiki/3Dc">3DC</a></th>
<th>ATC</th>
</tr>
<tr>
<td>(desktop computer) GeForce GTX 560</td>
<td>NVIDIA</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<tr>
<td>Motorola Xoom</td>
<td>NVIDIA</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Nexus One</td>
<td>Qualcom</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Toshiba Folio</td>
<td>NVIDIA</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>LGE Tablet</td>
<td>NVIDIA</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Galaxy Tab</td>
<td>PowerVR</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Acer Stream</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Desire Z</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Spica</td>
<td>Samsumg</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>HTC Desire</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>VegaTab</td>
<td>NVIDIA</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Nexus S</td>
<td>PowerVR</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>HTC Desire HD</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>HTC Legend</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Samsung Corby</td>
<td>Qualcomm</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
</tr>
<tr>
<td>Droid 2</td>
<td>PowerVR</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Galaxy S</td>
<td>PowerVR</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Milestone</td>
<td>PowerVR</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>We are seeing that ETC1 is standard compression for OpenGL ES 2, unfortunately, it will not work on desktop.<br />
PVRTC is specific to PowerVR device: it&#8217;s a standard on Ipad/Iphone.</p>
<h2>Using DXT1</h2>
<p>If you use DXT1, you need a POT image. DXT1 doesn&#8217;t work on NPOT.</p>
<p>To convert any image to DXT1 without any tool, you must know that your graphics card is capable of doing it, using specials opengl functions. But i wanted to precalculate them.<br />
<a href="http://code.google.com/p/nvidia-texture-tools/">Nvidia texture tools</a> contains tools for converting them, but you need an Nvidia card. For all others, you might want to look at <a href="http://code.google.com/p/libsquish/">Libsquish</a>. It&#8217;s designed to compress in software a raw image to DXTn.<br />
The result will be not a DXT1 &#8220;file&#8221;, because DXT1 is the compression format. The result will be stored in a DDS file, that we&#8217;ll see later about it.</p>
<p>If you want to be able to use libssquish in Python, you might want to apply my <a href="http://code.google.com/p/libsquish/issues/attachmentText?id=17&#038;aid=170001000&#038;name=libsquish-python-binding.patch&#038;token=c82cbbd3c5b614a8d798d832dedf126c">patch available on their issue tracker</a></p>
<p>For DXT1, the size of the file is not depending of the image content:</p>
<p><code>DXT1 2048x2048 RGBA = 2097152 bytes = 2MB</code></p>
<p>That&#8217;s already a big improvement. DXTn is able to store mipmaps of the texture too. For this size, the calculation is:</p>
<p><code>DXT1 2048x2048 RGBA + mipmap = 2795520 bytes = 2.73MB</code></p>
<h2>Comparaison table</h2>
<table>
<tr>
<th>Type</th>
<th>Resolution</th>
<th>File size</th>
<th>GPU size</th>
<th>Images in a 256MB GPU</th>
<th>Images in a 512MB GPU</th>
</tr>
<tr>
<td>Raw RGBA image (POT)</td>
<td>2048 x 2048</td>
<td>-</td>
<td>16384KB</td>
<td>16</td>
<td>32</td>
</tr>
<tr>
<td>PNG image (NPOT)</td>
<td>1920 x 1080</td>
<td>4373KB</td>
<td>8040KB</td>
<td>32</td>
<td>65</td>
</tr>
<tr>
<td>PNG Image in reduced POT resolution</td>
<td>1024 x 1024</td>
<td>1268KB</td>
<td>4096KB</td>
<td>64</td>
<td>128</td>
</tr>
<tr>
<td>DXT1 without mipmap</td>
<td>2048 x 2048</td>
<td>2048KB</td>
<td>2048KB</td>
<td>128</td>
<td>256</td>
</tr>
<tr>
<td>DXT1 without mipmap, reduced</td>
<td>1024 x 1024</td>
<td>512KB</td>
<td>512KB</td>
<td>512</td>
<td>1024</td>
</tr>
<tr>
<td>DXT1 with mipmap</td>
<td>2048 x 2048</td>
<td>2730KB</td>
<td>2730KB</td>
<td>96</td>
<td>192</td>
</tr>
<tr>
<td>DXT1 with mipmap, reduced</td>
<td>1024 x 1024</td>
<td>682KB</td>
<td>682KB</td>
<td>384</td>
<td>768</td>
</tr>
</table>
<p>As soon as we use compression, what we see is:</p>
<ol>
<li>The file size is the same as GPU size</li>
<li>Even with POT texture compared to NPOT dxt1, we can still store 4x more images in GPU</li>
</ol>
<h2>And with Kivy ?</h2>
<p>DXT1 itself is the compression format, but you cannot actually use it like that. You need to store the result is a formatted file. <a href="http://msdn.microsoft.com/en-us/library/bb943991.aspx/">DDS</a>.</p>
<p><a href="http://kivy.org/">Kivy</a> is already able to read DDS files. But you must ensure that your graphics card is supporting DXT1 or S3TC. Look at <a href="http://kivy.org/docs/api-kivy.graphics.opengl_utils.html?highlight=dxt#kivy.graphics.opengl_utils.gl_has_capability">gl_has_capability()</a> function in Kivy then.</p>
<p>If you like my work, <a href="https://www.gittip.com/tito/">tip me!</a> <iframe style="border: 0; margin: 0; padding: 0;"
src="https://www.gittip.com/tito/widget.html"
width="48pt" height="20pt"></iframe>
</p>
]]></content:encoded>
			<wfw:commentRss>http://txzone.net/2011/09/texture-compression-why-does-it-matter/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
