Tag Archives | PySIG

Notes from PySIG, 25-Sept-2008: What’s New in Python 2.6

Fourteen people attended the September meeting of the Python Special Interest Group of the Greater New Hampshire Linux User Group, held as usual on the fourth Thursday of the month at the Amoskeag Business Incubator in Manchester, NH, 7 PM – 9 PM.

Our presenter of the evening had to postpone, due to family obligations, so we had a general night of discussion. It was vigorous and interesting. I was a tad late to the meeting, so I missed Ray Côté’s description of a gotcha using Python. It pays to show up early to the meetings! Bill Sconce brought along a two page agenda and list of topics, focused on new features in Python 2.6. This lead to a lot of discussions, clarifying what can be done in earlier Python versions and how the new version works, including many times when we dropped to the shell and started python to test out our assumptions.

Janet provided yummy cookies, as always — thanks, Janet! And Ben was harassed in absentia. Thanks to Bill for arranging, announcing and herding cats to run the meeting, the Amoskeag Business Incubator for their great facilities, Janet for the cookies, and all for attending and participating.

0

Notes from PySIG, 24-July-2008: Improv Intro

Seven attendees made it to the July 2008 meeting of the Python Special Interest Group of the Greater New Hampshire Linux Group, despite the heavy rains. Due to some last-minute conflicts, our planned speaker, Ray Côté, had to take a rain check for a future meeting, but cookies were made and we resolutely carried on.

There were two first-time attendees, one with a novice level of knowledge of Python and the second very little. Lead by the PySIG leader, Bill Sconce, we launched into an improvised session introducing Python and talking about its power, range and flexibility, comparing it with other languages, heckling Ben Scott, demonstrating several IDEs, talking about procedural scripting and object-oriented programming, showing off some working code, migrating database applications from proprietary platforms, and much, much more. A good time was had by all.

Prominently mentioned were the great tutorials available directly off the Python web site and the Tutor mailing list.

Great thanks to Janet for a delightful variety of cookies, to Bill for not only running the meeting and providing the projector but also bringing the milk, to all for participating, and to the Amoskeag Business Incubator for providing the fine facilities.

(Note: despite the organizational support of the GNHLUG, members running all sorts of OSes are welcome. A typical meeting has people running Python on OS X, Linux and Windows. All should expect equal-opportunity heckling.)

0

Notes from PySIG, 22-May-2008: IPython and Frangoes

Twelve folks attended the May meeting of the Python Special Interest Group, held as usual at 7 PM on the fourth Thursday at the Amoskeag Business Incubator in Manchester, New Hampshire. Vigorous discussion, idea exchange, job openings and, yes, Python, was discussed in depth.

Bill Sconce was the master of ceremonies and lead off with his usual printed agenda of items: Welcome, Announcements, a round of introductions, Janet’s Famous Cookies (this week, Frangoes! Awesome!), open announcements and discussions of gotchas.

Sample Q: how to debug binary text that may or may not be Unicode? A: Mark Pilgrim’s Universal Encoding Detector, [link updated, tr] originally part of his famous Universal Feed Parser.

Sample Gotcha: scripts with a she-bang line might not always be transportable between Windows, Unix and OS X because of line ending differences. If your parser complains about invalid commands on the she-bang line, make sure your line endings are correct for the platform.

Shawn K. O’Shea arrived and proceded to note every passing mention (with links!) in his great blog entry at: http://www.eth0.net/blog/?p=12 — thanks, Shawn!

Kent asked about using Python to interface with an existing C++ code and a lot of useful suggestions were forthcoming.

Arc updated us on the state of PySoy: the major bug that was crashing PySoy seems to have been isolated, and the code is orders of magnitude more stable. Bug fixing is proceding apace and an end-of-summer major release appears feasible.

Discussion on the upcoming Software Freedom Day got an enthusiastic reception, with several folks considering something in their communities.

On to the main presentation: Kent presented his monthly Kent’s Korner featuring the IPython interactive shell. IPython is slick, with a slew of features and quite a bit of documentation as well. IPython is not just a shell, but also an embeddable library that can bring scripting features into your application, and can also be used as a non-blocking interface to graphical environments like GTK, Qt and Wx (unlike the standard Python shell, which only works against Tk). Anyone doing a lot of work with Python from the shell needs to check out IPython!

Thanks to Kent for the presentation, to Bill for running and promoting the show, to Janet for the awesome Frango cookies, to Shawn for the excellent capture of the night’s events, to ABI for their great facilities and to all for participating!

0

Notes from PySIG, 24-April-2008: Questions, Answers, Brownies!

Eight attendees had a great time last night eating all of Janet’s brownies, cookies, cupcakes and Ray’s milk while discussing Python, news, questions, life, the universe and everything. The April meeting of the Python Special Interest Group of the Greater New Hampshire Linux User Group took place as usual on the fourth Thursday of the month at the Amoskeag Business Incubator in Manchester.

Shawn K. O’Shea took some great notes with links to dozens of the topics on his blog at: http://www.eth0.net/blog/?p=11 (what a cool domain, eh?)

Thanks to Bill and Alex for arranging the meeting, to Janet for the awesome confections, to Ray for bringing the milk, to the ABI for the great facilities and to all for attending and participating!

0

Notes from PySIG, 27-March-2008: urllib2 and PySoy

Seventeen people attended last night’s Python Special Interest Group, one of many active chapters of the Greater New Hampshire Linux User Group. It was a long meeting, starting at 7 PM with a round of introductions, discussions of gotchas, announcements, problems people are working on (creating a lamda that does ‘Nothing’ — for a certain definition of Nothing!), subclassing Array.Array, learning a few new tricks about SciTE.

Mark had great news on his progress in getting Open Source in the Lawrence Library in Pepperell. The librarians have been very receptive, setting up an area to display information, promoting ongoing meetings, etc. Go, Mark!

Kent put on a very good Kent’s Korner on urllib2, and Arc Riley gave a very interesting presentation on PySoy, a powerful 3D gaming engine driven with Python.

Sean O’Shea provides extensive notes with even more links at his blog — thanks for the great notes!

Thanks to Bill for organizing and announcing, the Amoskeag Business Incubator for providing the great facilities, and to all for attending and participating!

0

PySIG, 27-March-2008: PySoy and urllib

Organizer Bill Sconce announces the monthly Python Special Interest Group to be held on Thursday, March 27th, at the Amoskeag Business Incubator in Manchester, NH. The main presentation will be on PySoy, a 3-D gaming engine. The Kent’s Korner will feature urllib2, a utility module for working with http, ftp and similar protocols, with supports for POSTs and GETs, authorization and so forth.

0

Notes from PySIG, 29-Nov-2007: Django in the real world

Fourteen people managed to find their way to the Amoskeag Business Incubator (it’s on SOUTH Commercial Street, contrary to the directions on the ABI site) for the November meeting, one week later than the usual fourth Thursday of the month, of the Python Special Interest Group.

A number of new attendees arrived this month. We pointed out that the mailing list for the group can be found on the DLSLUG and GNHLUG sites, look for “mailing list” and that there was an announcement as well as a discuss list for the group. We pointed out the main calendar at GNHLUG.org as well and talked about other resources.

Several members were new to the area or had come up from Cambridge, MA (our fair city) for the SIG meeting. They pointed out the Cambridge Python Group, who usually posts meeting announcements on Meetup.com, which boasts 103 members on their list! We discussed the ideas for mutual cooperation, and will be glad to cross-post their announcements to the PySIG -announce list.

Kent S. Johnson was the main presenter, and showed us how Django is used to host the http://www.blogcosm.com site. Without going into details on the business aspects of the site, Kent was able to give us a tour of several of the pages, talk about the RESTful URL formats, the model-view-controller model that’s used, demonstrate some of the code used to describe a model and the actions that can be taken on it, and show us some of the templating language that generates the HTML. The built-in administrative functionality, creating simple CRUD pages based on the model descriptions, was an impressive Django feature.

An excellent meeting, with lots of code and lots of ideas. Thanks to Kent for the main presentation, to our Cambridge brethren for making the long trip, to Bill Sconce for arranging, announcing and MC’ing the meeting, and to the Amoskeag Business Incubator for providing the great venue. Hope to see you all again at next month’s meeting, held on the 27th of December, likely just an informal chat due to the proximity with the holiday.

0

PySIG notes, 25-Oct-2007, Kent Johnson and Beautiful Soup sprint

Thirteen people elected to skip watching the second game of the World Series (Go Sox!) to attend the October meeting of the Python Special Interest Group (PySIG), held as usual at the Amoskeag Business Incubator in Manchester, New Hampshire, on the fourth Thursday of the month, 7 PM until… well, 10 PM last night!

The usual slew of announcements was made: the PySIG won’t meet on the usual night due to the Thanksgiving holiday. A meeting might happen the week after, since there are five Thursdays. Stay tuned for the official announcement. Other affiliated GNHLUG meetings are posted to http://www.gnhlug.org and all are welcome.

I had proposed a programming challenge to PySIG: following recent discussions on the GNHLUG mailing lists about attendance at meetings, Jim Kuzdrall had suggested we more closely analyze the attendance data that’s been posted to the GNHLUG wiki [1] for the past two years or so. The data is accessible from there, but the HTML format is not too easy to manipulate into an analyze-able format.

Enter BeautifulSoup. BS is a utility written in Python that parses HTML, with a lot of toleration for somewhat malformed HTML, and produces a parsed tree that can be traversed or queried or parsed into its various elements. Kent S Johnson continued his great Kent’s Korner series with a presentation on the basics of using BeautifulSoup. Kent noted that the documentation on BS is remarkably good, with illustrative examples and exhaustive discussions. BS is in its third major version and continues to be supported by its original author.

After Kent’s Korner, Bill Sconce took the driver’s seat, set up BS on his machine and we began with the kernel of source Kent had supplied to parse the source. The group participated, suggested, yelled at typos, experimented, threw out code, started over, changed the angle of attack, and successfully produced code that not only parsed the existing page, but generated a comma-separated-value file with proper escaping, thanks to the csv module. Along the way, we discussed issued of character conversion (since BS uses the aptly-named UnicodeDammit module and csv wants ASCII), escaping issues, coding styles, and more.

At the end of the presentation, Kent got the projector again to show a somewhat different tack he had used to parse the HTML, with an emphasis on writing small functions to clean each column of the idiosyncracies found in the data (a “Saturday” in the date field, a date field a two-day event, approximated attendance ~24 and so forth) and generate some results: which groups had the highest attendance for the year? No one was surprised that Nashua/MerriLUG was #1, but who knew that PySIG was #2? Woo-hoo! We noted that RubySIG was last, but there’s a good sampling problem: they had just started up early in the year, and a couple attendance figures were missing.

To follow up from the meeting, we intended to merge Kent’s improvements into the group’s code and generate some CSV files that we can make available for download from the GNHLUG wiki for all to analyze, graph, visualize and study.

Thanks to Kent for preparing his Beautiful Soup presentation, to Bill Sconce and Alex Hewitt for arranging the meeting, to Bill again for having the patience to type while twelve people tsk’d at him, to the Amoskeag Business Incubator for providing the fine facilities, and to all for attending and vigorously participating in the meeting!

[1] which actually breaks down to:
http://wiki.gnhlug.org/twiki2/bin/view/Www/PastEvents2007,
http://wiki.gnhlug.org/twiki2/bin/view/Www/PastEvents2006, and
http://wiki.gnhlug.org/twiki2/bin/view/Www/PastEvents2005

Adding a “skin=print.pattern” eliminates some of the “chrome”
surrounding the content.

0

Python Special Interest Group, Manchester, NH, 25-Oct-2007: Kent Johnson and Beautiful Soup

The monthly meeting of the New Hampshire Python Special Interest Group takes place at the Amoskeag Business Incubator, Manchester, NH on 25 October 2007 (the 4th Thursday as usual) at 7:00PM. The Beginners’ session precedes at 6:30 PM. (Bring a Python question!)

Kent S. Johnson will be the featured speaker. Along with his regular Kent’s Korner presentation, we’re going to try hacking at some actual code problems tonight: using Beautiful Soup to parse a web page and produce some useful data. Should be interesting.

Organizer Bill Sconce posts the meeting announcement here.

0

Notes from PySIG, 24-May-2007: Python logging and wxPython

Thirteen participants made it to the May meeting of the Python Special Interest Group of the Greater New Hampshire Linux User Group, held as usual on the fourth Thursday of the month at 7 PM at the Amoskeag Business Incubator, Manchester, NH.

It was a busy meeting. A quick round of introductions and announcements was followed by several terrific presentations.

Kent Johnson entertained us with Kent’s Korner, this month featuring the logging module. Simple logging can be implemented in two lines of code and customized with a third, but the module can be expanded almost infinitely to include multiple handlers arranged in a hierarchical fashion with different levels of filtering and multiple output. As usual, Kent did a fine job of showing simple examples and clearly building on them.

Bill Sconce decided to defer his second attempt at describing a hierarchy of data types, a discussion sure to rouse an interesting and educational debate amongst the participants. Stay tuned for a future meeting…

Ric Werme made the main presentation on wxPython. He brought the most extensive handouts we’ve had today, with an engaging backstory of his several-decades tinkering with graphing and the Petals of the Rose patterns. The demo was arresting, and source code can be downloaded here and here. Ric walked us through the wxPython wrapper, explaining the various widgets used and spoke well of the new wxPython book.

Thanks to Ric and Kent for their presentations, to Bill Sconce and Alex Hewitt for arranging the meeting and facilities, to the Amoskeag Business Incubator for their hospitality and to all who attended for their participation!

0

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.