I would like to get python2.7 code to update txt file in dropbox server...
To upload files using the Dropbox API from Python, we recommend using the official Dropbox API v2 Python SDK:
https://github.com/dropbox/dropbox-sdk-python
You can find an example of uploading files using it here:
https://github.com/dropbox/dropbox-sdk-python/blob/master/example/updown.py#L181