Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add clint for better args handling

  • Loading branch information...
commit ae0afd2b804f4f6cc4a863c01bee0ad24dd99412 1 parent df84528
Stefano Parmesan authored
Showing with 6 additions and 3 deletions.
  1. +3 −3 examples/upload.py
  2. +3 −0  requirements.txt
View
6 examples/upload.py
@@ -2,12 +2,12 @@
""" Upload a file specified by command line
"""
-import sys
+from clint import args
from dropbox_uploader import Uploader
uploader = Uploader(config='myconf')
-if '--authorize' in sys.argv:
+if '--authorize' in args:
from getpass import getpass
username = raw_input('username>>> ')
@@ -17,7 +17,7 @@
"to allow future calls: ('{0}', '{1}')".format(token.key, token.secret)
exit(0)
-for fname in sys.argv[1:]:
+for fname in args.files:
try:
print "Uploading {0}...".format(fname),
print "Done" if uploader.upload(fname) else "Failed"
View
3  requirements.txt
@@ -3,3 +3,6 @@ dropbox==1.5.1
requests==0.14.2
lxml==3.0.1
pyquery==1.2.2
+
+# to run the examples:
+clint2==0.3.2
Please sign in to comment.
Something went wrong with that request. Please try again.