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.


    [Tip]Pyui files, view as a string

    Pythonista
    1.6 tip pyui
    3
    5
    4264
    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 am not sure if this was always the case or not (I have a feeling it wasn't) But at least in 1.6 if you have a .pyui file and rename it to a .py file, you see the string/dict representation in the editor. If you rename it back it to a .pyui file, works as expected.
      Handy to know

      1 Reply Last reply Reply Quote 0
      • ywangd
        ywangd last edited by

        pyui files have always been plain JSON files. You can read them as any text files, open('myui.pyui').read(). It is the case in 1.5 as well.

        Phuket2 1 Reply Last reply Reply Quote 1
        • Phuket2
          Phuket2 @ywangd last edited by

          @ywangd, sure. I just didn't think you could rename a existing .pyui file to .py before and have it show up in the editor correct.could be wrong, but it's a time saver

          1 Reply Last reply Reply Quote 0
          • omz
            omz last edited by

            Yep, that's new in 1.6 (unless you were using a script to rename the file). Btw, you get slightly better syntax highlighting if you use .json instead of .py as the file extension.

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

              @omz, thanks. Nice to know. Is a nice feature. I know a small thing, but makes life easier

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