Skip to content

Commit

Permalink
DOC updated to reflect using pyperclip for clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
hayd committed Jun 13, 2013
1 parent a7d069d commit a469d33
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
30 changes: 30 additions & 0 deletions LICENSES/OTHER
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,33 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Pyperclip v1.3 license
----------------------

Copyright (c) 2010, Albert Sweigart
All rights reserved.

BSD-style license:

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the pyperclip nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY Albert Sweigart "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL Albert Sweigart BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 2 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ pandas 0.11.1
- ``melt`` now accepts the optional parameters ``var_name`` and ``value_name``
to specify custom column names of the returned DataFrame (GH3649_),
thanks @hoechenberger
- clipboard functions use pyperclip (no dependencies on Windows, alternative
dependencies offered for Linux) (GH3837_).
- Plotting functions now raise a ``TypeError`` before trying to plot anything
if the associated objects have have a dtype of ``object`` (GH1818_,
GH3572_). This happens before any drawing takes place which elimnates any
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,16 @@ def to_hdf(self, path_or_buf, key, **kwargs):
return pytables.to_hdf(path_or_buf, key, self, **kwargs)

def to_clipboard(self):
"""
Attempt to write text representation of object to the system clipboard
Notes
-----
Requirements for your platform
- Linux: xclip, or xsel (with gtk or PyQt4 modules)
- Windows:
- OS X:
"""
from pandas.io import clipboard
clipboard.to_clipboard(self)

Expand Down
4 changes: 2 additions & 2 deletions pandas/io/clipboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def to_clipboard(obj): # pragma: no cover
Notes
-----
Requirements for your platform
- Linux: xsel command line tool
- Windows: Python win32 extensions
- Linux: xclip, or xsel (with gtk or PyQt4 modules)
- Windows:
- OS X:
"""
from pandas.util.clipboard import clipboard_set
Expand Down

0 comments on commit a469d33

Please sign in to comment.