Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

papirus-write parsing line break \n #168

Closed
jarrah31 opened this issue Jan 3, 2018 · 3 comments
Closed

papirus-write parsing line break \n #168

jarrah31 opened this issue Jan 3, 2018 · 3 comments

Comments

@jarrah31
Copy link

jarrah31 commented Jan 3, 2018

I know that PapirusTextPos will take into account \n as a line break using the following example:

text.AddText("hello\nworld", 10, 20, Id="Start" )

However if I use papirus-write, \n just appears within the text on the display.

papirus-write.py "hello\nWorld"

Is there a workaround by any chance please?

Thanks.

@tvoverbeek
Copy link
Contributor

The '\n' is not converted by the shell (bash).
This works:
papirus-write $'hello\nWorld'
See e.g. https://stackoverflow.com/questions/3005963/how-can-i-have-a-newline-in-a-string-in-sh
Note: you need to use single quotes after the '$', double quotes do not work.

shawaj added a commit that referenced this issue Jan 3, 2018
@jarrah31
Copy link
Author

jarrah31 commented Jan 4, 2018

Ahh of course, thank you!

@shawaj
Copy link
Member

shawaj commented Jan 4, 2018

@jarrah31 @tvoverbeek added to the main readme now for reference :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants