omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    [Share] Python Source Code Display Class

    Pythonista
    source share
    2
    3
    2450
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Phuket2
      Phuket2 last edited by

      I wrote this class a long time ago with some help from @JonB and maybe others. I tried to clean it up a little today. All it does is display Python source code, formatted in various styles. It can also hilite lines that contain a word. I am not trying to do anything tricky like using re etc.
      This could be modified/extended a lot from what I have done. It's lacking in many ways, but still is a good starter if you need to show formatted source code in your app.
      Anyway, it maybe useful to someone.

      1 Reply Last reply Reply Quote 1
      • technoway
        technoway last edited by

        Cool program. Thanks for sharing it.

        Phuket2 1 Reply Last reply Reply Quote 0
        • Phuket2
          Phuket2 @technoway last edited by

          @technoway , thanks. I know it has limited value. I use it for part of a basic in file search program I made. The search program is basic, just searches for a word in all my files, I present a list of file names in a ui.TableView. Then if I want to look into a file, I bring up this viewer , to see if it what I was looking for. So for that purpose its good for me. I wanted to update the search program, so I separated this out first. It was a bit of a mess :)

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors