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

避免在单词内换行 #16

Open
inkss opened this issue Oct 26, 2017 · 1 comment
Open

避免在单词内换行 #16

inkss opened this issue Oct 26, 2017 · 1 comment

Comments

@inkss
Copy link

inkss commented Oct 26, 2017

能获取终端大小,在例句显示时不在单词内换行吗?

wd

@sparkydogX
Copy link

我在python中用rows, columns = os.popen('stty size', 'r').read().split() 可以获得终端窗口的大小。
然后在 https://github.com/ChestnutHeng/Wudao-dict/blob/master/wudao-dict/src/CommandDraw.py#L78 的sentence中sentence_t对应位置添加换行符。这样做可以换行,但是每一行的长度不能保持一致,看起来很别扭。
我想要两端对齐的效果,不知道如何实现

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

2 participants