March 8th, 2004, 10:26 AM
Update to py2html
My syntax highlighting module has been updated. A number of features added, a few bugs removed. Supports external style files so you can do code markups in most situations.
Get it here.
def safetext(self, data):
dl = list(data)
for index, value in enumerate(dl):
dl[index] = "&#%3d;"%(ord(value), )
The above code-block including the colours was produced using the GUI module that comes with it. (Using the py2html_forum_code.style file)
Last edited by Grim Archon; March 8th, 2004 at 11:17 AM.
March 8th, 2004, 11:06 AM
Very nice work Grim! i'm planning to use it whenever i post any major code in the forum where syntax highlighting is just a must!
A godsend, keep it up,
March 8th, 2004, 06:55 PM
As a quick howto:
- Select py2html_forum_code.style
- Uncheck replace < > &
- Check replace spaces and newlines
- Copy the code into the top box
- Click Make Block
- Click Copy to Clipboard
- Paste into DevShed dialog
Note: If you forget to uncheck replace <> & then you get wrong characers in your text.
If you don't like the default IDLE colours, of course you can manually edit the style file to do other colours. Just save it with a .style extension and then the GUI can use it.
To find out more click the help button or use pydoc and help to review py2html.
NOTE: Version 0.61 is the one to use for this!
March 8th, 2004, 07:15 PM
This is awesome! It will be extremely useful when I place code on my website. Keep it up Grim!
March 15th, 2004, 05:17 AM
New update to PY2HTML
This release is mainly about user interface changes and convenience features.
I have updated the GUI for py2html - hopefully it is easier on the eye and generally more usable :
- Menus for file operations, program configuration and help
- Program configuration can be modified, saved, loaded and defaults set.
- Edit and Save contents of Output (e.g. change the Markup, Style file or page template)
- Moved configurable items to a new dialog
- Customisable look
- Extended entity replacement options.
- Minor bug fixed for multi-newline replacement.
py2html 0.62 is available here!
I have realised (and it's been pointed out a number of times!) that this project has extended beyond HTML and is now much more general. As a result I am moving on to a new version to handle other languages and offer even more flexibility. This is probably the last version of py2html (assuming major bugs are not found).
I hope you find it useful!
Last edited by Grim Archon; March 15th, 2004 at 05:20 AM.
March 15th, 2004, 09:28 PM
nice job Grim!
as a token of appreciation,the first round is on me...
Now thats a beer!
It is not important if the glass is half full or half empty.What is important,is who has been drinking from MY glass?!?!?
March 16th, 2004, 02:21 AM
Originally Posted by Boceifus
I'm glad you like it, if I missed anything out let me know!
Cheers, that was refreshing. And you knew my favourite brand too