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.


    Hi, New to python,pythonista and dropbox

    Pythonista
    3
    5
    2656
    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.
    • boodo330
      boodo330 last edited by

      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.

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

        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.

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

          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.

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

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

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

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

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