m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
891 B

6 months ago
  1. # -*- coding: utf-8 -*-
  2. #*****************************************************************************
  3. # Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
  4. #
  5. # Distributed under the terms of the BSD License. The full license is in
  6. # the file COPYING, distributed as part of this software.
  7. #*****************************************************************************
  8. from __future__ import print_function, unicode_literals, absolute_import
  9. import clr
  10. clr.AddReferenceByPartialName("System.Windows.Forms")
  11. import System.Windows.Forms.Clipboard as cb
  12. def GetClipboardText():
  13. text = ""
  14. if cb.ContainsText():
  15. text = cb.GetText()
  16. return text
  17. def SetClipboardText(text):
  18. cb.SetText(text)
  19. if __name__ == '__main__':
  20. txt = GetClipboardText() # display last text clipped
  21. print(txt)