Skip to content

poxyran/pyswf

This branch is 1 commit ahead of, 67 commits behind timknip/pyswf:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

de9ba0b · Jun 25, 2014

History

44 Commits
May 29, 2011
Jun 25, 2014
Oct 14, 2011
May 29, 2011
May 19, 2014
May 29, 2011
May 19, 2014

Repository files navigation

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

python setup.py install

or you might need do:

$sudo python setup.py install

DEPENDENCIES

  • lxml
  • StringIO
  • Image (PIL)

You can use easy_install or pip to install these. NOTE: this code is only tested with python 2.6

USAGE

Basic example:

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:

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())

About

A Python library to read and write SWF files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%