Forum Archive

Mazecraze game updated to use new ui.

Gcarver166

I've updated my MazeCraze game to use the new ui system for it's options menu. Much much cleaner.

https://gist.github.com/GuyCarver/4000630

dgelessus

FYI, the script doesn't work for multiple reasons. First of all, a number of special characters (quotes, <, >, &) got converted into HTML entities (&lt; ...) which are not valid in Python. Even after replacing these the script won't run, because we need the .pyui file as well ;)

omz

I think it might be time to build a new Gist importer script that can handle .pyui files properly...

Dann239

If you are using the Dropbox sync script and Readdle Docs you can just download the Gyst zip open in Docs and move the files to your folder.

Oscar

In gistcheck.py, I tried this in the download_gist function:

    #if lang != 'Python': <= trying to replace this check
    filename = file_info['filename']
    if os.path.splitext(filename)[1] not in ['.py', '.pyui']:
        continue

But the .pyui files are created as .pyui.py files with the editor.make_new_file() function. So that didn't work.

Anyone got any suggestions how to easily download gists with more than .py-files?

Gcarver166

In addition to the above, I also changed file creation in gistcheck.py and that correctly made the .pyui file.
It'd be best if it only wrote .pyui files but it was just a test.

   #replacing with direct file write.
   #editor.make_new_file(filename, content)
   f = open(filename, 'w')
   f.write(content)
   f.close()
LawAbidingCactus

How do I import the .pyui file into Pythonista?

LawAbidingCactus

Any chance this could be updated to use the packui application?

JonB

Just use a recent version of gistcheck
https://gist.github.com/jsbain/1c95b3491d65d9e24456