Skip to content

Instantly share code, notes, and snippets.

@jsbain
Created June 7, 2016 15:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsbain/045ec1b9a953e52778ca206bcc7c2898 to your computer and use it in GitHub Desktop.
Save jsbain/045ec1b9a953e52778ca206bcc7c2898 to your computer and use it in GitHub Desktop.
savehistory.py
from objc_util import UIApplication
with open('history.py','r') as f:
UIApplication.sharedApplication().keyWindow().rootViewController().accessoryViewController().consoleViewController().history= f.readlines()
from objc_util import UIApplication
with open('history.py','a') as f:
f.write( '\n'.join([str(h) for h in UIApplication.sharedApplication().keyWindow().rootViewController().accessoryViewController().consoleViewController().history()])+'\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment