Modules for developers

Examples

Don't really use these for production code...

See more examples in /demo

Simple usage for static display

importpylcddc.clientasclientimportpylcddc.widgetsaswidgetsimportpylcddc.screenasscreentitle=widgets.Title('title_widget','Hello, World!')main_scr=screen.Screen('main',[title])c=client.Client('localhost',13666)c.add_screen(main_scr)input('Press any key to exit')c.close()

Nest widgets in frames

importpylcddc.clientasclientimportpylcddc.widgetsaswidgetsimportpylcddc.screenasscreenimportplatformflavorful_text_widgets=[widgets.String(f'flv_tx{i}',1,1+i,text)fori,textinenumerate('now you see me\nnow you dont\nso scary\nsuch wow'.splitlines())]frame_top=widgets.Frame('frame_top',flavorful_text_widgets,1,1,10,1,10,4,widgets.Frame.Direction.VERTICAL,8)platform_text=widgets.Scroller('platform',1,2,20,1,widgets.Scroller.Direction.HORIZONTAL,1,'pylcddc running on '+' '.join(platform.uname()))main_scr=screen.Screen('main',[frame_top,platform_text])c=client.Client('localhost',13666)c.add_screen(main_scr)input('Press any key to exit')c.close()