Search code examples
pythonpython-3.xpyperclip

Copy strings in pyperclip


Hey everyone this code doesn't work for me:

import pyperclip as clip
string="blah blah"
clip.copy(string)
clip.paste(string)

the error:

TypeError: init_windows_clipboard.<locals>.paste_windows() takes 0 positional arguments but 1 was given

THANKS


Solution

  • Try running the code after removing the argument from clip.paste().

    import pyperclip as clip
    string="blah blah"
    clip.copy(string)
    clip.paste()