• Westacular129

    I'm really impressed paramiko was added in the 1.3 update. That's awesome.

    However, I'm having some trouble getting it working.

    Specifically: calling the 'connect()' method on a SSHClient object is crashing Pythonista.

    Sample code:

    import paramiko
    client = paramiko.SSHClient()
    print 'Client instance created'
    client.load_host_keys("known_hosts")
    print 'Host keys loaded'
    client.connect(hostname="mylocalhost", username="myname", password="mypassword")
    print 'Connection opened'

    Running this outputs the first two print statements then Pythonista crashes. I've tried with and without using a private key instead of a password, and with a couple different hosts. The hosts I'm trying to connect to are listed in the known_hosts file.

    Anyone have any insights? Is paramiko working for other people?

    (For the record, this is on both an iPad 3 and iPhone 4, both running iOS 6.1.2)

    posted in Pythonista read more
  • Westacular129

    Thanks for the assistance here. I was able to get things working.

    One other issue, however, is how slow it is to connect using public key authentication. I did some searching, and found http://stackoverflow.com/questions/10588535/slow-public-key-authentication-with-paramiko and I can confirm that the key length is the issue: with a 1024-bit key, authentication takes a fraction of a second. A 2048-bit key takes 50 seconds (on my iPad 3).

    (Helpful tip: Calling
    <code>paramiko.common.logging.basicConfig(level=paramiko.common.DEBUG)</code>
    enables verbose output analogous to ssh -vv)

    posted in Pythonista read more
  • Westacular129

    In the meantime... It would be kinda hackish (unless you're already using an HTML front-end for your Python app) but you could access it by creating a web server to serve a page that uses the HTML5 geolocation API, and then opening a browser to it.

    posted in Pythonista read more
  • Westacular129

    I think the more likely use case is to prevent downloading from Dropbox.

    For example: you could have a Pythonista folder in your Dropbox, managed on your desktop using git, and have it (almost) automatically synced to your devices via Dropbox and this script. But there's no need to download the hidden .git files/folders, as they'd serve no purpose within Pythonista... so it would be nice to be able to set parameters in the script telling it to ignore them and not download them.

    posted in Pythonista read more
  • Westacular129

    I combined meu's script for pulling from/committing to gists with C0deH4cker's version of the gist downloading script, so that newly downloaded gists automatically have their IDs set, for future pulling/committing.

    It's posted at:
    https://gist.github.com/4145515

    Details on using it are largely the same as it was for the two scripts it's based on, however some filenames are changed to make it look nicer. See the comment at the top of the source file for more details. (To use this script's version of Download Gist.py, you should delete any existing file with that exact name before running my script, which will then set up the replacement.)

    posted in Pythonista read more
  • Westacular129

    That module hasn't been updated in over 3 years. At some point since then, the markdown module's extensions API was changed to use markdown.postprocessors.Postprocessor. (No idea what other problems that markdown2latex module might have, but I wouldn't be surprised if there's more.)

    posted in Pythonista read more
  • Westacular129

    One thing I'd love to see added would be an SSH module (such as paramiko), which would open up some exciting possibilities for customized remote management scripts. (And also allow people to replace FTP with SFTP in their scripts.)

    My understanding is that paramiko is pure python, but it relies on pycrypto to do the heavy lifting; I'm not sure how feasible it might be to compile that for iOS, but if it's possible, that would be amazing.

    Thanks for all the great work!

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!