示例#1
0
def copyPaste():
    copy("hi")
    paste()
示例#2
0
def pasteTextInBuffer():
    text.insert(END, paste())
示例#3
0
def test_copy_paste_with_unknow_paste_command():
    copy(TEST_STRING)
    with pytest.raises(NoSuchFileOrDirectoryException):
        paste(cmd=['fake_cmd'])
示例#4
0
def test_copy_paste():
    copy(TEST_STRING)
    result = paste()

    assert TEST_STRING == result
class Arguments:
    notab = False
    if "notab" in sys.argv:
        notab = True
    nonewline = False
    if "nonewline" in sys.argv:
        nonewline = True
    verbose = False
    if "verbose" in sys.argv:
        verbose = True


oldinputstr = ""
while True:
    time.sleep(0.1)
    inputstr = copypaste.paste()
    if inputstr == "":
        continue
    if Arguments.verbose:
        if oldinputstr != inputstr:
            print(repr(inputstr), newline)
            oldinputstr = inputstr
    inputstr = str(inputstr)
    if Arguments.nonewline:
        inputstr = inputstr.replace(newline2, "")
        inputstr = inputstr.replace(newline, "")
    if Arguments.notab:
        inputstr = inputstr.replace("\t", "")
    copypaste.copy(inputstr)
示例#6
0
def pasted():
    copyed = paste()
    url_input_entry_field.insert(0, copyed)