Hi all, This was slowly stewing in my notepad for a long, long time, but it has finally seen the light of day (just in time for the next meetup :) ). The minutes has helped me to better recollect what I had observed during the meetup. Hopefully it helps jog your memory too. It was a great learning experience to attend. Do checkout the Lightning talks Section.
# Meeting Minutes - Chennaipy Nov 2018 Meetup ## Introduction to PyGTK ## ###Speaker: Ashok Kumar The author used PyGTK in their Digital Signage Project. They have to manage many LCD and LED Devices. They need to display images, videos, and webpages. They used Xibo, an open source software to manage remote displays and schedule content. Each player was a remote node. PyGTK was used on remote displays. ### PyGTK ### * Built on GTK+ library and exposes most of the features available in GTK+. * Works on Windows, MacOS, Linux * Several Advantages of PyGTK over GTK+ - Don't have to worry about pointers and memory management - Quick Prototyping and easy developing * PyGTK Widgets * Widgets are hte components for building * Widgets are of two types - Control and Display widgets + Control widgets to drive the UI + Display widgets to give feedback - Containers for holding the Control and Display widgets. E.g Window, frames etc Containers help in positioning of inlaid widgets. PyGTK Containers take a lot of pain out of developing the UI * You don't have to worry about display size. The containers take care of it. * The Containers autoscales. It takes care of size, x,y position of the widgets etc. The speaker enumerated the steps needed to create a simple PyGTK program with live examples. * Create toplevel window * Create control & display widgets * For every signal we can associate a handler(function) * Then invoke the main loop * It will check for signals and invoke the corresponding handler ### Glade * Create the GUI using click and place. * Once the UI is completed it can be exported as XML. * The exported XML file can be parsed using PyGTK and directly incorporated into the program, saving hours of coding. * The speaker showed an hands on example creating the UI in glade , exporting the xml file and importing it in a python program. * UI changes can be done fast. * Designers without programming knowledge can create and edit ui. This was followed by the discussion about GTK, Tkinter and Qt. It was agreed on that Tkinter was the best for simple UI needs and truly cross platform requirements as GTK and Qt needed special care for packaging. ## Accessing Spreadsheets in Python by Praveen ## ### Speaker: Praveen Kumar * Praveen encouraged usage of virtualenv. It clones the python environment to provide a virtual environment. The advantages are * any library installed in the virtual environment does not affect the system python which is used by many system programs * At any point in time, one can easily find out the required libraries for a given project and replicate it anywhere. The terminologies used by the Python Spreadsheets library * XL file -> Workbook * Each sheet -> worksheet If the microsoft format is used as input, you cannot programmatically overwrite the XL file. ## Steps to accessing the Spreadsheet programmatically using python ### Speaker: Vijay Kumar * First Connect to the workbook. * Access the worksheet in the workbook * Read from a particular cell * Modify the cell/list of cells * Save Accessing a range of cells is similar to array operations in Python. It is similar to python array slicing. Creating a Spreadsheet from Scratch in Python Why? * To automate manual tasks * No need for relational DB * To use with MSExcel or LibeOffice spreadsheets * More User/Reader friendly when compared to CSV The aim of this exercise is to * Perform certain calculations on data on the fly. When data is changed, the calculations are redone. * Visualize the results * Allow collaborative editing of data. The data is stored as a text file. The reasons are * Easy to edit * version control the data file * reviews can be done with AsciiDoc The file format chosen was Yaml as it is a superset of JSON. Yaml supports multiple dict and list representations. Vijay used notations similar to spreadsheets to denote data. He overrided python's magic functions like __getitem__ and used eval to create a data calculation experience similar to Spreadsheets. In this approach, The spreadsheet is a dictionary. Each cell location (like 'A1', B3') etc is a key in the dictionary and B3 is a value in the dictionary. When a cell contains formula, the result is evaluated dynamically by executing the formula as python code using eval. This is done using the spreadsheet dictionary as context. The speaker overrided the Yaml's default dict construction and serialization to add some custom features. The talk is an excellent illustration of how Python provides plenty of little helper functions. When we use the helpers effectively, we can write powerful and elegant programs in Python. Visualization was done using pygal. ##Lightning Talks ###Spicing up the Command line #### Speaker: Aziz Aziz explained how we can make commandline more powerful with a few interesting python libraries and gave live demonstration for each. Each of these is an handy tool that can greatly improve the functionality, yet very easy to use. * getpass - Prompt the user for a password without echoing. * colorama - a simple cross-platform API for printing colored terminal text from Python * tabulate - Pretty-print tabular data in Python: with : smart column alignment, configurable number formatting, alignment by a decimal point * tqdm - make your loops show a smart progress meter * jinja - to provide html formatted output. ### Contributing to Open Source Projects #### Speaker: Karthick - Contributor to core python. Python does not have the industrial backing like Go or Rust does. A small group of contributors do a disproportionately large amount of work. Karthick dispelled the myth that, one needs to put lots of effort and time to be a contributor or that one has to be a coding ninja. There are diverse ways to contribute. * Bug triaging can help core contributors save a lot of time. For example, many new bugs filed are either duplicates or are fixed already. * Community Building - Bringing in new contributors to replace older contributors when they move on - Increasing diversity in the group of contributors * Improving documentation * Helping with Funding It was a very inspiring talk. ### DataDeux #### Speaker: Deepak Deepak talked about his experience is developing datedeux https://github.com/deepakkt/datedeux . DateDeux provides several useful calendar operations that you cannot do with python's standard library. Some interesting functions are finding the start/end of a month. Date Arithmetic with months, weeks, years etc.
_______________________________________________ Chennaipy mailing list Chennaipy@python.org https://mail.python.org/mailman/listinfo/chennaipy