473,503 Members | 972 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Weird clipboard behavior?

Hi, group,
A weird clipboard behavior for your help:

==============Code==============
from Tkinter import *
import tkMessageBox

root=Tk()
root.withdraw()
root.clipboard_clear()
root.clipboard_append('python rules!')
tkMessageBox.showinfo("Done","Text pasted!")
=============================================

============symptom==============
1. When messagebox shows up, you click "OK" to exit, then you can not
get "python rules!" anymore. Clipboard is empty.
2.However, if you paste "python rules!" from the clipboard (ie,ctrl-v
in textpad) before you click "OK" to exit. "python rules!" is still on
the clipboard after you exit this small app.
3. The above test is on python2.3/win2k. I also tested it on linux
(python2.3/rh7.1). Content was always lost after you exit, on matter
if you paste it or not before exit.
===============================================
Q: How to keep content in clipboard after exit?

Thanks in advance!

Chunlei
Jul 18 '05 #1
0 1417

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1197
by: Travis Pupkin | last post by:
Hi, I'm passing a string (the file name of a photo) from a database, into a hidden form field, and then posted from that form into the HTML code of a multipart e-mail being sent by CDONTS. ...
17
2843
by: matthias_k | last post by:
Hi, I am currently implementing a solver for linear optimization problems using the revised simplex method and I stumbled accross some strange behavior regarding the treatment of the number 0....
5
1654
by: Tommytrojan | last post by:
Hi, I have been using Python for a while but today I came across a really strange behavior: While poking around in Queue.py due to problems with importing this module from a thread I got an...
4
1291
by: Sahil Malik [MVP] | last post by:
Okay so lets say I have a valuetype - lets say DateTime. Look at this code . List<DateTime> dt = new List<DateTime>() ; dt.Add(new dateTime(1999,12,1)) dt.AddDays(1) ; <--- This statement...
4
1148
by: CJ Taylor | last post by:
Alright, I wrote this program that is used throughout my entire company for the past 9 months. Now, we have deployed it to well over 100 machines. So my Sys Admin comes up to me today and...
8
2331
by: XYZ | last post by:
I need to pass the address of a variableto some win32 API functions like RTLMoveMemory I noticed some weird behavior when pinning objects and using the handle's pointer to write data to the...
10
4072
by: abcd | last post by:
I have a TextCtrl which is set to be multi-line. I have a function say, updateText(msg), which takes some string and appends it to the text control... txtControl.AppendText(msg) ...
5
2283
by: comp.lang.php | last post by:
// NEW 11/27/2006: FINALLY, IF YOU ADDED OR DELETED OR DID ANY KIND OF FORM ACTION SUCCESSFULLY, DON'T RE-DISPLAY THE NEW EXPENSE ITEMS VIA $_POST if ($_POST && (!is_array($leaseObj->errorArray)...
0
1102
by: Tom | last post by:
I'm pretty sure this is an unusual case and I suspect it has as much to do with what the browser is doing as it does PHP on the server, but the behavior defies anything I would have expected. What...
0
7339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6995
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7463
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
389
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.