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] get a list of themes

    Pythonista
    editor share theme
    1
    2
    2627
    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

      This is a little pathetic in a way. But I did not take advantage of the themes dict already defined in the editor.py before. I have a static text item stored as a snippet for the theme names.

      I was just looking at editor.py for something else, then realised I can get a list of themes from the editor module.

      Anyway, it's simple. Here it is.

      import editor
      theme_list = list(editor.theme_filenames.keys())
      print(theme_list)
      
      1 Reply Last reply Reply Quote 0
      • Phuket2
        Phuket2 last edited by

        Well, I guess the bigger issue here is that it's worth reading though the modules that @omz has provided in Python. Some other useful stuff can be found.

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