BlightCynic
BlightCynic

Reputation: 11

How to get Pyperclip to paste new lines in virtual machine?

I'm trying to use pyperclip to open text files, copy the text and then paste that in software I use on a EC2 windows machine using Remote Desktop on Windows. When I copy the text file it pastes it in the format I need on my host machine just fine but when I paste it in the virtual machine it's all on one line.

This is the test code I'm using at the moment:

import pyperclip

text = (open('proc.txt')).read()

pyperclip.copy(text)

If the text file was:

Bob
Jack
Sarah
Hannah

On my host machine it paste in the same format. On the VM it shows:

BobJackSarahHannah

No idea why this is happening and I can't find anything searching other questions on the topic.

Upvotes: 1

Views: 107

Answers (0)

Related Questions