Created
June 7, 2016 15:59
-
-
Save jsbain/045ec1b9a953e52778ca206bcc7c2898 to your computer and use it in GitHub Desktop.
savehistory.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from objc_util import UIApplication | |
with open('history.py','r') as f: | |
UIApplication.sharedApplication().keyWindow().rootViewController().accessoryViewController().consoleViewController().history= f.readlines() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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