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.


    How do I perform simple read/ write operations on a plain text file in Dropbox?

    Pythonista
    4
    5
    3562
    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.
    • Lioneldp213
      Lioneldp213 last edited by

      I have all the necessary access (app key, secret, full dropbox access) set up using the great scripts found on the forum - thank you - but the best I can accomplish is .read() - I would like to use .readline() - seems that the only way I can access the file is get_file('path').read() - beyond that I cannot use .readline() or for line in etc..

      I am a novice, and I do search for answers before asking, but this time I can't figure out what the logic of the whole thing is.

      Thanks in advance...

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

        try the following:

        theText = get_file('path').read()
        for theLine in theText.splitlines():
            print(theLine)
        
        1 Reply Last reply Reply Quote 0
        • bill.raynor
          bill.raynor last edited by

          That makes perfect sense on a desktop. What is the 'path' to a dropbox file? Does it need a URL with name and password?

          Along that line, what is the path to an editorial or goodreader or ios notes file?

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

            Have you had a look at Editorial's manual? You'll find the answers to your question there ;)

            Regarding the other applications you are mentioning take a peek at the respective documentation.

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

              https://gist.github.com/lioneldp/6761743

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