def clip_f( self, parameter_s = '' ):

    import win32clipboard as cl
    import win32con
    args = parameter_s.split()
    cl.OpenClipboard()
    if len( args ) == 0:
        data = cl.GetClipboardData( win32con.CF_TEXT )
        cl.CloseClipboard()
        return data
    api = self.getapi()
    
    if parameter_s.lstrip().startswith('='):
        rest = parameter_s[parameter_s.index('=')+1:].strip()
        val = str(api.ev(rest))
    else:
        ranges = args[0:]
        val = ''.join( self.extract_input_slices( ranges ) )

    cl.EmptyClipboard()
    cl.SetClipboardText( val )
    cl.CloseClipboard()
    print('The following text was written to the clipboard')
    print(val)
Save a set of lines to the clipboard.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/quarantine/win32clip.py/clip_f