Created
April 8, 2014 17:44
-
-
Save mygeekdaddy/10161740 to your computer and use it in GitHub Desktop.
clipboard_check
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Convert clipboard to uppercase/lowercase | |
import clipboard | |
text = clipboard.get() | |
if text == '': | |
print 'No text in clipboard' | |
else: | |
uppercase = text.upper() | |
if uppercase != text: | |
new_clip = uppercase | |
else: | |
#already uppercase, convert to lowercase | |
new_clip = text.lower() | |
clipboard.set(new_clip) | |
print new_clip | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment