-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH use pyperclip for read and to_clipboard #3848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I've not yet tested myself on windows or linux (which should work with various things (not) installed). Anyone mind having a try? |
I did this from an x-window (linux), pasted to excel (where it is text) pretty neat! and a nice warning came up that I didn't have xclip installed so maybe have some installation instructions in a warning I don't think there are any dependencies on windows, not sure about mac so +1 on this
|
and this is better than the old one...doesn't require gtk or tk (which if your linux is a server) doesn't normally install....xclip is good! |
Hmmm but installation method for xclip may differ on different linuxes (can of worms?), tbh I think their message is pretty good. Works on mac, pretty sure it will work on Windows... A good find of yours! Tagged for 0.11.1. Also, I should update the docs before merging (I think the docstrings are now incorrect on the requirements, and something in RELEASE). |
Just curious are there some non trivial use cases for reading and writing clipboard? |
@nipunreddevil How could copying and pasting be non-trivial...? :) |
@jreback Do I need to add the license somewhere else? |
umm...i think in the file is enough, you could copy it and put in a file in pandas/LICENSES though....I guess |
@hayd just to play devils advocate >:) tmux copy-pasting to/from clipboard just doesn't work with |
@cpcloud That's not devil's advocate! If it doesn't work it's a problem... any workaround? preferring xsel? Am I right in saying Windows no longer has any dependencies (It no longer needs python win32 extensions)? |
yep |
@cpcloud it falls back on |
oh well that is annoying (that |
@jreback So is this already dealt with in pyperclip? Or there is a I've put the license in and added docstring to generic.to_clipboard. Not sure if I have written dependencies correct for Windows (None?) and Linux. |
no i was just commenting on the semi-non-trivial-ness of pasting with tmux... |
this looks good deps look fine too |
mergable? |
There's a silly typo, xlit, will add in those (two) characters and merge now... |
and merge #3845 too thanks |
ENH use pyperclip for read and to_clipboard
related #3368 |
Use pyperclip to manage copy and pasting.
Fixes #3837, also cc #3845.