[gpsbabel] Improve internal gpsbabel-download-latest.py docs
Hans Ulrich Niedermann
ndim at fedoraproject.org
Fri Jan 21 19:13:51 UTC 2011
commit ef82408ff71fba365abbb4bd62544c6dfb96c803
Author: Hans Ulrich Niedermann <hun at n-dimensional.de>
Date: Fri Jan 21 20:13:34 2011 +0100
Improve internal gpsbabel-download-latest.py docs
gpsbabel-download-latest.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gpsbabel-download-latest.py b/gpsbabel-download-latest.py
index 27e0774..f9965d3 100755
--- a/gpsbabel-download-latest.py
+++ b/gpsbabel-download-latest.py
@@ -1,4 +1,8 @@
#!/usr/bin/python
+#
+# Download the latest gpsbabel source tarball by simulating a browser
+# visit and a HTTP POST form submission (there is no other way to
+# download those files).
import re
import urllib2
@@ -37,6 +41,9 @@ token = d[u'token']
# print "tarball:", tarball
# print "token:", token
+# Python has no library functions which handle 'multipart/form-data'
+# encoding, and the pycurl interface is non-trivial, so we just run
+# the 'curl' program as a separate process.
cmd = [ 'curl',
'-F', "=".join(['dl', tarball]),
'-F', "=".join(['token', token]),
More information about the scm-commits
mailing list