Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

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.

Files for pyswf, version 1.5.4
Filename, size File type Python version Upload date Hashes
Filename, size (52.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page