Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.236.094 Times

PTML 0.4.0

Company: Niall Smart
Date Added: September 06, 2013  |  Visits: 404

PTML

Report Broken Link
Printer Friendly Version


Product Homepage
Download (35 downloads)



PTML is a Python module which lets you embed Python code in text documents. Its most common application is dynamic content generation on web servers, however it can be used anywhere you need to generate text files on-the-fly.<br /><br />The project is still at a very early stage, although the code should be usable enough for you to learn the syntax and experiment with possible applications. Future directions are briefly listed in the TODO file, suggestions and contributions are most welcome. <br /><br />PTML lets you embed Python?*A* code in text documents.<br /><br />The rules are very simple:<br /><br /> * text may contain expression fields starting with dollar sign and opening brace (${) and ending with closing brace (})<br /> * lines starting with percent sign (%) are Python code lines<br /> * line containing nothing but single percent sign ends Python structural block (decreases indent level)<br /> * starts Python code block. All lines until closing line are processed as Python code lines.<br /> * starts verbatim text block. PTML markup has no effect until closing line.<br /> * all other text of a template is copied to template output.<br /><br />Example template:<br /><br />%import time<br />Current time is ${time.ctime()}<br /><br /><br />SCORES = (<br /> ("St Stephan", 29.9),<br /> ("Richard III", 29.3),<br /> ("Jean D'arc", 29.1),<br /> ("Marat", 29.0),<br /> ("A. Lincoln (U.S of A)", 28.2),<br /> ("G. Khan", 28.1),<br /> ("King Edward VII", 3.1),<br />)<br /><br />You can see the scores now:<br /><br />%for name, score in SCORES:<br /> ${"%22s" % name} : ${score}<br />%<br /><br />Output produced by above template:<br /><br />Current time is Sat Dec 03 18:03:58 2005<br /><br />You can see the scores now:<br /><br /> St Stephan : 29.9<br /> Richard III : 29.3<br /> Jean D'arc : 29.1<br /> Marat : 29.0<br /> A. Lincoln (U.S of A) : 28.2<br /> G. Khan : 28.1<br /> King Edward VII : 3.1

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Block Brace Closing Edward Embed Level Lincoln Lines Ltpythongt Lttextgt Percent Python Quotst Scores Starting Starts Stephanquot Template Templateimport
Users rating: 0/10

License: Freeware Size: 40.96 KB
USER REVIEWS
More Reviews or Write Review


PTML RELATED
Programming  -  scount4ant 1.2
scount4ant is an ant task extension to count total lines,comment lines,blank lines and their percent in source code folder and save count result with via format.
24.8 KB  
Modules  -  Sliced Menu 1.0
It behaves like primary link with no level limitation.If a menu with four levels (depth) is sliced, four blocks will be available in the administer block section. Each block will contain a level of the chosen menu. If a menu item is selected, the...
 
Arcade Style Games  -  Free Pentix 1.0
If you want to play a good free arcade game - you've chosen the right one. It's a real must-have game for the fans of classic tetris. A nice old classic tetris gained new appearance. Make your choice between different skill levels and enjoy this...
399 KB  
Libraries  -  Vision Egg 1.0
Vision Egg project is a high level interface between Python and OpenGL. In addition to methods for automatic generation of traditional visual stimuli such as sinusoidal gratings and random dot patterns, it has a number of functions for moving...
1024 KB  
Multimedia & Graphics  -  iXBlock 2.1.3
Replace blocks/objects in AutoCAD and Bricscad. With iXBlock you can replace blocks with a block or any objects with any object (lines with a text, circles with a block, etc.) and properties can be retained from the blocks/objects that are to be...
2.96 MB  
Modules  -  Local Menu 1.0
This module adds a block that will show a local menu in the context of the page you're at. It let's you specify the depth to start rendering at and the number of levels to render in total. The menu title will be the parent item of the first level...
 
Programming  -  Pyrex 0.9.4.1
Pyrex is a Language for Writing Python Extension Modules. Pyrex is a language specially designed for writing Python extension modules. Its designed to bridge the gap between the nice, high-level, easy-to-use world of Python and the messy,...
174.08 KB  
Libraries  -  libarena 0.3.4
libarena library is a custom memory allocator interface and implementation. Three allocators are provided: flat "LIFO" arena allocator, object pool allocator and a malloc(3) wrapper. These can be used directly, or through their exported prototype...
20.48 KB  
Modules  -  Pay2Publish 5.x- 1.0
Set up different "Levels" with different costs and properties (Silver, Gold, Platinum style). Each level will have its corresponding taxonomy (category) term.To upgrade a node, the user will have to buy the desired "Level" and assign it to one of...
 
Modules  -  Pay2Publish 5.x- 1.0
Set up different "Levels" with different costs and properties (Silver, Gold, Platinum style). Each level will have its corresponding taxonomy (category) term.To upgrade a node, the user will have to buy the desired "Level" and assign it to one of...
 
NEW DOWNLOADS IN SHELL & DESKTOP, TEXT EDITORS
Shell & Desktop  -  Glunarclock 0.32.4
GNOME Lunar Clock Applet displays the current phase of the Moon as an applet for the gnome panel. In the properties box you can choose between a real image Features Pointing with the mouse at the applet...
522.24 KB  
Shell & Desktop  -  Fekete 5
Icon theme for Linux For all possible desktop, and Linux distro Special additives: Suse's Yast icons. Xfce system icons, and archaic mimetypes icons Mandriva "special placed" status icons. Libreoffice icons.
71.59 MB  
Shell & Desktop  -  XFast 0.9
XFast is a slim and lightweighted desktop environment that incorporates X and Window Manager within the same project.
1.15 MB  
Shell & Desktop  -  print selection konqueror service menu 0.1
This service menu give you a *silly* way to print fast your selection on konqueror USE select the text copy the text rigt button on the webpage select print selection a kdialog will appear paste the text
10.24 KB  
Shell & Desktop  -  Faenza 1.2
Faenza icon theme is available to install for Ubuntu users via a PPA repository. View the README file for instructions and a list of known issues.
23.49 MB  
Text Editors  -  DocBook Doclet 6.0.3
DocBook Doclet (dbdoclet) creates DocBook XML and class diagrams from Javadoc comments, converts HTML to DocBook, and transfoms DocBook XML into various output formats. It consists of a complete DocBook distribution containing schemas and the...
57.64 MB  
Text Editors  -  text-hr 0.17
text-hr is Morphological/Inflection Engine for Croatian language written in Python programming language. Includes stopwords and Part-Of-Speech tagging engine (POS tagging) based on inverse inflection algorithm for detection. Since API...
112.64 KB  
Text Editors  -  SeaScope 0.4
A pyQt GUI front-end for cscope. Written in python using pyQt, QScintilla libraries. Features: * Search features o cscope search features o Call tree for functions o Call tree for symbols ...
10.24 KB  
Text Editors  -  Val(a)IDE 0.7.1
Val(a)IDE is an IDE (Integrated Development Environment) application for the Vala programming language. Here are some key features of "Val(a)IDE": ?*A* Syntax highlighting for Vala ?*A* Project compilation
1.52 MB  
Text Editors  -  greyd 1.0
greyd is a transparent Greylist proxy for the purpose of rejecting spam send by spambot armies. The first generation of code which has been running in production for about 3 months has greatly reduced the amount of spam that needs to be processed...
10.24 KB