From nagappan at gmail.com Fri Aug 3 02:59:30 2012 From: nagappan at gmail.com (Nagappan Alagappan) Date: Thu, 2 Aug 2012 17:59:30 -0700 Subject: [Baypiggies] Announce: Cobra 2.0 - Windows GUI test automation tool Message-ID: Hello, Highlights * Java / C# / VB.NET / PowerShell / Ruby are now officially supported LDTP scripting languages other than Python * Approximately 130 APIs are compatible with Linux version of LDTP * C# client is compatible with Mono .NET framework and we have tested it on Linux/Mac * Identify object name based on automation id (window id, as per SilkTest users) * i18n support * CPU / Memory logging * Remote test execution New features: * List / Tree item API's are added * Scroll to the element if the respective pattern is enabled * Added new characters in keyboard input * Object lookup based on wildcard("?") * Double click on allowed object's * Added hyper link widget type under known objects New APIs: * getwindowsize * simulatemousemove * gettablerowindex * getobjectnameatcoords * onwindowcreate (Java/C# client) * removecallback (Java/C# client) * mouserightclick Bug fixes: * Taskbar is now identified as pane, rather than ukn * generatemouseevent API now takes the optional argument, compatible with Linux * Fixed a crash, if the window title has back slash * Grabing focus on combobox element fails the object selection, removed the respective code * Ignore special characters while searching object name * Fix regexp in object lookup * getcellvalue API now takes the optional argument, compatible with Linux * Handle task manager menuitem, which worked slightly different than other menu * Fixed listing sub-menus with a simplified method * getcellvalue API now as the Linux version * getchild API now returns appropriate output * Fixed *window APIs to work with different types of window * Fixed mouse left click on a text widget Credit: * John Yingjun Li (VMware) have contributed most of the code in this release. I really appreciate all his effort * VMware colleagues * Thanks to all others who have reported bugs through forum / email / in-person / IRC Please spread the word and also share your feedback with us. About LDTP: Cross Platform GUI Automation tool Linux version is LDTP, Windows version is Cobra and Mac version is PyATOM (Work in progress). * Linux version is known to work on GNOME / KDE (QT >= 4.8) / Java Swing / LibreOffice / Mozilla application on all major Linux distribution. * Windows version is known to work on application written in .NET / C++ / Java / QT on Windows XP SP3 / Windows 7 / Windows 8 development version. * Mac version is currently under development and verified only on OS X Lion. Where ever PyATOM runs, LDTP should work on it. Download source: https://github.com/ldtp/cobra Download binary (Windows XP / Windows 7 / Windows 8): http://download.freedesktop.org/ldtp/cobra-latest/ System requirement: .NET 3.5, refer README.txt after installation Documentation references: For detailed information on LDTP framework and latest updates visit http://ldtp.freedesktop.org For information on various APIs in LDTP including those added for this release can be got from http://ldtp.freedesktop.org/user-doc/index.html Java doc - http://ldtp.freedesktop.org/javadoc/ Report bugs - http://ldtp.freedesktop.org/wiki/Bugs To subscribe to LDTP mailing lists, visit http://ldtp.freedesktop.org/wiki/Mailing_20list IRC Channel - #ldtp on irc.freenode.net Thanks Nagappan -- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org Cobra - Windows GUI Automation tool - https://github.com/ldtp/cobra http://nagappanal.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From nagappan at gmail.com Fri Aug 3 21:09:04 2012 From: nagappan at gmail.com (Nagappan Alagappan) Date: Fri, 3 Aug 2012 12:09:04 -0700 Subject: [Baypiggies] Announce: LDTP 3.0 - Linux GUI test automation tool Message-ID: Hello, Highlights: * Java / C# / VB.NET / PowerShell / Ruby are now officially supported LDTP scripting languages other than Python New Features: * Firefox have check / uncheck as actions for check box New APIs: * selectpanel * selectpanelname * selectpanelindex Bug fix: * Simplified the implementation verifyselect for combobox menuitem * Fix QT related accessibility issue * Bug#673931 - Python-ldtp has issues if the application calls an env or other program to run Credit: * Ubuntu QA team members (Dave Morley, Ara Pulido) * VMware desktop QA team members * Kartik Mistry (Debian package maintainer) * Thanks to all others who have reported bugs through forum / email / in-person / IRC About LDTP: Cross Platform GUI Automation tool Linux version is LDTP, Windows version is Cobra and Mac version is PyATOM (Work in progress). * Linux version is known to work on GNOME / KDE (QT >= 4.8) / Java Swing / LibreOffice / Mozilla application on all major Linux distribution. * Windows version is known to work on application written in .NET / C++ / Java / QT on Windows XP SP3 / Windows 7 / Windows 8 development version. * Mac version is currently under development and verified only on OS X Lion. Where ever PyATOM runs, LDTP should work on it. Download source: https://github.com/ldtp/ldtp2 Download binary (RPM / DEB): http://download.opensuse.org/repositories/home:/anagappan:/ldtp2:/ Documentation references: For detailed information on LDTP framework and latest updates visit http://ldtp.freedesktop.org For information on various APIs in LDTP including those added for this release can be got from http://ldtp.freedesktop.org/user-doc/index.html Java doc - http://ldtp.freedesktop.org/javadoc/ Report bugs - http://ldtp.freedesktop.org/wiki/Bugs To subscribe to LDTP mailing lists, visit http://ldtp.freedesktop.org/wiki/Mailing_20list IRC Channel - #ldtp on irc.freenode.net Thanks Nagappan -- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org Cobra - Windows GUI Automation tool - https://github.com/ldtp/cobra http://nagappanal.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From alexmiroslav at gmail.com Fri Aug 10 19:19:21 2012 From: alexmiroslav at gmail.com (Aleksandr Miroslav) Date: Fri, 10 Aug 2012 13:19:21 -0400 Subject: [Baypiggies] padding variable assignments, why is it bad? Message-ID: (Reading this email requires a monospaced font.) I do this a lot in my code: foo = 1 foo_bar = 2 foo_bar_quux = 3 but pep8, which I started using recently, considers this wrong, so I have to rewrite to the more common form: foo = 1 foo_bar = 2 foo_bar_quux = 3 which I think sacrifices readability. Perhaps this is the n00b in me talking, but why is this considered bad? From david.berthelot at gmail.com Fri Aug 10 19:37:08 2012 From: david.berthelot at gmail.com (David Berthelot) Date: Fri, 10 Aug 2012 10:37:08 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: Message-ID: Yes, I share this habit, I find it especially readable when writing data models in SQLAlchemy. Me too, I'd like to know why it is a bad thing. On Fri, Aug 10, 2012 at 10:19 AM, Aleksandr Miroslav wrote: > (Reading this email requires a monospaced font.) > > I do this a lot in my code: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > but pep8, which I started using recently, considers this wrong, so I > have to rewrite to the more common form: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > which I think sacrifices readability. Perhaps this is the n00b in me > talking, but why is this considered bad? > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies From bitsink at gmail.com Fri Aug 10 19:38:17 2012 From: bitsink at gmail.com (Nam Nguyen) Date: Fri, 10 Aug 2012 10:38:17 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: Message-ID: PEP 8 also says (quoted as-is, with original misspellings): When in doubt, use your best judgment So, it's okay if you find that spaces help you in reading code. Make sure to keep it consistent in the same module. Nam On Fri, Aug 10, 2012 at 10:19 AM, Aleksandr Miroslav wrote: > (Reading this email requires a monospaced font.) > > I do this a lot in my code: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > but pep8, which I started using recently, considers this wrong, so I > have to rewrite to the more common form: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > which I think sacrifices readability. Perhaps this is the n00b in me > talking, but why is this considered bad? > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies From hjtoi at comcast.net Fri Aug 10 20:00:07 2012 From: hjtoi at comcast.net (Heikki Toivonen) Date: Fri, 10 Aug 2012 11:00:07 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: Message-ID: <8bde8660-eedc-4b39-8a74-9475c6a86e0e@email.android.com> With padding you may be required to change all of those lines when you add a new variable. More work, and messes around with source control system's ability to show who added those lines and why. Nam Nguyen wrote: >PEP 8 also says (quoted as-is, with original misspellings): > > When in doubt, use your best judgment > >So, it's okay if you find that spaces help you in reading code. Make >sure to keep it consistent in the same module. > >Nam > > >On Fri, Aug 10, 2012 at 10:19 AM, Aleksandr Miroslav > wrote: >> (Reading this email requires a monospaced font.) >> >> I do this a lot in my code: >> >> foo = 1 >> foo_bar = 2 >> foo_bar_quux = 3 >> >> but pep8, which I started using recently, considers this wrong, so I >> have to rewrite to the more common form: >> >> foo = 1 >> foo_bar = 2 >> foo_bar_quux = 3 >> >> which I think sacrifices readability. Perhaps this is the n00b in me >> talking, but why is this considered bad? >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> http://mail.python.org/mailman/listinfo/baypiggies >_______________________________________________ >Baypiggies mailing list >Baypiggies at python.org >To change your subscription options or unsubscribe: >http://mail.python.org/mailman/listinfo/baypiggies -- Sent from my Android phone with K-9. Please excuse my brevity. From oubiwann at twistedmatrix.com Fri Aug 10 20:16:35 2012 From: oubiwann at twistedmatrix.com (Duncan McGreggor) Date: Fri, 10 Aug 2012 11:16:35 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: <8bde8660-eedc-4b39-8a74-9475c6a86e0e@email.android.com> References: <8bde8660-eedc-4b39-8a74-9475c6a86e0e@email.android.com> Message-ID: Yeah, I have spent HOURS fixing the spacing in files that did that due to having to add a slew of new variables. It's useless, meaningless work and it always makes me crazy to have to do it. d On Fri, Aug 10, 2012 at 11:00 AM, Heikki Toivonen wrote: > With padding you may be required to change all of those lines when you add > a new variable. More work, and messes around with source control system's > ability to show who added those lines and why. > > Nam Nguyen wrote: > > >PEP 8 also says (quoted as-is, with original misspellings): > > > > When in doubt, use your best judgment > > > >So, it's okay if you find that spaces help you in reading code. Make > >sure to keep it consistent in the same module. > > > >Nam > > > > > >On Fri, Aug 10, 2012 at 10:19 AM, Aleksandr Miroslav > > wrote: > >> (Reading this email requires a monospaced font.) > >> > >> I do this a lot in my code: > >> > >> foo = 1 > >> foo_bar = 2 > >> foo_bar_quux = 3 > >> > >> but pep8, which I started using recently, considers this wrong, so I > >> have to rewrite to the more common form: > >> > >> foo = 1 > >> foo_bar = 2 > >> foo_bar_quux = 3 > >> > >> which I think sacrifices readability. Perhaps this is the n00b in me > >> talking, but why is this considered bad? > >> _______________________________________________ > >> Baypiggies mailing list > >> Baypiggies at python.org > >> To change your subscription options or unsubscribe: > >> http://mail.python.org/mailman/listinfo/baypiggies > >_______________________________________________ > >Baypiggies mailing list > >Baypiggies at python.org > >To change your subscription options or unsubscribe: > >http://mail.python.org/mailman/listinfo/baypiggies > > -- > Sent from my Android phone with K-9. Please excuse my brevity. > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From max at theslimmers.net Fri Aug 10 20:31:04 2012 From: max at theslimmers.net (Max Slimmer) Date: Fri, 10 Aug 2012 11:31:04 -0700 Subject: [Baypiggies] Windows service, Multiple instances Message-ID: I have a windows service that I would like to install multiple instances of on a single machine. Is there a way to change the service name/description without changing it in the source. I use py2exe to build the self installing module, following is the wrapper code which currently defines the name: class TCLAgentSvc(win32serviceutil.ServiceFramework): _svc_name_ = 'TimeCardAgent' _svc_display_name_ ='TCL Agent Service' def __init__(self, args): win32serviceutil.ServiceFramework.__init__(self, args) self.hWaitStop = win32event.CreateEvent(None, 0, 0, None) def SvcStop(self): self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING) sys.stopservice = "true" win32event.SetEvent(self.hWaitStop) def SvcDoRun(self): #runAsService() a = TCLAgent.AGENT() Thanks, max From tungwaiyip at yahoo.com Fri Aug 10 21:01:12 2012 From: tungwaiyip at yahoo.com (Wai Yip Tung) Date: Fri, 10 Aug 2012 12:01:12 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: Message-ID: <50255A78.40609@yahoo.com> Imagine your have some code like this row.name = encode(src.get('name'), 'xmlref') row.description = encode(src.get('description'), 'xmlref') row.enabled = encode(src.get('enabled'), 'xmlref') row.last_access = encode(src.get('last_access'), 'xmlref') This looks a mumbo jumbo lines of code. However by aligning them into columns, the pattern become immediately obvious. row.name = encode(src.get('name'), 'xmlref') row.description = encode(src.get('description'), 'xmlref') row.enabled = encode(src.get('enabled'), 'xmlref') row.last_access = encode(src.get('last_access'), 'xmlref') It is clear that the code is applying similar operation on 4 items. It is a lot easier to tell which of the 4 elements and if you should include more or less into the list. It is a huge visualization improvement. PEP-8's suggestion on this is not a good one in my opinion. The down side is it takes some effort to keep it neat and tidy. Of course I have editor macro that does that. I think every decent text editor should have some function to help people to align things. Wai Yip > Aleksandr Miroslav > Friday, August 10, 2012 10:19 AM > (Reading this email requires a monospaced font.) > > I do this a lot in my code: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > but pep8, which I started using recently, considers this wrong, so I > have to rewrite to the more common form: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > which I think sacrifices readability. Perhaps this is the n00b in me > talking, but why is this considered bad? > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: compose-unknown-contact.jpg Type: image/jpeg Size: 770 bytes Desc: not available URL: From jonkalb at a9.com Fri Aug 10 21:13:53 2012 From: jonkalb at a9.com (Kalb, Jon) Date: Fri, 10 Aug 2012 12:13:53 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: <50255A78.40609@yahoo.com> Message-ID: Imagine that I'm trying to do research in the source code repository on how, when, and who modified "last_access." I see that a change was made to the the last line in your example, but after wasting some of my time investigating it, I discover that the only reason the line was touched was because a new member with a long name was added and that caused this line to be touched to change its white space. Treating lines of code independently has important advantages when "diff"ing and tracing changes throw source code repositories. From: Wai Yip Tung > Date: Friday, August 10, 2012 12:01 PM To: "baypiggies at python.org" > Subject: Re: [Baypiggies] padding variable assignments, why is it bad? Imagine your have some code like this row.name = encode(src.get('name'), 'xmlref') row.description = encode(src.get('description'), 'xmlref') row.enabled = encode(src.get('enabled'), 'xmlref') row.last_access = encode(src.get('last_access'), 'xmlref') This looks a mumbo jumbo lines of code. However by aligning them into columns, the pattern become immediately obvious. row.name = encode(src.get('name'), 'xmlref') row.description = encode(src.get('description'), 'xmlref') row.enabled = encode(src.get('enabled'), 'xmlref') row.last_access = encode(src.get('last_access'), 'xmlref') It is clear that the code is applying similar operation on 4 items. It is a lot easier to tell which of the 4 elements and if you should include more or less into the list. It is a huge visualization improvement. PEP-8's suggestion on this is not a good one in my opinion. The down side is it takes some effort to keep it neat and tidy. Of course I have editor macro that does that. I think every decent text editor should have some function to help people to align things. Wai Yip [cid:part1.06070707.07080708 at yahoo.com] Aleksandr Miroslav Friday, August 10, 2012 10:19 AM (Reading this email requires a monospaced font.) I do this a lot in my code: foo = 1 foo_bar = 2 foo_bar_quux = 3 but pep8, which I started using recently, considers this wrong, so I have to rewrite to the more common form: foo = 1 foo_bar = 2 foo_bar_quux = 3 which I think sacrifices readability. Perhaps this is the n00b in me talking, but why is this considered bad? _______________________________________________ Baypiggies mailing list Baypiggies at python.org To change your subscription options or unsubscribe: http://mail.python.org/mailman/listinfo/baypiggies -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: compose-unknown-contact.jpg Type: image/jpeg Size: 770 bytes Desc: compose-unknown-contact.jpg URL: From simeonf at gmail.com Fri Aug 10 21:23:40 2012 From: simeonf at gmail.com (Simeon Franklin) Date: Fri, 10 Aug 2012 12:23:40 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: <50255A78.40609@yahoo.com> References: <50255A78.40609@yahoo.com> Message-ID: On Fri, Aug 10, 2012 at 12:01 PM, Wai Yip Tung wrote: > Imagine your have some code like this > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > This looks a mumbo jumbo lines of code. > I tend to think that repetition like that in my code indicates code that can be refactored rather than just spaced better. Eg: >>> for name in ['name', 'description', 'enabled', 'last_access']: >>> setattr(row, name, encode(src.get(name), 'xmlref') which makes it even more obvious that what is happening is the same thing repeated over a list of names... -regards Simeon Franklin -------------- next part -------------- An HTML attachment was scrubbed... URL: From tungwaiyip at yahoo.com Fri Aug 10 21:22:44 2012 From: tungwaiyip at yahoo.com (Wai Yip Tung) Date: Fri, 10 Aug 2012 12:22:44 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: Message-ID: <50255F84.8080701@yahoo.com> I definitely place high priority to keep the code readable than to keep the source control history neat. Lot more time and people will be reading code than researching the source code history. Overly obsess about source history hygiene may not be the best thing. Wai Yip > Kalb, Jon > Friday, August 10, 2012 12:13 PM > Imagine that I'm trying to do research in the source code repository > on how, when, and who modified "last_access." I see that a change was > made to the the last line in your example, but after wasting some of > my time investigating it, I discover that the only reason the line was > touched was because a new member with a long name was added and that > caused this line to be touched to change its white space. > > Treating lines of code independently has important advantages when > "diff"ing and tracing changes throw source code repositories. > > From: Wai Yip Tung > > Date: Friday, August 10, 2012 12:01 PM > To: "baypiggies at python.org " > > > Subject: Re: [Baypiggies] padding variable assignments, why is it bad? > > Imagine your have some code like this > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > This looks a mumbo jumbo lines of code. > > However by aligning them into columns, the pattern become immediately > obvious. > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > It is clear that the code is applying similar operation on 4 items. It > is a lot easier to tell which of the 4 elements and if you should > include more or less into the list. It is a huge visualization > improvement. PEP-8's suggestion on this is not a good one in my opinion. > > The down side is it takes some effort to keep it neat and tidy. Of > course I have editor macro that does that. I think every decent text > editor should have some function to help people to align things. > > Wai Yip > > > > > Wai Yip Tung > Friday, August 10, 2012 12:01 PM > Imagine your have some code like this > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > This looks a mumbo jumbo lines of code. > > However by aligning them into columns, the pattern become immediately > obvious. > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > It is clear that the code is applying similar operation on 4 items. It > is a lot easier to tell which of the 4 elements and if you should > include more or less into the list. It is a huge visualization > improvement. PEP-8's suggestion on this is not a good one in my opinion. > > The down side is it takes some effort to keep it neat and tidy. Of > course I have editor macro that does that. I think every decent text > editor should have some function to help people to align things. > > Wai Yip > > > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: compose-unknown-contact.jpg Type: image/jpeg Size: 770 bytes Desc: not available URL: From mvoorhie at yahoo.com Fri Aug 10 21:46:55 2012 From: mvoorhie at yahoo.com (Mark Voorhies) Date: Fri, 10 Aug 2012 12:46:55 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: <50255F84.8080701@yahoo.com> References: <50255F84.8080701@yahoo.com> Message-ID: <5025652F.90100@yahoo.com> On 08/10/2012 12:22 PM, Wai Yip Tung wrote: > I definitely place high priority to keep the code readable than to keep the > source control history neat. Lot more time and people will be reading code than > researching the source code history. Overly obsess about source history hygiene > may not be the best thing. > > Wai Yip For large projects, I actually find that the history (e.g., viewed with gitk) is the easiest place to orient myself and that, when I do start reading the source itself, it's really useful to apply history-based highlighting (e.g., with vc-annotate in emacs, a.k.a. "red bugs mode"). In the rare cases where formatting gets in the way of readability, it's easy to generate a local copy with my preferred formatting. The opposite (stripping line noise from an existing history) is much harder. With the growth of GitHub, Google code, etc., I think that "vcs as primary view" is becoming increasingly common. --Mark > >> Kalb, Jon >> Friday, August 10, 2012 12:13 PM >> Imagine that I'm trying to do research in the source code repository on how, >> when, and who modified "last_access." I see that a change was made to the the >> last line in your example, but after wasting some of my time investigating it, >> I discover that the only reason the line was touched was because a new member >> with a long name was added and that caused this line to be touched to change >> its white space. >> >> Treating lines of code independently has important advantages when "diff"ing >> and tracing changes throw source code repositories. >> >> From: Wai Yip Tung > >> Date: Friday, August 10, 2012 12:01 PM >> To: "baypiggies at python.org " >> > >> Subject: Re: [Baypiggies] padding variable assignments, why is it bad? >> >> Imagine your have some code like this >> >> row.name = encode(src.get('name'), 'xmlref') >> row.description = encode(src.get('description'), 'xmlref') >> row.enabled = encode(src.get('enabled'), 'xmlref') >> row.last_access = encode(src.get('last_access'), 'xmlref') >> >> This looks a mumbo jumbo lines of code. >> >> However by aligning them into columns, the pattern become immediately obvious. >> >> row.name = encode(src.get('name'), 'xmlref') >> row.description = encode(src.get('description'), 'xmlref') >> row.enabled = encode(src.get('enabled'), 'xmlref') >> row.last_access = encode(src.get('last_access'), 'xmlref') >> >> It is clear that the code is applying similar operation on 4 items. It is a >> lot easier to tell which of the 4 elements and if you should include more or >> less into the list. It is a huge visualization improvement. PEP-8's suggestion >> on this is not a good one in my opinion. >> >> The down side is it takes some effort to keep it neat and tidy. Of course I >> have editor macro that does that. I think every decent text editor should have >> some function to help people to align things. >> >> Wai Yip >> >> >> >> >> Wai Yip Tung >> Friday, August 10, 2012 12:01 PM >> Imagine your have some code like this >> >> row.name = encode(src.get('name'), 'xmlref') >> row.description = encode(src.get('description'), 'xmlref') >> row.enabled = encode(src.get('enabled'), 'xmlref') >> row.last_access = encode(src.get('last_access'), 'xmlref') >> >> This looks a mumbo jumbo lines of code. >> >> However by aligning them into columns, the pattern become immediately obvious. >> >> row.name = encode(src.get('name'), 'xmlref') >> row.description = encode(src.get('description'), 'xmlref') >> row.enabled = encode(src.get('enabled'), 'xmlref') >> row.last_access = encode(src.get('last_access'), 'xmlref') >> >> It is clear that the code is applying similar operation on 4 items. It is a >> lot easier to tell which of the 4 elements and if you should include more or >> less into the list. It is a huge visualization improvement. PEP-8's suggestion >> on this is not a good one in my opinion. >> >> The down side is it takes some effort to keep it neat and tidy. Of course I >> have editor macro that does that. I think every decent text editor should have >> some function to help people to align things. >> >> Wai Yip >> >> >> >> >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> http://mail.python.org/mailman/listinfo/baypiggies > > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > From oubiwann at twistedmatrix.com Fri Aug 10 23:34:39 2012 From: oubiwann at twistedmatrix.com (Duncan McGreggor) Date: Fri, 10 Aug 2012 14:34:39 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: <50255A78.40609@yahoo.com> References: <50255A78.40609@yahoo.com> Message-ID: On Fri, Aug 10, 2012 at 12:01 PM, Wai Yip Tung wrote: > Imagine your have some code like this > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > This looks a mumbo jumbo lines of code. > > However by aligning them into columns, the pattern become immediately > obvious. > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > It is clear that the code is applying similar operation on 4 items. It is > a lot easier to tell which of the 4 elements and if you should include more > or less into the list. It is a huge visualization improvement. PEP-8's > suggestion on this is not a good one in my opinion. > > The down side is it takes some effort to keep it neat and tidy. Of course > I have editor macro that does that. I think every decent text editor should > have some function to help people to align things. > > Wai Yip > > In addition to the other problems with this, you have another problem: you've now got a separate coding standard for variables than you do for other code blocks. White space in Python is syntactically meaningful *initially* not in the middle or the end. You've just made it meaningful (and dependent upon the length of the longest variable name) *medially* and that's not Python. I actually find code that is column-aligned like that to be highly distracting. I find regular, PEP-8 code to be much more highly readable. And there was a time in the 90s when I was writing column aligned variables (for a short while!). Readability at the level of white space is simply a matter of getting used to (people that hate it enough usually don't end up using Python, when given the choice). d -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.berthelot at gmail.com Fri Aug 10 23:52:00 2012 From: david.berthelot at gmail.com (David Berthelot) Date: Fri, 10 Aug 2012 14:52:00 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: <50255A78.40609@yahoo.com> Message-ID: So far I only read 1 pro, 1 con: pro: readability (aligned variables make it clear) con: vcs history can get confusing when looking for who changed a line So may be it's time for vcs tools to evolve and become language aware. Readability was historically pythonic otherwise why rely on indentation instead of curly braces ? On Fri, Aug 10, 2012 at 2:34 PM, Duncan McGreggor wrote: > > On Fri, Aug 10, 2012 at 12:01 PM, Wai Yip Tung wrote: >> >> Imagine your have some code like this >> >> row.name = encode(src.get('name'), 'xmlref') >> row.description = encode(src.get('description'), 'xmlref') >> row.enabled = encode(src.get('enabled'), 'xmlref') >> row.last_access = encode(src.get('last_access'), 'xmlref') >> >> This looks a mumbo jumbo lines of code. >> >> However by aligning them into columns, the pattern become immediately >> obvious. >> >> row.name = encode(src.get('name'), 'xmlref') >> row.description = encode(src.get('description'), 'xmlref') >> row.enabled = encode(src.get('enabled'), 'xmlref') >> row.last_access = encode(src.get('last_access'), 'xmlref') >> >> It is clear that the code is applying similar operation on 4 items. It is >> a lot easier to tell which of the 4 elements and if you should include more >> or less into the list. It is a huge visualization improvement. PEP-8's >> suggestion on this is not a good one in my opinion. >> >> The down side is it takes some effort to keep it neat and tidy. Of course >> I have editor macro that does that. I think every decent text editor should >> have some function to help people to align things. >> >> Wai Yip >> > > In addition to the other problems with this, you have another problem: > you've now got a separate coding standard for variables than you do for > other code blocks. White space in Python is syntactically meaningful > *initially* not in the middle or the end. You've just made it meaningful > (and dependent upon the length of the longest variable name) *medially* and > that's not Python. > > I actually find code that is column-aligned like that to be highly > distracting. I find regular, PEP-8 code to be much more highly readable. And > there was a time in the 90s when I was writing column aligned variables (for > a short while!). Readability at the level of white space is simply a matter > of getting used to (people that hate it enough usually don't end up using > Python, when given the choice). > > d > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies From aahz at pythoncraft.com Sat Aug 11 00:27:41 2012 From: aahz at pythoncraft.com (Aahz) Date: Fri, 10 Aug 2012 15:27:41 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: Message-ID: <20120810222741.GA5781@panix.com> On Fri, Aug 10, 2012, Aleksandr Miroslav wrote: > > I do this a lot in my code: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > but pep8, which I started using recently, considers this wrong, so I > have to rewrite to the more common form: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > which I think sacrifices readability. Perhaps this is the n00b in me > talking, but why is this considered bad? You're promoting a tactical view of code readability rather than strategic. I find this style much more difficult to read over larger blocks of code with multiple levels of indentation. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ The difference between "intelligence" and "wisdom": Londo and G'Kar From oubiwann at twistedmatrix.com Sat Aug 11 00:52:49 2012 From: oubiwann at twistedmatrix.com (Duncan McGreggor) Date: Fri, 10 Aug 2012 15:52:49 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: <50255A78.40609@yahoo.com> Message-ID: On Fri, Aug 10, 2012 at 2:52 PM, David Berthelot wrote: > So far I only read 1 pro, 1 con: > pro: readability (aligned variables make it clear) > con: vcs history can get confusing when looking for who changed a line > > So may be it's time for vcs tools to evolve and become language aware. > Readability was historically pythonic otherwise why rely on > indentation instead of curly braces ? > But readability means different things to different people. Python is highly readable for me due to the initial white space for indented code blocks. Reading something like this is not highly readable for me. Though I could certainly imagine that it would be for some folks... different tastes and all that. Code blocks help define scope visually. Column-aligned code does not serve the same purpose. When I read a list of variables, I get no additional information from the spacing of them. I also don't read variables vertically. I read them like I do English, from left to right. Large gaps of white space between the "words" is much less readable *for me* ;-) d > > On Fri, Aug 10, 2012 at 2:34 PM, Duncan McGreggor > wrote: > > > > On Fri, Aug 10, 2012 at 12:01 PM, Wai Yip Tung > wrote: > >> > >> Imagine your have some code like this > >> > >> row.name = encode(src.get('name'), 'xmlref') > >> row.description = encode(src.get('description'), 'xmlref') > >> row.enabled = encode(src.get('enabled'), 'xmlref') > >> row.last_access = encode(src.get('last_access'), 'xmlref') > >> > >> This looks a mumbo jumbo lines of code. > >> > >> However by aligning them into columns, the pattern become immediately > >> obvious. > >> > >> row.name = encode(src.get('name'), 'xmlref') > >> row.description = encode(src.get('description'), 'xmlref') > >> row.enabled = encode(src.get('enabled'), 'xmlref') > >> row.last_access = encode(src.get('last_access'), 'xmlref') > >> > >> It is clear that the code is applying similar operation on 4 items. It > is > >> a lot easier to tell which of the 4 elements and if you should include > more > >> or less into the list. It is a huge visualization improvement. PEP-8's > >> suggestion on this is not a good one in my opinion. > >> > >> The down side is it takes some effort to keep it neat and tidy. Of > course > >> I have editor macro that does that. I think every decent text editor > should > >> have some function to help people to align things. > >> > >> Wai Yip > >> > > > > In addition to the other problems with this, you have another problem: > > you've now got a separate coding standard for variables than you do for > > other code blocks. White space in Python is syntactically meaningful > > *initially* not in the middle or the end. You've just made it meaningful > > (and dependent upon the length of the longest variable name) *medially* > and > > that's not Python. > > > > I actually find code that is column-aligned like that to be highly > > distracting. I find regular, PEP-8 code to be much more highly readable. > And > > there was a time in the 90s when I was writing column aligned variables > (for > > a short while!). Readability at the level of white space is simply a > matter > > of getting used to (people that hate it enough usually don't end up using > > Python, when given the choice). > > > > d > > > > _______________________________________________ > > Baypiggies mailing list > > Baypiggies at python.org > > To change your subscription options or unsubscribe: > > http://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From dave at krondo.com Sat Aug 11 00:59:05 2012 From: dave at krondo.com (Dave Peticolas) Date: Fri, 10 Aug 2012 15:59:05 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: <50255A78.40609@yahoo.com> Message-ID: 2012/8/10 Duncan McGreggor > > > On Fri, Aug 10, 2012 at 2:52 PM, David Berthelot < > david.berthelot at gmail.com> wrote: > >> So far I only read 1 pro, 1 con: >> pro: readability (aligned variables make it clear) >> con: vcs history can get confusing when looking for who changed a line >> >> So may be it's time for vcs tools to evolve and become language aware. >> Readability was historically pythonic otherwise why rely on >> indentation instead of curly braces ? >> > > > But readability means different things to different people. Python is > highly readable for me due to the initial white space for indented code > blocks. > > Reading something like > this is not highly > readable for me. > > Though I could certainly imagine that it would be for some folks... > different tastes and all that. > > Code blocks help define scope visually. Column-aligned code does not serve > the same purpose. When I read a list of variables, I get no additional > information from the spacing of them. I also don't read variables > vertically. I read them like I do English, from left to right. Large gaps > of white space between the "words" is much less readable *for me* ;-) > Agreed! And, for that same reason, I think one of the (few) places where column-aligned assignments makes is when you are defining, say, a set of enumerated constants where the specific mapping of names to numbers is less important than the fact that they are all different. Aligning the values in a column highlights that fact and makes it easy to see what the next constant should be. But for most assignments it is is the left-to-right relationship that is more important and column-alignment obscures that, I think. > d > > >> >> On Fri, Aug 10, 2012 at 2:34 PM, Duncan McGreggor >> wrote: >> > >> > On Fri, Aug 10, 2012 at 12:01 PM, Wai Yip Tung >> wrote: >> >> >> >> Imagine your have some code like this >> >> >> >> row.name = encode(src.get('name'), 'xmlref') >> >> row.description = encode(src.get('description'), 'xmlref') >> >> row.enabled = encode(src.get('enabled'), 'xmlref') >> >> row.last_access = encode(src.get('last_access'), 'xmlref') >> >> >> >> This looks a mumbo jumbo lines of code. >> >> >> >> However by aligning them into columns, the pattern become immediately >> >> obvious. >> >> >> >> row.name = encode(src.get('name'), 'xmlref') >> >> row.description = encode(src.get('description'), 'xmlref') >> >> row.enabled = encode(src.get('enabled'), 'xmlref') >> >> row.last_access = encode(src.get('last_access'), 'xmlref') >> >> >> >> It is clear that the code is applying similar operation on 4 items. It >> is >> >> a lot easier to tell which of the 4 elements and if you should include >> more >> >> or less into the list. It is a huge visualization improvement. PEP-8's >> >> suggestion on this is not a good one in my opinion. >> >> >> >> The down side is it takes some effort to keep it neat and tidy. Of >> course >> >> I have editor macro that does that. I think every decent text editor >> should >> >> have some function to help people to align things. >> >> >> >> Wai Yip >> >> >> > >> > In addition to the other problems with this, you have another problem: >> > you've now got a separate coding standard for variables than you do for >> > other code blocks. White space in Python is syntactically meaningful >> > *initially* not in the middle or the end. You've just made it meaningful >> > (and dependent upon the length of the longest variable name) *medially* >> and >> > that's not Python. >> > >> > I actually find code that is column-aligned like that to be highly >> > distracting. I find regular, PEP-8 code to be much more highly >> readable. And >> > there was a time in the 90s when I was writing column aligned variables >> (for >> > a short while!). Readability at the level of white space is simply a >> matter >> > of getting used to (people that hate it enough usually don't end up >> using >> > Python, when given the choice). >> > >> > d >> > >> > _______________________________________________ >> > Baypiggies mailing list >> > Baypiggies at python.org >> > To change your subscription options or unsubscribe: >> > http://mail.python.org/mailman/listinfo/baypiggies >> > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tungwaiyip at yahoo.com Sat Aug 11 01:50:44 2012 From: tungwaiyip at yahoo.com (Wai Yip Tung) Date: Fri, 10 Aug 2012 16:50:44 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: <50255A78.40609@yahoo.com> References: <50255A78.40609@yahoo.com> Message-ID: <50259E54.3010102@yahoo.com> Here a few more examples in Python's standard library to show how properly aligned can enhance readability. http://hg.python.org/cpython/file/e7a67f1bf604/Lib/base64.py#l176 http://hg.python.org/cpython/file/e7a67f1bf604/Lib/inspect.py#l210 This is a pretty common format to align comments on the right hand side. You will find lots of examples. It should be easy to conclude the comments are more readable if aligned. In fact I'd say the code will be unreadable if the comment are not aligned. Yet this format require the same effort to keep neat and tidy and can introduce diff in source code history some of you object to. http://hg.python.org/cpython/file/e7a67f1bf604/Lib/imaplib.py#l44 It is very helpful to keep columns aligned when you define a large block of data. http://hg.python.org/cpython/file/e7a67f1bf604/Lib/pickle.py#l100 This is a direct violation of PEP-8. But this is so much nicer to scan the code to do a reverse lookup. http://hg.python.org/cpython/file/e7a67f1bf604/Lib/pstats.py#l158 Since PEP-8 does not cover dictionary literals, you tend to find lot more examples of people aligning dictionary key names than assignment statement. But the two are functionally very similar. Javascript can even use one as an alternative style of the other. Obviously people find value in this format to apply the extra effort to align them. I guess I have make justification for this style and I encourage your judgement rather than feeling compel by a style guide. And get a good editor. It is not only helpful in writing code. Sometimes you find CSV file and things become immediately clearer if only you can align the columns. Wai Yip From tungwaiyip at yahoo.com Sat Aug 11 02:05:07 2012 From: tungwaiyip at yahoo.com (Wai Yip Tung) Date: Fri, 10 Aug 2012 17:05:07 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: <50255A78.40609@yahoo.com> Message-ID: <5025A1B3.3000505@yahoo.com> The more accurate way to say this is Python uses indentation level to determine block structure. Except at the beginning of a logical line, whitespace characters can be used to separate tokens, not defining block structure. It isn't me applying different syntax rule. That's how the language is defined. Wai Yip > In addition to the other problems with this, you have another problem: > you've now got a separate coding standard for variables than you do > for other code blocks. White space in Python is syntactically > meaningful *initially* not in the middle or the end. You've just made > it meaningful (and dependent upon the length of the longest variable > name) *medially* and that's not Python. > > I actually find code that is column-aligned like that to be highly > distracting. I find regular, PEP-8 code to be much more highly > readable. And there was a time in the 90s when I was writing column > aligned variables (for a short while!). Readability at the level of > white space is simply a matter of getting used to (people that hate it > enough usually don't end up using Python, when given the choice). > > d > Wai Yip Tung > Friday, August 10, 2012 12:01 PM > Imagine your have some code like this > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > This looks a mumbo jumbo lines of code. > > However by aligning them into columns, the pattern become immediately > obvious. > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > It is clear that the code is applying similar operation on 4 items. It > is a lot easier to tell which of the 4 elements and if you should > include more or less into the list. It is a huge visualization > improvement. PEP-8's suggestion on this is not a good one in my opinion. > > The down side is it takes some effort to keep it neat and tidy. Of > course I have editor macro that does that. I think every decent text > editor should have some function to help people to align things. > > Wai Yip > > > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > Aleksandr Miroslav > Friday, August 10, 2012 10:19 AM > (Reading this email requires a monospaced font.) > > I do this a lot in my code: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > but pep8, which I started using recently, considers this wrong, so I > have to rewrite to the more common form: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > which I think sacrifices readability. Perhaps this is the n00b in me > talking, but why is this considered bad? > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: compose-unknown-contact.jpg Type: image/jpeg Size: 770 bytes Desc: not available URL: From itz at buug.org Sat Aug 11 01:51:14 2012 From: itz at buug.org (Ian Zimmerman) Date: Fri, 10 Aug 2012 16:51:14 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: (Dave Peticolas's message of "Fri, 10 Aug 2012 15:59:05 -0700") References: <50255A78.40609@yahoo.com> Message-ID: <87628qxq4t.fsf@foolinux.dyndns.org> Slightly off topic, I believe the Ocaml style manual (written by Frenchmen, of course) calls this style "beastly" :-) -- Ian Zimmerman gpg public key: 1024D/C6FF61AD fingerprint: 66DC D68F 5C1B 4D71 2EE5 BD03 8A00 786C C6FF 61AD http://www.gravatar.com/avatar/c66875cda51109f76c6312f4d4743d1e.png Rule 420: All persons more than eight miles high to leave the court. From david.berthelot at gmail.com Sat Aug 11 02:40:05 2012 From: david.berthelot at gmail.com (David Berthelot) Date: Fri, 10 Aug 2012 17:40:05 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: <5025A1B3.3000505@yahoo.com> References: <50255A78.40609@yahoo.com> <5025A1B3.3000505@yahoo.com> Message-ID: Actually these are some very good examples on how space alignment can help the code readability. I think your examples are really convincing. On Fri, Aug 10, 2012 at 5:05 PM, Wai Yip Tung wrote: > The more accurate way to say this is Python uses indentation level to > determine block structure. Except at the beginning of a logical line, whitespace > characters can be used to separate tokens, not defining block structure. > It isn't me applying different syntax rule. That's how the language is > defined. > > Wai Yip > > In addition to the other problems with this, you have another problem: > you've now got a separate coding standard for variables than you do for > other code blocks. White space in Python is syntactically meaningful > *initially* not in the middle or the end. You've just made it meaningful > (and dependent upon the length of the longest variable name) *medially* and > that's not Python. > > I actually find code that is column-aligned like that to be highly > distracting. I find regular, PEP-8 code to be much more highly readable. > And there was a time in the 90s when I was writing column aligned variables > (for a short while!). Readability at the level of white space is simply a > matter of getting used to (people that hate it enough usually don't end up > using Python, when given the choice). > > d > Wai Yip Tung > Friday, August 10, 2012 12:01 PM > Imagine your have some code like this > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > This looks a mumbo jumbo lines of code. > > However by aligning them into columns, the pattern become immediately > obvious. > > row.name = encode(src.get('name'), 'xmlref') > row.description = encode(src.get('description'), 'xmlref') > row.enabled = encode(src.get('enabled'), 'xmlref') > row.last_access = encode(src.get('last_access'), 'xmlref') > > It is clear that the code is applying similar operation on 4 items. It is > a lot easier to tell which of the 4 elements and if you should include more > or less into the list. It is a huge visualization improvement. PEP-8's > suggestion on this is not a good one in my opinion. > > The down side is it takes some effort to keep it neat and tidy. Of course > I have editor macro that does that. I think every decent text editor should > have some function to help people to align things. > > Wai Yip > > > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > Aleksandr Miroslav > Friday, August 10, 2012 10:19 AM > (Reading this email requires a monospaced font.) > > I do this a lot in my code: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > but pep8, which I started using recently, considers this wrong, so I > have to rewrite to the more common form: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > which I think sacrifices readability. Perhaps this is the n00b in me > talking, but why is this considered bad? > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: compose-unknown-contact.jpg Type: image/jpeg Size: 770 bytes Desc: not available URL: From guido at python.org Sat Aug 11 03:00:38 2012 From: guido at python.org (Guido van Rossum) Date: Fri, 10 Aug 2012 18:00:38 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: Message-ID: Ironically, the reason became obvious when I read your message in gmail. It was displayed in a variable-width font. :-) On Friday, August 10, 2012, Aleksandr Miroslav wrote: > (Reading this email requires a monospaced font.) > > I do this a lot in my code: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > but pep8, which I started using recently, considers this wrong, so I > have to rewrite to the more common form: > > foo = 1 > foo_bar = 2 > foo_bar_quux = 3 > > which I think sacrifices readability. Perhaps this is the n00b in me > talking, but why is this considered bad? > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -- --Guido van Rossum (python.org/~guido) -------------- next part -------------- An HTML attachment was scrubbed... URL: From p at ulmcnett.com Sat Aug 11 06:54:29 2012 From: p at ulmcnett.com (Paul McNett) Date: Fri, 10 Aug 2012 21:54:29 -0700 Subject: [Baypiggies] padding variable assignments, why is it bad? In-Reply-To: References: <50255A78.40609@yahoo.com> <5025A1B3.3000505@yahoo.com> Message-ID: <5025E585.3080409@ulmcnett.com> The only place I still try to line up columns is with sql statements, like: {{{ con = sqlite.connect(":memory:") cur = con.cursor() sql = """ select customers.name as cust_name, invoices.number as inv_num from customers inner join invoices on invoices.cust_id = customers.id where customers.id = ? """ cur.execute(sql, (cust_id,)) rs = cur.fetchall() }}} I used to be afflicted with the desire to line up almost everything horizontally, but over time I naturally stopped doing that, but it really is all about readability so do what is most readable to you, just be prepared for your definition of 'readable' to change over time. Paul From mtranby at enthought.com Mon Aug 13 19:08:04 2012 From: mtranby at enthought.com (Majken Tranby) Date: Mon, 13 Aug 2012 12:08:04 -0500 Subject: [Baypiggies] Python Training Class Message-ID: Hi Bay Piggies, Just wanted to remind you all that we are having an intensive Python Training Course in *San Jose, CA* from Aug 27-31. This is the last week to sign up, so please email info at enthought.com if you are interested! More information can be found here: http://www.enthought.com/training/open-courses.php If you would like to post this to your meetup page, I would appreciate that very much! Thank you, Majken -- ***Majken E. Tranby* *Enthought Inc* 515 Congress Avenue, Suite 2100 Austin, TX 78701 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappy2112 at gmail.com Thu Aug 16 05:13:02 2012 From: cappy2112 at gmail.com (Tony Cappellini) Date: Wed, 15 Aug 2012 20:13:02 -0700 Subject: [Baypiggies] Bitey Message-ID: Has anyone used bitey for writing extension modules in C? https://github.com/dabeaz/bitey -------------- next part -------------- An HTML attachment was scrubbed... URL: From bryceverdier at gmail.com Thu Aug 16 05:33:02 2012 From: bryceverdier at gmail.com (Bryce Verdier) Date: Wed, 15 Aug 2012 20:33:02 -0700 Subject: [Baypiggies] Bitey In-Reply-To: References: Message-ID: <502C69EE.7010303@gmail.com> I just found out about this late last week, so while I haven't had the chance to work with it, I think it's a really nifty idea. Bryce On 8/15/12 8:13 PM, Tony Cappellini wrote: > > > Has anyone used bitey for writing extension modules in C? > > https://github.com/dabeaz/bitey > > > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies -------------- next part -------------- An HTML attachment was scrubbed... URL: From glen at glenjarvis.com Fri Aug 17 02:36:34 2012 From: glen at glenjarvis.com (Glen Jarvis) Date: Thu, 16 Aug 2012 17:36:34 -0700 Subject: [Baypiggies] interfacing gdata.spreadsheet.service and oauth2client Message-ID: Has anyone tried to use the gdata.spreadsheet.service with Google's Oauth2? I have a service that I've written that uses gdata.spreadsheet.service. It used to use ProgrammaticLogin. I want to convert this to Oauth2. I thought there would be work already in this area by now. But, I'm not finding it. Has anyone else ran into this? Cheers, Glen -- "Pursue, keep up with, circle round and round your life as a dog does his master's chase. Do what you love. Know your own bone; gnaw at it, bury it, unearth it, and gnaw it still." --Henry David Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: From glen at glenjarvis.com Sun Aug 19 22:19:03 2012 From: glen at glenjarvis.com (Glen Jarvis) Date: Sun, 19 Aug 2012 13:19:03 -0700 Subject: [Baypiggies] interfacing gdata.spreadsheet.service and oauth2client In-Reply-To: References: Message-ID: I'm going to take another stab at this. I have written a program with a Google library called 'gdata.' When I wrote the program, it was a fairly small project and it was acceptable (although I didn't really like it) to put a username and a password in an external file and then read that file into the program and authenticate. This is how the gdata library seems to work (at least to the best of my knowledge (although I do think they support Oauth1 so I may have used that). Success brings it's own problems. I want to scale this program up many *many* times more than it's running now. Instead of a single gdata query running every six minutes or so, it now will run in bursts of 5K at a time. Possibly around 6K spread over an hour every hour. When seeing what would still work, the automatic program receives a "Captcha" assertion. I couldn't find what Google's limits were that caused this, but I received it just after a burst of 10 queries. Reading Google's online documentation, I need to use Oath2 for all of these services. Great! I like this -- especially the API console that's available to me (I'm using the Google Drive/Google Spreadsheet API). I have successfully used Google's oauth2client client library to authenticate and use Oauth2. However, my problem is that I can't stick these two libraries together. I don't see an easy way (or at least the designed way) to do this. I'm hoping that I'm missing something obvious and that I just need to learn how to interface with gdata better. It's a time crunch project (aren't they all) and so I really hadn't had the time to learn the gdata library well enough. Has anyone tried to stick these two libraries together? It seems something that I imagine many people are needing to do. Since I don't see a lot of Google responses/questions to this, I can only imagine I'm missing something painfully obvious and easy. So, for my second stab at asking, has anyone encountered this? Or, better yet, has anyone interface gdata with oauth2client python libraries? Cheers, Glen On Thu, Aug 16, 2012 at 5:36 PM, Glen Jarvis wrote: > Has anyone tried to use the gdata.spreadsheet.service with Google's Oauth2? > > I have a service that I've written that uses gdata.spreadsheet.service. It > used to use ProgrammaticLogin. I want to convert this to Oauth2. I thought > there would be work already in this area by now. But, I'm not finding it. > > Has anyone else ran into this? > > > Cheers, > > > Glen > -- > > "Pursue, keep up with, circle round and round your life as a dog does his > master's chase. Do what you love. Know your own bone; gnaw at it, bury it, > unearth it, and gnaw it still." > > --Henry David Thoreau > > -- "Pursue, keep up with, circle round and round your life as a dog does his master's chase. Do what you love. Know your own bone; gnaw at it, bury it, unearth it, and gnaw it still." --Henry David Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: From spmcinerney at hotmail.com Mon Aug 20 02:20:40 2012 From: spmcinerney at hotmail.com (Stephen McInerney) Date: Sun, 19 Aug 2012 17:20:40 -0700 Subject: [Baypiggies] August BayPIGgies meeting 8/23? Message-ID: Do we have a meeting on Thu 8/23? If yes who is the speaker and topic, if I missed that? baypiggies.net still says July, can it be updated? I have a newbie (non-programmer, finance guy) friend and wanted to mention it to him. In case there is nothing else planned, then one idea I'd had (and run by other people, most of whom seemed to respond favorably) was a stone-soup-like "Everyone pick a useful stdlib or third-party module and give an overview or idiom or favorite lesser-known feature" Stuff I could volunteer to do: - collections.NamedTuple, Counter (found a few serious gotchas in Counter recently) - idioms using csv (csv.DictRead is old and inflexible) good clean idioms for reading csv files, with headers; autoconverting by type; use a context handler; return each line as a new-style object with properties rather than dict/NamedTuple/sequence; - minor comments on when to use iterators vs generators (need pushback?, storing state, and explicit FSMs) a) use a generator instead of iterator if you want the ability to pushback b) use a generator rather than iterator if you find yourself needing to store state in the iterator example of the explicit FSM you would need to write if you do depth-first traversal of a tree - (anyone know a good idiom for reading a file backwards in Python? and why is it not in stdlib?) - I can do some BeautifulSoup/scraping/regex examples. Thought it would be a nice adjunct to Simeon's previous pandas talk, for escaping structured data (tables, etc.) directly off webpages. Reasonably robustly. - Frederik Lundh's snippet for HTML-unescaping, which is inexplicably not in stdlib - snippet: in re.sub(pattern, repl, ...),repl can be a function, not just a string Nothing profound, just a pot-pourri of useful stuff and stdlib caveats/tips. Regards, Stephen -------------- next part -------------- An HTML attachment was scrubbed... URL: From glen at glenjarvis.com Mon Aug 20 02:45:22 2012 From: glen at glenjarvis.com (Glen Jarvis) Date: Sun, 19 Aug 2012 17:45:22 -0700 Subject: [Baypiggies] interfacing gdata.spreadsheet.service and oauth2client In-Reply-To: References: Message-ID: I give.. I assume I'm going to have to write my own data type library (or hack the old one) so that I can do oath. If that's incredibly silly and already done, please someone stop me... G On Sun, Aug 19, 2012 at 1:19 PM, Glen Jarvis wrote: > I'm going to take another stab at this. I have written a program with a > Google library called 'gdata.' When I wrote the program, it was a fairly > small project and it was acceptable (although I didn't really like it) to > put a username and a password in an external file and then read that file > into the program and authenticate. This is how the gdata library seems to > work (at least to the best of my knowledge (although I do think they > support Oauth1 so I may have used that). > > Success brings it's own problems. I want to scale this program up many > *many* times more than it's running now. Instead of a single gdata query > running every six minutes or so, it now will run in bursts of 5K at a time. > Possibly around 6K spread over an hour every hour. > > When seeing what would still work, the automatic program receives a > "Captcha" assertion. I couldn't find what Google's limits were that caused > this, but I received it just after a burst of 10 queries. > > Reading Google's online documentation, I need to use Oath2 for all of > these services. Great! I like this -- especially the API console that's > available to me (I'm using the Google Drive/Google Spreadsheet API). I have > successfully used Google's oauth2client client library to authenticate and > use Oauth2. > > However, my problem is that I can't stick these two libraries together. I > don't see an easy way (or at least the designed way) to do this. I'm hoping > that I'm missing something obvious and that I just need to learn how to > interface with gdata better. It's a time crunch project (aren't they all) > and so I really hadn't had the time to learn the gdata library well enough. > > Has anyone tried to stick these two libraries together? It seems something > that I imagine many people are needing to do. Since I don't see a lot of > Google responses/questions to this, I can only imagine I'm missing > something painfully obvious and easy. > > So, for my second stab at asking, has anyone encountered this? Or, better > yet, has anyone interface gdata with oauth2client python libraries? > > > Cheers, > > > Glen > > > > On Thu, Aug 16, 2012 at 5:36 PM, Glen Jarvis wrote: > >> Has anyone tried to use the gdata.spreadsheet.service with Google's >> Oauth2? >> >> I have a service that I've written that uses gdata.spreadsheet.service. >> It used to use ProgrammaticLogin. I want to convert this to Oauth2. I >> thought there would be work already in this area by now. But, I'm not >> finding it. >> >> Has anyone else ran into this? >> >> >> Cheers, >> >> >> Glen >> -- >> >> "Pursue, keep up with, circle round and round your life as a dog does his >> master's chase. Do what you love. Know your own bone; gnaw at it, bury it, >> unearth it, and gnaw it still." >> >> --Henry David Thoreau >> >> > > > -- > > "Pursue, keep up with, circle round and round your life as a dog does his > master's chase. Do what you love. Know your own bone; gnaw at it, bury it, > unearth it, and gnaw it still." > > --Henry David Thoreau > > -- "Pursue, keep up with, circle round and round your life as a dog does his master's chase. Do what you love. Know your own bone; gnaw at it, bury it, unearth it, and gnaw it still." --Henry David Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: From aleax at google.com Wed Aug 22 19:31:58 2012 From: aleax at google.com (Alex Martelli) Date: Wed, 22 Aug 2012 10:31:58 -0700 Subject: [Baypiggies] interfacing gdata.spreadsheet.service and oauth2client In-Reply-To: References: Message-ID: Haven't checked it out, but doesn't http://googleappsdeveloper.blogspot.com/2011/09/python-oauth-20-google-data-apis.html help...? Alex On Sun, Aug 19, 2012 at 5:45 PM, Glen Jarvis wrote: > I give.. I assume I'm going to have to write my own data type library (or > hack the old one) so that I can do oath. If that's incredibly silly and > already done, please someone stop me... > > > G > > > On Sun, Aug 19, 2012 at 1:19 PM, Glen Jarvis wrote: >> >> I'm going to take another stab at this. I have written a program with a >> Google library called 'gdata.' When I wrote the program, it was a fairly >> small project and it was acceptable (although I didn't really like it) to >> put a username and a password in an external file and then read that file >> into the program and authenticate. This is how the gdata library seems to >> work (at least to the best of my knowledge (although I do think they support >> Oauth1 so I may have used that). >> >> Success brings it's own problems. I want to scale this program up many >> *many* times more than it's running now. Instead of a single gdata query >> running every six minutes or so, it now will run in bursts of 5K at a time. >> Possibly around 6K spread over an hour every hour. >> >> When seeing what would still work, the automatic program receives a >> "Captcha" assertion. I couldn't find what Google's limits were that caused >> this, but I received it just after a burst of 10 queries. >> >> Reading Google's online documentation, I need to use Oath2 for all of >> these services. Great! I like this -- especially the API console that's >> available to me (I'm using the Google Drive/Google Spreadsheet API). I have >> successfully used Google's oauth2client client library to authenticate and >> use Oauth2. >> >> However, my problem is that I can't stick these two libraries together. I >> don't see an easy way (or at least the designed way) to do this. I'm hoping >> that I'm missing something obvious and that I just need to learn how to >> interface with gdata better. It's a time crunch project (aren't they all) >> and so I really hadn't had the time to learn the gdata library well enough. >> >> Has anyone tried to stick these two libraries together? It seems something >> that I imagine many people are needing to do. Since I don't see a lot of >> Google responses/questions to this, I can only imagine I'm missing something >> painfully obvious and easy. >> >> So, for my second stab at asking, has anyone encountered this? Or, better >> yet, has anyone interface gdata with oauth2client python libraries? >> >> >> Cheers, >> >> >> Glen >> >> >> >> On Thu, Aug 16, 2012 at 5:36 PM, Glen Jarvis wrote: >>> >>> Has anyone tried to use the gdata.spreadsheet.service with Google's >>> Oauth2? >>> >>> I have a service that I've written that uses gdata.spreadsheet.service. >>> It used to use ProgrammaticLogin. I want to convert this to Oauth2. I >>> thought there would be work already in this area by now. But, I'm not >>> finding it. >>> >>> Has anyone else ran into this? >>> >>> >>> Cheers, >>> >>> >>> Glen >>> -- >>> >>> "Pursue, keep up with, circle round and round your life as a dog does his >>> master's chase. Do what you love. Know your own bone; gnaw at it, bury it, >>> unearth it, and gnaw it still." >>> >>> --Henry David Thoreau >>> >>> >> >> >> >> -- >> >> "Pursue, keep up with, circle round and round your life as a dog does his >> master's chase. Do what you love. Know your own bone; gnaw at it, bury it, >> unearth it, and gnaw it still." >> >> --Henry David Thoreau >> >> > > > > -- > > "Pursue, keep up with, circle round and round your life as a dog does his > master's chase. Do what you love. Know your own bone; gnaw at it, bury it, > unearth it, and gnaw it still." > > --Henry David Thoreau > > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies From glen at glenjarvis.com Wed Aug 22 20:16:36 2012 From: glen at glenjarvis.com (Glen Jarvis) Date: Wed, 22 Aug 2012 11:16:36 -0700 Subject: [Baypiggies] interfacing gdata.spreadsheet.service and oauth2client In-Reply-To: References: Message-ID: Alex, This looks like the best lead I've gotten in days!!! Thank you (I didn't find this when looking). My business deliverable/deadline is past and I was able to get something working without Oauth2 (it worked. But the engineering wasn't nearly as good. And, that makes me sad). I'll go over this now for my own benefit so I understand and am not rewriting the wheel... Who knows, maybe when I revisit this project, I can get a time allowance to make this work with OAuth2. Thanks!!!! Glen On Wed, Aug 22, 2012 at 10:31 AM, Alex Martelli wrote: > Haven't checked it out, but doesn't > > http://googleappsdeveloper.blogspot.com/2011/09/python-oauth-20-google-data-apis.html > help...? > > > Alex > > On Sun, Aug 19, 2012 at 5:45 PM, Glen Jarvis wrote: > > I give.. I assume I'm going to have to write my own data type library (or > > hack the old one) so that I can do oath. If that's incredibly silly and > > already done, please someone stop me... > > > > > > G > > > > > > On Sun, Aug 19, 2012 at 1:19 PM, Glen Jarvis > wrote: > >> > >> I'm going to take another stab at this. I have written a program with a > >> Google library called 'gdata.' When I wrote the program, it was a fairly > >> small project and it was acceptable (although I didn't really like it) > to > >> put a username and a password in an external file and then read that > file > >> into the program and authenticate. This is how the gdata library seems > to > >> work (at least to the best of my knowledge (although I do think they > support > >> Oauth1 so I may have used that). > >> > >> Success brings it's own problems. I want to scale this program up many > >> *many* times more than it's running now. Instead of a single gdata query > >> running every six minutes or so, it now will run in bursts of 5K at a > time. > >> Possibly around 6K spread over an hour every hour. > >> > >> When seeing what would still work, the automatic program receives a > >> "Captcha" assertion. I couldn't find what Google's limits were that > caused > >> this, but I received it just after a burst of 10 queries. > >> > >> Reading Google's online documentation, I need to use Oath2 for all of > >> these services. Great! I like this -- especially the API console that's > >> available to me (I'm using the Google Drive/Google Spreadsheet API). I > have > >> successfully used Google's oauth2client client library to authenticate > and > >> use Oauth2. > >> > >> However, my problem is that I can't stick these two libraries together. > I > >> don't see an easy way (or at least the designed way) to do this. I'm > hoping > >> that I'm missing something obvious and that I just need to learn how to > >> interface with gdata better. It's a time crunch project (aren't they > all) > >> and so I really hadn't had the time to learn the gdata library well > enough. > >> > >> Has anyone tried to stick these two libraries together? It seems > something > >> that I imagine many people are needing to do. Since I don't see a lot of > >> Google responses/questions to this, I can only imagine I'm missing > something > >> painfully obvious and easy. > >> > >> So, for my second stab at asking, has anyone encountered this? Or, > better > >> yet, has anyone interface gdata with oauth2client python libraries? > >> > >> > >> Cheers, > >> > >> > >> Glen > >> > >> > >> > >> On Thu, Aug 16, 2012 at 5:36 PM, Glen Jarvis > wrote: > >>> > >>> Has anyone tried to use the gdata.spreadsheet.service with Google's > >>> Oauth2? > >>> > >>> I have a service that I've written that uses gdata.spreadsheet.service. > >>> It used to use ProgrammaticLogin. I want to convert this to Oauth2. I > >>> thought there would be work already in this area by now. But, I'm not > >>> finding it. > >>> > >>> Has anyone else ran into this? > >>> > >>> > >>> Cheers, > >>> > >>> > >>> Glen > >>> -- > >>> > >>> "Pursue, keep up with, circle round and round your life as a dog does > his > >>> master's chase. Do what you love. Know your own bone; gnaw at it, bury > it, > >>> unearth it, and gnaw it still." > >>> > >>> --Henry David Thoreau > >>> > >>> > >> > >> > >> > >> -- > >> > >> "Pursue, keep up with, circle round and round your life as a dog does > his > >> master's chase. Do what you love. Know your own bone; gnaw at it, bury > it, > >> unearth it, and gnaw it still." > >> > >> --Henry David Thoreau > >> > >> > > > > > > > > -- > > > > "Pursue, keep up with, circle round and round your life as a dog does his > > master's chase. Do what you love. Know your own bone; gnaw at it, bury > it, > > unearth it, and gnaw it still." > > > > --Henry David Thoreau > > > > > > > > _______________________________________________ > > Baypiggies mailing list > > Baypiggies at python.org > > To change your subscription options or unsubscribe: > > http://mail.python.org/mailman/listinfo/baypiggies > -- "Pursue, keep up with, circle round and round your life as a dog does his master's chase. Do what you love. Know your own bone; gnaw at it, bury it, unearth it, and gnaw it still." --Henry David Thoreau -------------- next part -------------- An HTML attachment was scrubbed... URL: From erin.lynn.root at gmail.com Thu Aug 23 18:52:45 2012 From: erin.lynn.root at gmail.com (Lynn Root) Date: Thu, 23 Aug 2012 09:52:45 -0700 Subject: [Baypiggies] Google -> Symantec -> Caltrain tonight Message-ID: Hey folks - I was just made aware that Symantec is 3 miles or so from Google. Is anyone coming from Google MTV to BayPiggies tonight that maybe we (me + Googler boyfriend) can hitch a ride? Also - might we bother someone for a write to the Mountain View Caltrain after tonight's meetup? Thanks! Looking forward to meeting/seeing you all! Lynn Root -------------- next part -------------- An HTML attachment was scrubbed... URL: From wescpy at gmail.com Thu Aug 23 22:37:09 2012 From: wescpy at gmail.com (wesley chun) Date: Thu, 23 Aug 2012 13:37:09 -0700 Subject: [Baypiggies] Google -> Symantec -> Caltrain tonight In-Reply-To: References: Message-ID: i have a small car and will be arriving a bit late today, but if you don't mind nor have a ride by EoD, let me know. i'll be eating on campus (40 or 43) from about 7-730p then going to BayPIGgies from there. i'd be glad to drop you off at CalTrain afterwards too. cheers, --wesley On Thu, Aug 23, 2012 at 9:52 AM, Lynn Root wrote: > Hey folks - > > I was just made aware that Symantec is 3 miles or so from Google. Is anyone > coming from Google MTV to BayPiggies tonight that maybe we (me + Googler > boyfriend) can hitch a ride? > > Also - might we bother someone for a write to the Mountain View Caltrain > after tonight's meetup? > > Thanks! Looking forward to meeting/seeing you all! > > Lynn Root -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "A computer never does what you want... only what you tell it." +wesley chun : wescpy at gmail : @wescpy Python training & consulting : http://CyberwebConsulting.com "Core Python" books : http://CorePython.com Python blog: http://wescpy.blogspot.com From cappy2112 at gmail.com Thu Aug 23 23:09:25 2012 From: cappy2112 at gmail.com (Tony Cappellini) Date: Thu, 23 Aug 2012 14:09:25 -0700 Subject: [Baypiggies] BayPiggies meeting tonight- Aug 23 7:30PM at Symantec in Mountain View Message-ID: Hello Everyone, Lynn Root will be giving a presentation tonight on women's involvement in the Python community, as well as some highlights on Euro Python 2012. The presentation starts ~ 7:40PM after the usual announcements. http://www.baypiggies.net/ See you there! From cappy2112 at gmail.com Tue Aug 28 05:28:37 2012 From: cappy2112 at gmail.com (Tony Cappellini) Date: Mon, 27 Aug 2012 20:28:37 -0700 Subject: [Baypiggies] reviews of Programming Computer Vision in Python Message-ID: Hello Everyone, Here are two reviews of a recent book published on advanced applications of Python. http://www.baypiggies.net/user-group-association-program/BookReviews/ProgrammingComputerVisionWithPython_2 http://www.baypiggies.net/user-group-association-program/BookReviews/ProgrammingComputerVisionWithPython Enjoy! -------------- next part -------------- An HTML attachment was scrubbed... URL: From malcolm at hoprocker.net Tue Aug 28 06:56:27 2012 From: malcolm at hoprocker.net (malcolm) Date: Mon, 27 Aug 2012 21:56:27 -0700 Subject: [Baypiggies] reviews of Programming Computer Vision in Python In-Reply-To: References: Message-ID: Hey Tony, what's your background? Do you have much CV experience? If not/so, what do you think about a relatively non-CV person tackling this book? -malcolm On Mon, Aug 27, 2012 at 8:28 PM, Tony Cappellini wrote: > > Hello Everyone, > > > Here are two reviews of a recent book published on advanced applications > of Python. > > > http://www.baypiggies.net/user-group-association-program/BookReviews/ProgrammingComputerVisionWithPython_2 > > > http://www.baypiggies.net/user-group-association-program/BookReviews/ProgrammingComputerVisionWithPython > > > > Enjoy! > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -------------- next part -------------- An HTML attachment was scrubbed... URL: From malcolm at hoprocker.net Tue Aug 28 06:58:43 2012 From: malcolm at hoprocker.net (malcolm) Date: Mon, 27 Aug 2012 21:58:43 -0700 Subject: [Baypiggies] reviews of Programming Computer Vision in Python In-Reply-To: References: Message-ID: egad, I just got to "As a developer of OpenCV...". So you've definitely have experience, and (have) work(ed) at -- Intel, isn't it? On Mon, Aug 27, 2012 at 9:56 PM, malcolm wrote: > Hey Tony, what's your background? Do you have much CV experience? If > not/so, what do you think about a relatively non-CV person tackling this > book? > > -malcolm > > On Mon, Aug 27, 2012 at 8:28 PM, Tony Cappellini wrote: > >> >> Hello Everyone, >> >> >> Here are two reviews of a recent book published on advanced applications >> of Python. >> >> >> http://www.baypiggies.net/user-group-association-program/BookReviews/ProgrammingComputerVisionWithPython_2 >> >> >> http://www.baypiggies.net/user-group-association-program/BookReviews/ProgrammingComputerVisionWithPython >> >> >> >> Enjoy! >> >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> http://mail.python.org/mailman/listinfo/baypiggies >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappy2112 at gmail.com Wed Aug 29 18:57:43 2012 From: cappy2112 at gmail.com (Tony Cappellini) Date: Wed, 29 Aug 2012 09:57:43 -0700 Subject: [Baypiggies] Nov & Dec 2012 meeting dates Message-ID: Hello Everyone, Symantec has chosen Nov 15, 2012 and Dec 13, 2012 for the meeting days this year. Please update your calendars. Thanks Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From bpeterso2000 at yahoo.com Thu Aug 30 03:05:05 2012 From: bpeterso2000 at yahoo.com (Brian Peterson) Date: Wed, 29 Aug 2012 18:05:05 -0700 (PDT) Subject: [Baypiggies] BayPIGies presentation proposal - Cultivating innovation in the public sector with Python Message-ID: <1346288705.71624.YahooMailNeo@web124906.mail.ne1.yahoo.com> At the August Python users group meeting the question was asked if anyone would be interested in giving a talk in the coming months. ?Here is my presentation proposal, let me know if there is any interest... Cultivating innovation in the public sector with Python --------------------------------------------------------------------- After 15+ years in private sector engineering & scientific R&D, moving into the public sector was quite an awakening.? How do you leapfrog a culture that?s technologically a decade or more behind the curve?? One method that has started to show success is leveraging Python as a practitioner's tool rather than just another "programming language". In this presentation I will provide use cases of how using Python as a practitioner's tool can help plant seeds of innovation in environments & cultures that are traditionally slow to adopt new technology. Sample projects include, but are not limited to: *? ? ? ?Python/SciPy-based event probability monitoring plug-in for Nagios; alerting and reporting on abnormal behavior patterns in complex systems. *???????? Django-based multi-tenant, multi-lingual, mobile-friendly customer check-in, queuing and analytics system that leverages web-services, wireless Internet TV's, Twilio and iSpeech. *???????? An introduction and working demonstration of Web2py as a practitioner?s web-based front-end. -------------- next part -------------- An HTML attachment was scrubbed... URL: From simeonf at gmail.com Thu Aug 30 08:40:14 2012 From: simeonf at gmail.com (Simeon Franklin) Date: Wed, 29 Aug 2012 23:40:14 -0700 Subject: [Baypiggies] BayPIGies presentation proposal - Cultivating innovation in the public sector with Python In-Reply-To: <1346288705.71624.YahooMailNeo@web124906.mail.ne1.yahoo.com> References: <1346288705.71624.YahooMailNeo@web124906.mail.ne1.yahoo.com> Message-ID: +1 - particularly the first topic. On Wed, Aug 29, 2012 at 6:05 PM, Brian Peterson wrote: > At the August Python users group meeting the question was asked if anyone > would be interested in giving a talk in the coming months. Here is my > presentation proposal, let me know if there is any interest... > -------------- next part -------------- An HTML attachment was scrubbed... URL: From nagappan at gmail.com Thu Aug 30 19:50:14 2012 From: nagappan at gmail.com (Nagappan Alagappan) Date: Thu, 30 Aug 2012 10:50:14 -0700 Subject: [Baypiggies] BayPIGies presentation proposal - Cultivating innovation in the public sector with Python In-Reply-To: <1346288705.71624.YahooMailNeo@web124906.mail.ne1.yahoo.com> References: <1346288705.71624.YahooMailNeo@web124906.mail.ne1.yahoo.com> Message-ID: +1 for first 2 topics. Thanks On Wed, Aug 29, 2012 at 6:05 PM, Brian Peterson wrote: > At the August Python users group meeting the question was asked if anyone > would be interested in giving a talk in the coming months. Here is my > presentation proposal, let me know if there is any interest... > Cultivating innovation in the public sector with Python > --------------------------------------------------------------------- > After 15+ years in private sector engineering & scientific R&D, moving > into the public sector was quite an awakening. How do you leapfrog a > culture that?s technologically a decade or more behind the curve? One > method that has started to show success is leveraging Python as a > practitioner's tool rather than just another "programming language". In > this presentation I will provide use cases of how using Python as a > practitioner's tool can help plant seeds of innovation in environments & > cultures that are traditionally slow to adopt new technology. Sample > projects include, but are not limited to: > > * Python/SciPy-based event probability monitoring plug-in for > Nagios; alerting and reporting on abnormal behavior patterns in complex > systems. > * Django-based multi-tenant, multi-lingual, mobile-friendly > customer check-in, queuing and analytics system that leverages > web-services, wireless Internet TV's, Twilio and iSpeech. > * An introduction and working demonstration of Web2py as a > practitioner?s web-based front-end. > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -- Linux Desktop (GUI Application) Testing Project - http://ldtp.freedesktop.org Cobra - Windows GUI Automation tool - https://github.com/ldtp/cobra http://nagappanal.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux at gmail.com Thu Aug 30 23:34:48 2012 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Thu, 30 Aug 2012 23:34:48 +0200 Subject: [Baypiggies] interfacing gdata.spreadsheet.service and oauth2client In-Reply-To: References: Message-ID: Sorry it's taken me so long to respond. I know exactly the problem that you're talking about because we had the same problem for YouTube APIs. It turns out that you can use the newer Google APIs client library to do all of your OAuth2 stuff and then futz with the GData client library to make use of your OAuth2 tokens. Here's a program (http://code.google.com/p/party-playlist-picker/) that uses this hybrid trick. Just grep for gdata, OAuth2, etc. and you'll find what you need. Happy hacking, and sorry I didn't get this response back to you before your deadline. -jj On Sun, Aug 19, 2012 at 10:19 PM, Glen Jarvis wrote: > I'm going to take another stab at this. I have written a program with a > Google library called 'gdata.' When I wrote the program, it was a fairly > small project and it was acceptable (although I didn't really like it) to > put a username and a password in an external file and then read that file > into the program and authenticate. This is how the gdata library seems to > work (at least to the best of my knowledge (although I do think they > support Oauth1 so I may have used that). > > Success brings it's own problems. I want to scale this program up many > *many* times more than it's running now. Instead of a single gdata query > running every six minutes or so, it now will run in bursts of 5K at a time. > Possibly around 6K spread over an hour every hour. > > When seeing what would still work, the automatic program receives a > "Captcha" assertion. I couldn't find what Google's limits were that caused > this, but I received it just after a burst of 10 queries. > > Reading Google's online documentation, I need to use Oath2 for all of > these services. Great! I like this -- especially the API console that's > available to me (I'm using the Google Drive/Google Spreadsheet API). I have > successfully used Google's oauth2client client library to authenticate and > use Oauth2. > > However, my problem is that I can't stick these two libraries together. I > don't see an easy way (or at least the designed way) to do this. I'm hoping > that I'm missing something obvious and that I just need to learn how to > interface with gdata better. It's a time crunch project (aren't they all) > and so I really hadn't had the time to learn the gdata library well enough. > > Has anyone tried to stick these two libraries together? It seems something > that I imagine many people are needing to do. Since I don't see a lot of > Google responses/questions to this, I can only imagine I'm missing > something painfully obvious and easy. > > So, for my second stab at asking, has anyone encountered this? Or, better > yet, has anyone interface gdata with oauth2client python libraries? > > > Cheers, > > > Glen > > > > On Thu, Aug 16, 2012 at 5:36 PM, Glen Jarvis wrote: > >> Has anyone tried to use the gdata.spreadsheet.service with Google's >> Oauth2? >> >> I have a service that I've written that uses gdata.spreadsheet.service. >> It used to use ProgrammaticLogin. I want to convert this to Oauth2. I >> thought there would be work already in this area by now. But, I'm not >> finding it. >> >> Has anyone else ran into this? >> >> >> Cheers, >> >> >> Glen >> -- >> >> "Pursue, keep up with, circle round and round your life as a dog does his >> master's chase. Do what you love. Know your own bone; gnaw at it, bury it, >> unearth it, and gnaw it still." >> >> --Henry David Thoreau >> >> > > > -- > > "Pursue, keep up with, circle round and round your life as a dog does his > master's chase. Do what you love. Know your own bone; gnaw at it, bury it, > unearth it, and gnaw it still." > > --Henry David Thoreau > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -- In this life we cannot do great things. We can only do small things with great love. -- Mother Teresa -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux at gmail.com Thu Aug 30 23:36:16 2012 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Thu, 30 Aug 2012 23:36:16 +0200 Subject: [Baypiggies] Google -> Symantec -> Caltrain tonight In-Reply-To: References: Message-ID: In general, I can give you a ride to BayPiggies from MTV, and possibly even a ride back to San Francisco. Unfortunately, I've missed the last couple meetings, but this could work in the future. Best Regards, -jj On Thu, Aug 23, 2012 at 6:52 PM, Lynn Root wrote: > Hey folks - > > I was just made aware that Symantec is 3 miles or so from Google. Is > anyone coming from Google MTV to BayPiggies tonight that maybe we (me + > Googler boyfriend) can hitch a ride? > > Also - might we bother someone for a write to the Mountain View Caltrain > after tonight's meetup? > > Thanks! Looking forward to meeting/seeing you all! > > Lynn Root > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -- In this life we cannot do great things. We can only do small things with great love. -- Mother Teresa -------------- next part -------------- An HTML attachment was scrubbed... URL: