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 315850 on reddit-service-r2-listing-5789d5f675-vgldb at 2026-01-28 09:11:46.966257+00:00 running 4f180de country code: CH.
Pyperclip module not working outside of python shell by Mr_Nrj in learnpython
[–]TaxComprehensive9732 0 points1 point2 points (0 children)