Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A Python library to read and write SWF files
Latest commit 6dcc9b9 @timknip2 timknip2 adding tests
Failed to load latest commit information.
bin fixing merge conflicts
docs initial commit
swf Provide a human readable compileTime representation
test adding tests
.gitignore added gitignore
.travis.yml adding tests
LICENSE added LICENSE updating readme enabling travis
TODO updated TODO
setup.cfg updating readme bumping to 1.5.4


A Python library for reading and writing SWF files. PYSWF is a Python port of Claus Wahlers great SWF parser Can't thank Claus enough!

Build Status


$ pip install pyswf==1.5.4


$ git clone
$ cd pyswf
$ python install

or you might need do:

$ sudo python install


Install Pillow, lxml and pylzma from a binary distribution before running setup.

Installing the *.whl files:

$ pip install the-downloaded.whl


Basic example:

from import SWF

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

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

SVG export example:

from 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(
Something went wrong with that request. Please try again.