Forum Archive

Hi, New to python,pythonista and dropbox

boodo330

Hi,

I used the guide to connect dropbox and pythonista and I believe it was 100% successful, but I found it hard to translate a normal guide to import files like:
http://learnpythonthehardway.org/book/ex15.html

to an ipad app like Pythonista.

I tried this already to test it

Import dropbox
f = open 'filename.txt'
response = client.put_file('\filename.txt',f)     #< Error: No such file or directory. IOError
print "uploaded" ,response

Sorry in advance if the question seems dumb.

ccc

http://omz-software.com/pythonista/docs/ios/dropbox.html

My sense is that if you want to copy and existing file to another location then DropboxClient.file_copy(from_path, to_path) might be a better way to go. Or maybe I misunderstood what you were trying to do.

boodo330

Hi,

Thanks for the response. My question did sound confusing because I'm clueless. I'm going to use the link you sent me to try to modify files on dropbox using pythonistica.

JonB

I'll point out that presumably you initialized the client per the first section that ccc linked to?

Another stupid question .... Does filename.txt actually exist? Do an os.listdir('.') to find out!m I suspect your IOerror was on the previous line, not the put_file line....

boodo330

I have to go but I managed to get some good info by connecting clues in this thread.