#NEWLINE# def sendFileWithURL( self , url , name = '' ) : #NEWLINE# #INDENT# 'Send a File with given File url\n\n        :param url: File url to send\n        ' #NEWLINE# from urlparse import urlparse #NEWLINE# from os.path import basename #NEWLINE# import urllib2 #NEWLINE# if ( name == '' ) : #NEWLINE# #INDENT# name = basename ( urlparse ( url ) . path ) #NEWLINE# #UNINDENT# file = urllib2 . urlopen ( url ) #NEWLINE# output = open ( 'pythonLine.data' , 'wb' ) #NEWLINE# output . write ( file . read ( ) ) #NEWLINE# output . close ( ) #NEWLINE# try : #NEWLINE# #INDENT# self . sendFile ( 'pythonLine.data' , name ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise e