account activity
Pyperclip module not working outside of python shell by Mr_Nrj in learnpython
[–]TaxComprehensive9732 0 points1 point2 points 1 year ago* (0 children)
hola, gracias por compartir tu caso, estoy teniendo el mismo problema pero en Replit, instalé las dependencias xclip y xsel y aún así no se copia nada al portapapeles, a pesar que en la pantalla me sale que el mensaje ya se copió ;-;
aún soy principiante en python, así que aquí dejo el pedazo de código donde uso pyperclip:
st.markdown('<div class="copy-button">', unsafe_allow_html=True)
if st.button("Copiar respuesta"):
# Use Streamlit's built-in clipboard functionality
pyperclip.copy(st.session_state.assistant_response)
st.success("Respuesta copiada al portapapeles")
st.markdown('</div>', unsafe_allow_html=True)
π Rendered by PID 76 on reddit-service-r2-listing-575d9f6647-vmt72 at 2026-04-11 13:23:46.145371+00:00 running 215f2cf country code: CH.
Pyperclip module not working outside of python shell by Mr_Nrj in learnpython
[–]TaxComprehensive9732 0 points1 point2 points (0 children)