Forum Archive

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

Lioneldp213

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...

ccc

try the following:

theText = get_file('path').read()
for theLine in theText.splitlines():
    print(theLine)
bill.raynor

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?

Stefano

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.

ccc

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