If region active - use it content as default value.
--- a/pypi.el Thu Feb 19 19:30:32 2015 +0200
+++ b/pypi.el Thu Feb 19 19:40:37 2015 +0200
@@ -27,7 +27,10 @@
;;;###autoload
(defun pypi.pkg (pkg)
- (interactive (list (read-string "Python package: " "" 'pypi.pkg-history (thing-at-point 'symbol))))
+ (interactive (list
+ (read-string "Python package: "
+ (if (region-active-p) (buffer-substring (mark) (point)) (thing-at-point 'symbol))
+ 'pypi.pkg-history)))
(url-retrieve (format pypi.url pkg) #'pypi.pkg-callback))
(provide 'pypi)