Created
May 30, 2014 02:33
-
-
Save VeryCB/9c447b541c6dc3a5b8f6 to your computer and use it in GitHub Desktop.
insert spaces between Chinese characters and copy to clipboard
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
import os | |
while True: | |
join_by = ' ' * 3 | |
content = raw_input('say something: ') | |
content_list = [content[i:i+3] for i in range(0, len(content), 3)] | |
output = join_by.join(content_list) | |
os.system("echo '%s' | pbcopy" % output) | |
print 'copied "%s" to clipboard, now you can paste!' % output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment