The upcoming release of Adobe AIR will provide support for UDP sockets, allowing you to send and receive messages using the Universal Datagram Protocol (UDP).
We created an example, using Adobe AIR 2.0 and the PyAMF and Twisted libraries for Python, that echoes ByteArray messages every x seconds to a Twisted UDP server. The example application also enumerates available hardware and software network interfaces on the client computer using the new NetworkInfo API.
JSR-223 enables dynamic languages to be callable via Java in a seamless manner. Unfortunately this is currently only supported with Jython 2.2.1 and not the latest 2.5.0. Since PyAMF only supports Jython 2.5 or newer, you have to use the PythonInterpreter class directly. This style of embedding code is very similar to making use of a scripting engine, but it has the advantage of working with Jython 2.5.
Here you see the gateway running in Ant:
Buildfile: build.xml
clean:
compile:
[mkdir] Created dir: build/classes
[javac] Compiling 1 source file to build/classes
jar:
[mkdir] Created dir: build/jar
[jar] Building jar: build/jar/HelloWorld.jar
run:
[java] *sys-package-mgr*: processing new jar, 'build/jar/HelloWorld.jar'
[java] Running AMF gateway on http://localhost:8000
Today a new tutorial was added that shows you how to deploy your PyAMF applications with Apache Tomcat and modjy. modjy is an implementation of a WSGI compliant gateway/server for Jython, built on Java/J2EE servlets. This allows you to run Jython WSGI applications inside a Java/J2EE servlet container, e.g. Apache Tomcat. modjy is part of the Jython project.
Now that the upcoming Jython 2.5 is getting closer to it’s final release, I thought it would be nice to create an example that shows PyAMF running on top of Jython. Jython is an implementation of the high-level, dynamic, object-oriented language Python written in 100% Pure Java, and seamlessly integrates with the Java platform. It thus allows you to run Python scripts on any Java platform.
Below you see a screenshot of the example, which was created using Java’s native Swing UI toolkit. It allows you to start a simple AMF server on localhost:8000 and embeds an AMF client that makes calls to that server. This particular example doesn’t interact with an Adobe Flash Player application, it simply shows it’s possible to run PyAMF servers and clients on top of the upcoming Jython release.
You can browse or download the source from the Subversion repository. You can find instructions on how to run the example yourself on the wiki page.
Dave Thompson created a new address book example that uses the new SQLAlchemy adapter that was added in the latest release of PyAMF. PyAMF provides Action Message Format (AMF) support for Python, mainly used in the Adobe Flash Player for RPC communication.
You can browse or download the source from the Subversion repository. You can find instructions on how to run the example yourself on the documentation page.
Unicode handling in __repr__ functions has been improved (Ticket:455)
Django models.TimeField, models.DateField will now be converted to the correct type (datetime.time and datetime.date respectively). fields.NOT_PROVIDED is also checked for by converting to pyamf.Undefined and back again. (Ticket:457)
The team is proud to announce the release of PyAMF 0.4 final!
PyAMF is a lightweight library that allows Flash and Python applications to communicate via Adobe’s ActionScript Message Format.
This release fixes over a 100 tickets, see the changelog for the complete list of changes. We now consider the library to be stable and ready for production! A brief overview of the changes:
A new C extension to pyamf.util and pyamf.amf3. This is a work in progress, created using Cython, and more sections of the library will be moved to C as they are identified. Thanks to Gerard Escalante.
An adapter for SQLAlchemy 0.4/0.5 is available, allowing object graphs to be easily encoded. See the wiki for more information. Thanks to Dave Thompson and Michael Van Tellingen.
Improvements to the Google App Engineadapter to allow datastore objects to be easily encoded/decoded.
The PyAMF team is proud to announce a new release of PyAMF, a lightweight library that allows Flash and Python applications to communicate via Adobe’s ActionScript Message Format.
This is hopefully the last Release Candidate before we release 0.4 final. Changes since rc2 include:
pyamf.util.DataTypeMixIn/cpyamf.util.BufferedByteStream can now encode/decode 24bit un/signed integers. (Ticket:422)
pyamf.util.StringIOProxy/cpyamf.util.BufferedByteStream both have new consume methods that will chop of the tail of the stream (already read stream). (Ticket:423)
Now checking for all types of supported xml lib types for encoding, but will only use the first implementation for decoding (Ticket:426)
fpconst dependancy is now only required if the platform requires it (Ticket:356)
Decoding negative timestamps on certain platforms (namely Windows) are now supported (Ticket:390)
For a detailed list of changes, see the change log.
To download this release either grab a compressed file, use ‘easy_install -U pyamf’ or grab the Subversion tag.