Skip to main content

SWF Parsing Utilities

Project description

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!


$ 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.
- [Pillow 2.9.0](
- [lxml 3.4.0](
- [pylzma 0.4.6](

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(

Project details

Download files

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

Source Distribution (52.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page