Basically what I'm trying to do is get the %paste
function to work when I run iPython on the heroku one-off dyno using the django-extension app: heroku run python manage.py shell_plus
The problem is when I try to paste into the console, I get the following error:
ERROR: Getting text from the clipboard on this platform requires Tkinter.
I've looked into how to install Tkinter and it looks like there's no pypi package for it, nor is there any promising leads besides having root access (which is not possible with the heroku one-off dynos). How do I get Tkinter installed on my heroku app?
Alternatively, is there another way to get the %paste function working with iPython on Heroku?
Reposting as an answer:
%paste
probably won't work on Heroku, because it will look at the server clipboard, not your local clipboard.
You can instead use %cpaste
. This lets you paste in text using your regular terminal mechanisms (without auto-indent getting in the way, as it would if you tried to paste into IPython directly). Paste the text you need, and then enter a line with just --
to finish.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With