• @struct_engr_ , I think the problem is that for the past 6 months or so, no emails from this forum get actually sent. Neither the password resets or other notifications. @omz, any chance you could take a look?

  • The question is a little different, since he already has written to the console, and NOW wants to save it. Technically this can be done in 3 lines, so qualifies for ccc's ten lines or less....
    though i broke up the long string of method calls onto multiple lines to keep some semblance of readability.

    This is my save_session script which appends to a command history file ( making it easier to convert an interactive session into a real script), and writes the current console output to a new file. Feel free to adapt to your own needs.

    from objc_util import UIApplication from time import ctime # save history with open('history.py','a') as f: f.write(ctime()+'\n') f.write( '\n'.join([str(h) for h in UIApplication.sharedApplication().keyWindow(). rootViewController().accessoryViewController(). consoleViewController().history() ])+'\n') #save console output with open('console_history.txt','w') as f: f.write(ctime()+'\n') f.write(str( UIApplication.sharedApplication(). keyWindow().rootViewController(). accessoryViewController().consoleViewController(). consoleOutputTextView().text() ))
  • https://github.com/jsbain/objc_hacks with a "c" on the objc

  • @Tizzy that's a question for someone else. I have no idea.

  • Unless 1.6 works differently with flex at runtime, there seems to be a problem. I am setting a scrollview's flex to 'WH' in code. What worked in 1.5, does not work now. I had to set the frame explicitly. I tried a few things to get flex working, but it did not work.

    Setting the flex attribute of a top-level view (i.e. one that you call present() on) doesn't have any effect, and it never had. The size of a view that is presented in 'sheet' style used to be fixed in 1.5 (regardless of what you set as flex, it would be something around 540x500), and in 1.6, it reflects the size of the view's frame/bounds.

    I'm aware that this may require minor code changes in some cases, but I don't see any way around that, without giving up the flexibility of having differently-sized sheets, which I find very useful.

    I cannot see a place to change the console font. Not sure if I can't find it or you have not got around to it yet.

    Didn't get to that yet. If you want a bigger font, you can use console.set_font for now:

    console.set_font('Menlo', 20)
Internal error.

Oops! Looks like something went wrong!