(conn, module, remotepath = None, chunk_size = 16000)
uploads a module or a package to the remote party
    
    :param conn: the RPyC connection to use
    :param module: the local module/package object to upload
    :param remotepath: the remote path (if ``None``, will default to the 
                       remote system's python library (as reported by 
                       ``distutils``)
    :param chunk_size: the IO chunk size
    
    .. note:: ``upload_module`` is just an alias to ``upload_package``
    
    example::
    
       import foo.bar
       ...
       rpyc.classic.upload_package(conn, foo.bar)
uploads a module or a package to the remote party
    
    :param conn: the RPyC connection to use
    :param module: the local module/package object to upload
    :param remotepath: the remote path (if ``None``, will default to the 
                       remote system's python library (as reported by 
                       ``distutils``)
    :param chunk_size: the IO chunk size
    
    .. note:: ``upload_module`` is just an alias to ``upload_package``
    
    example::
    
       import foo.bar
       ...
       rpyc.classic.upload_package(conn, foo.bar)
uploads a module or a package to the remote party : param conn : the RPyC connection to use : param module : the local module / package object to upload : param remotepath : the remote path ( if None will default to the remote system s python library ( as reported by distutils ) : param chunk_size : the IO chunk size .. note :: upload_module is just an alias to upload_package example :: import foo . bar ... rpyc . classic . upload_package ( conn foo . bar )
def upload_package(conn, module, remotepath = None, chunk_size = 16000):
    """
    uploads a module or a package to the remote party
    
    :param conn: the RPyC connection to use
    :param module: the local module/package object to upload
    :param remotepath: the remote path (if ``None``, will default to the 
                       remote system's python library (as reported by 
                       ``distutils``)
    :param chunk_size: the IO chunk size
    
    .. note:: ``upload_module`` is just an alias to ``upload_package``
    
    example::
    
       import foo.bar
       ...
       rpyc.classic.upload_package(conn, foo.bar)
    
    """
    if remotepath is None:
        site = conn.modules["distutils.sysconfig"].get_python_lib()
        remotepath = conn.modules.os.path.join(site, module.__name__)
    localpath = os.path.dirname(os.path.abspath(inspect.getsourcefile(module)))
    upload(conn, localpath, remotepath, chunk_size = chunk_size)
def upload_package ( conn , module , remotepath = None , chunk_size = 16000 ) : if remotepath is None : site = conn . modules [ "distutils.sysconfig" ] . get_python_lib ( ) remotepath = conn . modules . os . path . join ( site , module . __name__ ) localpath = os . path . dirname ( os . path . abspath ( inspect . getsourcefile ( module ) ) ) upload ( conn , localpath , remotepath , chunk_size = chunk_size )