This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Creating tree structures like those used for HTML and XML should be dead easy. The xml.etree.ElementTree library goes quite far in creating a simple to use library for creating and modifying such structures. I’d like to go a step further, building on top of ElementTree:

from magictree import html, head, title, body, h1, p
doc = html(
        head(
          title('Chapter 1: Greeting')),
        body(
          h1('Chapter 1: Greeting'),
          p('Hello, world!')))

from xml.etree import ElementTree as et
et.dump(doc)

Results in this: (added some whitespace for formatting)

<html>
  <head>
    <title>Chapter 1: Greeting</title>
  </head>
  <body>
    <h1>Chapter 1: Greeting</h1>
    <p>Hello, world!</p>
  </body>
</html>

This works by replacing this module with a wrapper object in sys.modules that creates factory functions for elements based on their name.

I used this page as a basis for the hack: http://stackoverflow.com/questions/2447353/getattr-on-a-module

Release History

Release History

1.0.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
magictree-1.0.0.win32.exe (65.2 kB) Copy SHA256 Checksum SHA256 any Windows Installer Jul 6, 2011
magictree-1.0.0.zip (3.8 kB) Copy SHA256 Checksum SHA256 Source Jul 6, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting