Robpol86 / terminaltables

Project no longer maintained.
https://github.com/matthewdeanmartin/terminaltables
MIT License
689 stars 70 forks source link

any way to show pretty Single/DoubleTable without cp437? #36

Open retsyo opened 7 years ago

retsyo commented 7 years ago

I am using Chinese, cp437 can't handle it. So the default code page is cp936. Thus the Single/DoubleTable will create too long table line. Any hints?

retsyo commented 7 years ago

DOS console on my win7 use 8*16 dots fonts( sorry I don't know the font name) UltraEdit use "Courier New" Is there any python pacakge which can set the console font? I don't want to change it by REGEDIT because I can/should not change that on other PC

retsyo commented 7 years ago

yeah, after searching, I found Marfisa supply a solution for windows( http://stackoverflow.com/questions/3592673/change-console-font-in-windows ). It works nice on my win7 with "Lucida Console"( "Courier New" works for UltraEdit but not for Single/DoubleTable ) and comment out font.dwFontSize.X = 11 and font.dwFontSize.Y = 18 (I think then it uses the default font size). So maybe this snippet can be added into Single/DoubleTable (SingleTable does not need it) if sys.platform == 'win32'

I know nothing about linux or mac osx

retsyo commented 7 years ago

another link if someone will use it: https://github.com/belltown/roky/blob/master/roky.py