svn - Trying To Download Subversion Code with Python's urllib2 module = Fail -


i trying download code subversion repository without using svn subversion program. using python's urllib2 module instead. below script. problem script returns web page of sorts , not actual source-code. can see links source-code not actual source-code.

does have suggestions on how can download actual source-code subversion urllib2?

#! /usr/bin/env python  import urllib2   def sub():     theurl = 'https://intranet-server/svn/fancysoftware/trunk/'     username = 'username'     password = 'password'      passman = urllib2.httppasswordmgrwithdefaultrealm()      passman.add_password(none, theurl, username, password)      authhandler = urllib2.httpbasicauthhandler(passman)      opener = urllib2.build_opener(authhandler)     print "opener :", opener      urllib2.install_opener(opener)      pagehandle = urllib2.urlopen(theurl)     print "pagehandle :", pagehandle     return pagehandle   if __name__ == "__main__":     ret = sub()     line in ret:          print line  


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -