Python + Win32: Cut/Paste w/o GUI

Rudy Schockaert rudy.schockaert at pandora.be
Sat Oct 5 10:19:51 EDT 2002


> I have a text file on my desktop (at work and I'm at home now, so I
> can't post the code) with extension of 'clipdata'.  I registered a new
> file type in windows with this extension and I created two actions.
> The default action, runs my python script and the other action edits
> the file.  The python program uses a popen call to the 'gclip.exe'
> from the unxutils package (http://unxutils.sourceforge.net/) which
> writes the clipboard data to stdout.  I read from the popoen call and
> I have whatever was in the clipboard.  I then write this to the top of
> the 'clipdata' file with a time stamp.  I use this a temporary holding
> place for little scraps of code or SQL.  All I have to do is load up
> the clipboard and then dbl-click the icon on the desktop  (I have a
> command line function also) and the data is saved for posterity.
> The unxutils package also has a 'pclip.exe' which sends stdin to the
> clipboard, which I also have used with sucess.
>
> Hopefully this helps.  If need be I can send you the code on Monday.
> Just email me.
>
> ...
> jay
>

Jay,

I think there are more people interested in that piece of code. I certainly
am.
I would like to try this out. So, if you send it, can you put me in CC

Thanks,

Rudy





More information about the Python-list mailing list