Skip to content

Commit a469d33

Browse files
committed
DOC updated to reflect using pyperclip for clipboard
1 parent a7d069d commit a469d33

File tree

4 files changed

+44
-2
lines changed

4 files changed

+44
-2
lines changed

LICENSES/OTHER

+30
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,33 @@ distributed under the License is distributed on an "AS IS" BASIS,
4848
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
4949
See the License for the specific language governing permissions and
5050
limitations under the License.
51+
52+
Pyperclip v1.3 license
53+
----------------------
54+
55+
Copyright (c) 2010, Albert Sweigart
56+
All rights reserved.
57+
58+
BSD-style license:
59+
60+
Redistribution and use in source and binary forms, with or without
61+
modification, are permitted provided that the following conditions are met:
62+
* Redistributions of source code must retain the above copyright
63+
notice, this list of conditions and the following disclaimer.
64+
* Redistributions in binary form must reproduce the above copyright
65+
notice, this list of conditions and the following disclaimer in the
66+
documentation and/or other materials provided with the distribution.
67+
* Neither the name of the pyperclip nor the
68+
names of its contributors may be used to endorse or promote products
69+
derived from this software without specific prior written permission.
70+
71+
THIS SOFTWARE IS PROVIDED BY Albert Sweigart "AS IS" AND ANY
72+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
73+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
74+
DISCLAIMED. IN NO EVENT SHALL Albert Sweigart BE LIABLE FOR ANY
75+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
76+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
77+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
78+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
79+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
80+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

RELEASE.rst

+2
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ pandas 0.11.1
7373
- ``melt`` now accepts the optional parameters ``var_name`` and ``value_name``
7474
to specify custom column names of the returned DataFrame (GH3649_),
7575
thanks @hoechenberger
76+
- clipboard functions use pyperclip (no dependencies on Windows, alternative
77+
dependencies offered for Linux) (GH3837_).
7678
- Plotting functions now raise a ``TypeError`` before trying to plot anything
7779
if the associated objects have have a dtype of ``object`` (GH1818_,
7880
GH3572_). This happens before any drawing takes place which elimnates any

pandas/core/generic.py

+10
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,16 @@ def to_hdf(self, path_or_buf, key, **kwargs):
492492
return pytables.to_hdf(path_or_buf, key, self, **kwargs)
493493

494494
def to_clipboard(self):
495+
"""
496+
Attempt to write text representation of object to the system clipboard
497+
498+
Notes
499+
-----
500+
Requirements for your platform
501+
- Linux: xclip, or xsel (with gtk or PyQt4 modules)
502+
- Windows:
503+
- OS X:
504+
"""
495505
from pandas.io import clipboard
496506
clipboard.to_clipboard(self)
497507

pandas/io/clipboard.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def to_clipboard(obj): # pragma: no cover
2323
Notes
2424
-----
2525
Requirements for your platform
26-
- Linux: xsel command line tool
27-
- Windows: Python win32 extensions
26+
- Linux: xclip, or xsel (with gtk or PyQt4 modules)
27+
- Windows:
2828
- OS X:
2929
"""
3030
from pandas.util.clipboard import clipboard_set

0 commit comments

Comments
 (0)