<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
This is good info...but I'm looking for the opposite direction: I want
to place some arbitrary command output text into the clipboard, not get
the current selection out of the clipboard.<br>
<br>
Any help on that end?<br>
-Dave<br>
<br>
kdart wrote:
<blockquote
 cite="mid1157483910.308073.274710@h48g2000cwc.googlegroups.com"
 type="cite">
  <pre wrap="">David Hirschfield wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Strange request, but is there any way to get text into the linux
copy-paste buffer from a python script ?

I know the standard python libraries won't have that functionality
(except as a side-effect, perhaps?), but is there a simple trick that
would do it on linux? A command line to get text into the buffer? Using
a gui toolkit as a proxy to get text in there?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
There's a utility called xclip that you can wrap with popen2 or
something similar. I use my own proctools:

        import proctools
        XCLIP = proctools.which("xclip")
        es, arg = proctools.getstatusoutput("%s -o -selection primary" %
(XCLIP,))

"arg" has the X selection.

  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Presenting:
mediocre nebula.
</pre>
</body>
</html>