• Sweet! I'll try that - thanks!

  • btw, it is always possible to inject javascript into the top page of a document using eval_js, this does not violate any cross site scripting. But, that javascript runs at the level of the domain of the main document, and cannot access iframes outside of that domain. But you can easily get the source of the currently loaded top level document.

  • @jadeblaquiere said:

    AES is available out of the box, see example usage below.

    Thanks you so much! I had no idea the Crypto module was included - I didn't see any documentation for it.... (though I probably should've checked site-packages)

  • No, as far as I know, this bug has only been in the 1.6 beta.

  • @omz Thank you for your Vibrate module.
    The process went successfully when done according to your instructions.
    At a time such as when you are on the phone and the alarm goes off, can it vibrate for a long time?
    Objective-C seems to write in this way.

  • That'd be cool, maybe possible with objc_util

  • oh i see...

    >>> '.' in sys.path False

    but the "played" path does get put on top, both for Play button and editor actions.
    execfile does not do this, though i guess we were already responsible for setting path using execfile, at least indirectly through chdir.

    Editor actions are a little surprising, in that they change sys.path globally. I have not tried this yet, but might that cause unintended consequences for running programs? I.e if there is some dynamic import, running a wrench item would cause that import to break.

    I guess the point is, scripts should add their own import folder to sys.path, if they want to be guaranteed to be able to import from that folder later.

  • I had the same issue. Workaround worked.

  • A deadlock basically. Only happened the second time because it occurred when the table view was deleted from memory.

  • Yup! - this is exactly what I was looking for - concurrent network requests. I implemented it without callbacks, rather did it procedurally - after the request returned I passed the data to a different (new) method in the Worker class.

    def run(self): data = requests.get(self.url).text results[self.key] = self.parse(data) def parse(self, responseText): #stuff here return stuff
  • Someone who's got Python chops and is in the Beta should make an extension script. I've tried but my coding chops aren't there yet...

  • For some unknown reason the account was suspended, so it's dead for now.

  • Good to hear that you're doing well. :)

  • Turns out I was having an issue backreferencing an empty group - see http://bugs.python.org/issue1519638 - so even though re.findall was returning 5 groups - I wasn't able to use re.sub to match/replace all the groups.

    EDIT: I ended up using this workaround - adding an empty sub-group

  • @JonB - I just realized that you were giving me a solution for the opposite problem - I wasn't clear, my bad. I want for them to get the 2FA token so that they can login to their account. So implementing my own Google Authenticator app isn't a great solution because then I would have to store their secret in order to generate the token each time - and that's way too scary for me.

  • @omz I have a similar problem I think. This works fine the first time it's run. However the second time through... the second script hangs the ui when it's run.


    import ui, console, editor class Test (ui.View): def __init__(self): tv = ui.TableView() tv.frame = self.bounds tv.flex = 'WH' ds = ui.ListDataSource(['foo','bar','baz']) ds.action = self.item_selected tv.data_source = ds tv.delegate = ds self.tableview = tv self.add_subview(self.tableview) @ui.in_background def item_selected(self,sender): #console.alert('Test') self.close() editor.open_file('Test2') Test().present('popover')


    import console console.alert('Test2')
  • Just for posterity sake and closure for this question, Ole's response via twitter:
    first and second.
    Basically, the only way currently is using print statements and/or the pdb module (standard library).

  • Awesome! It works! Thanks so much! Now I have to work on parsing and importing it into the keychain.

Internal error.

Oops! Looks like something went wrong!