Skip to main content

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

python setup.py install

or you might need do:

$sudo python setup.py install

WINDOWS
-------
Install lxml and pylzma from a binary distribution before running setup.
- [lxml 3.4.0](https://pypi-hypernode.com/pypi/lxml/3.4.0#downloads)
- [pylzma 0.4.6](http://www.lfd.uci.edu/~gohlke/pythonlibs/#pylzma)
- download the *.whl, cd into download location and run:


$ pip install pylzma-VERSION.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())
```

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

pyswf-1.5.3.tar.gz (46.4 kB view details)

Uploaded Source

File details

Details for the file pyswf-1.5.3.tar.gz.

File metadata

  • Download URL: pyswf-1.5.3.tar.gz
  • Upload date:
  • Size: 46.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyswf-1.5.3.tar.gz
Algorithm Hash digest
SHA256 f0b57d954cf48d86e321c2f121edde3904dbf3ea9557224fb7b2152c3e6cf010
MD5 ba4f18abc27c1457fe5c20d59ac1106f
BLAKE2b-256 8a75f60eaaf98aca99ac400c6c5bc7e5947a30153683240b28e2f9011b8ac4a5

See more details on using hashes here.

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