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

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

Serving Software Downloads in 976 Categories, Downloaded 30.153.968 Times

PTML 0.4.0

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

PTML

Report Broken Link
Printer Friendly Version


Product Homepage
Download (18 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
PTML RELATED
Games  -  Baby Bird Bros. 1.16
Welcome to the exciting world of Baby Bird Bros! This bright and colorful epic game takes action-puzzles to the next level! Draw lines to connect magical eggs of the same color and match 2 or more of them. Sounds simple? You will be...
22.4 MB  
Entertainment  -  Linebreaker 1.0.0.0
Use your finger to divide a rectangle, but keep an eye on the balls. They maybe destroy your line, before it reaches the edges of the rectangle. Cut away 75% of the area on your screen to pass a level. Your lines get resetted in every level...
1024 KB  
Games  -  Gem Lines 2 1.2.0.0
Gem Lines 2 offers you two colourful themes and two sets of diamonds in just one game. Swap beautiful jewels to make horizontal or vertical lines. You can submit your new scores to the global leaderboards and filter the scores per play mode and...
7 MB  
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  
Sports  -  Cricket Lovers 1.0.0.0
The 19th century saw underarm bowling replaced by first roundarm and then overarm bowling. Both developments were controversial. Organisation of the game at county level led to the creation of the county clubs, starting with Sussex CCC in 1839,...
2 MB  
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...
 
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  -  KOpenBabel 0.2
KOpenBabel is a graphical interface to Open Babel.[1] KOpenBabel can handle and convert over 70 chemical file formats. At this time, it can convert files, guess input file type and convert a large number of files with a single click. The user...
20.48 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  -  DesktopTools 02-alpha
DesktopTools is a collection of small utillities which help to make your daily life easier. Since the tools themself are rather small (projectwise) I keep them not as individual projects, but have them under this collective name.
102.4 KB  
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  
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