Forum Archive

Why ".pyui"?

lsloan117

I was wondering, if the contents of a .pyui file is JSON, why create a special extension for it? Many editors don't know how to handle files with this extension, but if they had a ".json" extension, they are handled well. I don't think Pythonista's UI module would have trouble with that extension, either.

Update: I see that Pythonista won't let me rename a .pyui file to .json. It changed my application and its UI file to "fubar.json.py" and "fubar.json.pyui". I guess my point is moot if Pythonista won't go along.

omz

Basically because you might have other .json files in your project, and the editor needs a way to distinguish them. The next version will allow you to rename .pyui files to .json, so you can choose to edit them as text if you like.

lsloan117

Oh, I see... The internal editor needs it to distinguish the type and to show the GUI editor.

Well, I'm glad that we'll have the choice of filename extension in the future.

Thanks!