Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

SWF Parsing Utilities

Project Description
PYSWF
=====
A Python library for reading and writing SWF files.
PYSWF is a Python port of Claus Wahlers *great* SWF parser https://github.com/claus/as3swf
Can't thank Claus enough!

INSTALL
-------

$ pip install pyswf==1.5.4

or:

$ git clone git@github.com:timknip/pyswf.git
$ cd pyswf
$ python setup.py install

or you might need do:

$ sudo python setup.py install

WINDOWS
-------
Install Pillow, lxml and pylzma from a binary distribution before running setup.
- [Pillow 2.9.0](http://www.lfd.uci.edu/~gohlke/pythonlibs/#pillow)
- [lxml 3.4.0](https://pypi.python.org/pypi/lxml/3.4.0#downloads)
- [pylzma 0.4.6](http://www.lfd.uci.edu/~gohlke/pythonlibs/#pylzma)

Installing the *.whl files:

$ pip install the-downloaded.whl

USAGE
-----

Basic example:
--------------
```python
from swf.movie import SWF

# create a file object
file = open('path/to/swf', 'rb')

# print out the SWF file structure
print SWF(file)
```


SVG export example:
-------------------
```python
from swf.movie import SWF
from swf.export import SVGExporter

# create a file object
file = open('path/to/swf', 'rb')

# load and parse the SWF
swf = SWF(file)

# create the SVG exporter
svg_exporter = SVGExporter()

# export!
svg = swf.export(svg_exporter)

# save the SVG
open('path/to/svg', 'wb').write(svg.read())
```
Release History

Release History

This version
History Node

1.5.4

History Node

1.5.3

History Node

1.5.2

History Node

1.5.1

History Node

1.4

History Node

1.3

History Node

1.2

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyswf-1.5.4.zip (52.1 kB) Copy SHA256 Checksum SHA256 Source Jul 25, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting