#1
  1. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13

    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.
    e.g:
    Code:
        def safetext(self, data): 
            dl = list(data)
            for index, value in enumerate(dl): 
                if ord(value)>128: 
                    dl[index] = "&#%3d;"%(ord(value), )
                    print dl[index], 
            return ''.join(dl)
    Get it here.

    The above code-block including the colours was produced using the GUI module that comes with it. (Using the py2html_forum_code.style file)

    Grim.
    Last edited by Grim Archon; March 8th, 2004 at 10:17 AM.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    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,

    Mark
    programming language development: www.netytan.com Hula

  4. #3
  5. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    As a quick howto:
    1. Select py2html_forum_code.style
    2. Uncheck replace < > &
    3. Check replace spaces and newlines
    4. Copy the code into the top box
    5. Click Make Block
    6. Click Copy to Clipboard
    7. 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!
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    217
    Rep Power
    0
    This is awesome! It will be extremely useful when I place code on my website. Keep it up Grim!
  8. #5
  9. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13

    New update to PY2HTML


    This release is mainly about user interface changes and convenience features.
    py2htmlTk.pyw 0.65:
    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

    py2html.py 0.62:
    • 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!
    Grim
    Last edited by Grim Archon; March 15th, 2004 at 04:20 AM.
  10. #6
  11. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    103
    Rep Power
    11
    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?!?!?
  12. #7
  13. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    Originally Posted by Boceifus
    Bo,
    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

IMN logo majestic logo threadwatch logo seochat tools logo