Coder Social home page Coder Social logo

python-bytecode-sax's Introduction

NAME

Python::Bytecode::SAX - Process Python bytecode, generating SAX events.

SYNOPSIS

use Python::Bytecode::SAX;
use XML::SAX::Writer;
my $handler = XML::SAX::Writer->new( Output => 'foo.xml' );
my $parser = Python::Bytecode::SAX->new( Handler => $handler, SAX => 2 );
$parser->parse_file('foo.pyc');

Or

use Python::Bytecode::SAX;
use XML::Handler::YAWriter;
my $handler = XML::Handler::YAWriter->new(
    AsFile => 'foo.xml',
    Pretty  => {
        CompactAttrIndent  => 1,
        PrettyWhiteIndent  => 1,
        PrettyWhiteNewline => 1,
        CatchEmptyElement  => 1
    }
);
my $parser = Python::Bytecode::SAX->new( Handler => $handler, SAX => 1 );
$parser->parse_file('foo.pyc');

DESCRIPTION

This module reads and decodes a Python bytecode file, generating SAX1 or SAX2 events (SAX1 is the default) for what it finds.

Until more documentation is written, you can examine the two XML files generated in the t/ directory by make test to get a feel for the overal structure and the element and attribute names.

HISTORY

Based on the Python::Bytecode module by Simon Cozens [email protected], which is based on the dis.py file in the Python Standard Library.

SEE ALSO

Python::Bytecode by Simon Cozens [email protected].

AUTHOR

Gregor N. Purdy, Sr. <[email protected]

COPYRIGHT

Copyright (C) 2003-2012 Gregor N. Purdy, Sr. All rights reserved.

LICENSE

This program is free software. Its use is subject to the same license as Perl.

python-bytecode-sax's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.