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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -