omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    syncing Pythonista / laptop

    Pythonista
    3
    5
    5661
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • reticulated
      reticulated last edited by

      Hey everyone,

      I've seen a few methods here in the forums for keeping things in-sync between the phone and "other" device.

      I am wondering if anyone has hacked a way to make it work effectively?

      I've tried:

      WebIDE - closest I have to a working solution, except as good as CodeMirror is, it can't compete with PyCharm.

      I made some changes to it so I can optionally run the script in question using threading and runpy.

      If I spend more time on it I am sure I can make it a bit closer

      *sync -

      Many sync programs, even a simple ssh sync one I wrote to work with my macbook, but requires an extra step to work.

      I have a comfortable structure on my laptop, and messy symbolic links relying on a cloud provider like dropbox isn't solid

      git -

      Same problem as above, and its super annoying to to do commits before you are ready, and it clogs your history, not great if you want to preserve the history for an open source app (which is my plan)

      The biggest issues:

      test driven development is difficult with any of the above scenarios - the WebIDE concept could work if I either write a plugin (not a java guy).. or

      The fact that the ios libs are not available on the laptop.

      Using the pythonista kit - not until Python 3 is ready, I am personally moving away from using Python 2 even if it is faster, or just as capable.

      Taking a note from PyCharm's ability to run remote interpreters - this would be ideal!

      I am just not sure how I can go about it, since Pythonista doesn't offer a real pty, using ipython to embed isn't possible.

      Does anyone have better thoughts? or had anyone hacked a working remote interpreter?

      Okay, rant over, but if anyone has found a working solution please let me know.

      The full keyboard and better screen real estate, atop an IDE which I have become accustomed, would make my life way easier.

      For instance - as I am developing the aforementioned modal class, I had to test numerous ideas on maintaining the current UI state, moving code around on the phone is more cumbersome.

      Either way- any tips/tricks would be grand!

      1 Reply Last reply Reply Quote 0
      • shaun-h
        shaun-h last edited by

        I really don't do any Python development off my iPad or iPhone really as most of the things I work on require the UI module in Pythonista. I thought I would share how I keep sync'd up.

        I use git, if you are worried about commit history you could try developing on separate branch (which also has other benefits), and then submitting a pull request if you are using GitHub and squash all your commits when you are ready to merge it back in to your main branch (not that I do this but I am pretty sure it is possible).

        If you have Working Copy and the new Beta of Pythonista this allows for opening from external files which makes using Working Copy a lot easier now otherwise there are scripts that help interact with working copy if you don't.

        This is how I keep things sync'd up anyway, it doesn't really help with having a remote interpreter though.

        reticulated 1 Reply Last reply Reply Quote 0
        • reticulated
          reticulated @shaun-h last edited by

          @shaun-h

          I will try working copy, I wish i saw it before buying Clone which as of this writing doesn't work with local files.

          I am not on the beta yet either.

          Its food for thought - I won't squash my commits because that is a lot of work, as my intention is to ensure have a clear history for the project.

          Thanks though- Working Copy might just be what I need, at least it avoids the stash client.

          Maybe ill just keep the ftpd up on my phone while developing and script it to sync often.

          1 Reply Last reply Reply Quote 0
          • shaun-h
            shaun-h last edited by

            If you haven't seen this it is Pythonista interacting with working copy in the new beta.

            1 Reply Last reply Reply Quote 0
            • Amegon
              Amegon last edited by

              I also took another approach: write a socket program, define some bytes to request files, checksums etc. something to send files, to receive files, and run the script on pc and pythonista device. add a dict to store timestamp and md5 +pickle to save to file.

              This way I ‚sync‘ files between iphone and Pc and can work on both.
              Only important thing: whenever you change code, run a sync before changing it on the other device as well. If both timestamps differ and md5 differs then sync creates a file version of your own and one of the remote file.

              Then just add that folder on your pc to your preferred version control and do the backup/committa there.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB Forums | Contributors