Search code examples
pythoncmodulepyperclip

What C function (or interface) is the pyperclip module in python based on?


Look, I'm wondering what C function the pyperclip library in python is based on. I couldn't find this information so I decided to ask here. And as I understand, these fundamental functions differ on different Operating Systems, so I’m interested in Ubuntu


Solution

  • It's based on xclip() or xsel() that require X11 implementation

    xclip.c has its own functions:

    • *get_requestor,
    • del_requestor,
    • clean_requestors,
    • doOptMain,
    • doOptSel,
    • doOptTarget,
    • doIn,
    • printSelBuf,
    • doOut

    xsel.c functions:

    • get_atom_name
    • debug_property
    • xs_malloc
    • _xs_strdup
    • _xs_strncpy
    • get_xdg_cache_home
    • block_exit_sigs
    • unblock_exit_sigs
    • alarm_handler
    • and other (about 49 more)

    Linux Clipboard itself is based on freedesktop.org

    Repositories: pyperclip, xclip, xsel
    Found: Michael Butscher, Some Programmer Dude, Håkon Hægland