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

Wempy is a command line tool for parsing embedded python (similar to Ruby’s erb). Wempy’s syntax is pure python with 3 very important differences:

  1. There is no need for indentation
  2. The python keyword ‘pass’ must be used to indicate the end of some satements, blocks, and loops (like if/else, Try/Except, for or while ) depending on context
  3. ‘extend’ and ‘include’ are special keywords used to make templates (which can inherit)

Example

% wempy <<-EOF

{{first_name = 'Tyler'}}

{{last_name = 'Durden'}}

Hello Mr. {{=last_name}} or shall I call you {{=first_name}} instead?

EOF

This generates the following output:

Hello Mr.  Durden  or shall I call you  Tyler  instead?

You can see the python script that is generated & executed by using the -x flag.

% wempy -x <<-EOF

{{first_name = 'Tyler'}}

{{last_name = 'Durden'}}

Hello Mr. {{=last_name}} or shall I call you {{=first_name}} instead?

EOF

Which prints out:

import sys

sys.stdout.write('    ')

first_name = 'Tyler'

sys.stdout.write('\n    ')

last_name = 'Durden'

sys.stdout.write('\n    Hello Mr. ')

sys.stdout.write(last_name)

sys.stdout.write(' or shall I call you ')

sys.stdout.write(first_name)

sys.stdout.write(' instead?\n')

wempy.py shows how to use the wemplate library. But here’s a quick rundown:

>> import wemplate.wemplate

>> text="Hello {{=planet}} !"

>> parser = wemplate.wemplate.TemplateParser(text)

>>

>> print parser.render(planet="World")       #print the rendered template

'Hello World !'

Origin

Wempy is taken directly from Web2py’s template engine. We’ve removed some things like the gluon integration wrapper functions, the response object, and HTML/XML escaping.

The name stands for (W)eb2py’s (Em)bedded (Py)thon

Documentation

There isn’t any for wempy (yet). To understand the caveats of the engine take a look at the Views Basic Syntax section of the web2py manual

I’ll be working on Wempy specific documentation shortly

License

As Web2py is licensed under the LGPL v3 so too is Wempy

Home

More information will soon be available at http://www.wempy.org

Release History

Release History

0.1.5

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

0.1.4

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

0.1.3

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

0.1.2

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

0.1.1

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

0.1

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
wempy-0.1.5.tar.gz (13.5 kB) Copy SHA256 Checksum SHA256 Source Nov 26, 2012

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