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.


    Reading and editing dropbox files?

    Pythonista
    5
    9
    10177
    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.
    • Sandbo
      Sandbo last edited by

      Hello, I just bought Pythonista and I am very happy to see my codes (mainly numerical computation) runs pretty well on it.
      However, as I am editing the files over different locations, which I have been using Dropbox to store them for synchronization,
      I couldn't find the option in the interface, may I know if it has been implemented?

      If not yet, would there be any chances it would be? Many thanks.

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

        The Dropbox module built into Pythonista will enable your Python script to directly read and write Dropbox files.

        Dropbox File Picker and/or DropboxSync might also be of interest... https://github.com/Pythonista-Tools/Pythonista-Tools/blob/master/Utilities.md

        1 Reply Last reply Reply Quote 1
        • jedamus
          jedamus last edited by

          I also want to use Dropbox for file transfers. I have written a short program to do so, but it would be better to be integrated into Pythonista.

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

            New Python and Pythonista user here.

            Actually Dropbox sync of scripts and assets is also one thing I am missing a lot. For one it would be useful to share scripts between iOS devices (iPad, iPhone). I also have some scripts ready on my mac and would like to share them with Pythonista.

            Acess through iTunes would be the second best solution btw.

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

              @rom That isn't possible sadly. Apple has relatively strict guidelines against downloading executable code, and Dropbox, iCloud Drive or iTunes sync for Python code are all not allowed. There were some issues in the past where omz had to push an update early to comply with Apple's request to remove "open in" support (i. e. allowing you to copy files into Pythonista from another app).

              rom 1 Reply Last reply Reply Quote 1
              • rom
                rom @jedamus last edited by

                @jedamus said:

                I also want to use Dropbox for file transfers. I have written a short program to do so, but it would be better to be integrated into Pythonista.

                Do you think you could share your soltuion for dropbox sync of folders?

                1 Reply Last reply Reply Quote 0
                • rom
                  rom @dgelessus last edited by

                  @dgelessus

                  Oh my. So stupid. Thanks for the clarification.

                  No soup for Pythonistas 😆

                  How do you guys deal with that?

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

                    @rom To get files into Pythonista, you can use the share extension and run something like this:

                    import appex
                    import os
                    import shutil
                    
                    shutil.copy(appex.get_file_path(), os.path.expanduser("~/Documents/destination_filename"))
                    

                    So if I want to get something from my Mac onto Pythonista, I copy it into iCloud Drive, then share it on my iPad from the iCloud Drive app with the Pythonista share extension.

                    rom 1 Reply Last reply Reply Quote 2
                    • rom
                      rom @dgelessus last edited by

                      @dgelessus Thanks. That's a simple and neat solution.

                      I'm stil trying to get my head around what's possible with the custom ios modules provided by Pythonista. Therefore solutions for problems like this aren't obvious to me yet.

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