From aahz at pythoncraft.com Mon Jan 2 15:59:22 2012 From: aahz at pythoncraft.com (Aahz) Date: Mon, 2 Jan 2012 09:59:22 -0500 (EST) Subject: [Baypiggies] REMINDER: OSCON Call for Proposals (deadline 1/12) Message-ID: <20120102145922.8B9E3285AE@mailbackend.panix.com> DEADLINE Thursday January 12 Ring in the Gnu year with a proposal for OSCON! OSCON (O'Reilly Open Source Convention), the premier Open Source gathering, will be held in Portland, OR July 16-20. We're looking for people to deliver tutorials and shorter presentations. http://www.oscon.com/oscon2012 http://www.oscon.com/oscon2012/public/cfp/197 Hope to see you there! -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "Do not taunt happy fun for loops. Do not change lists you are looping over." --Remco Gerlich From cappy2112 at gmail.com Tue Jan 3 02:30:14 2012 From: cappy2112 at gmail.com (Tony Cappellini) Date: Mon, 2 Jan 2012 17:30:14 -0800 Subject: [Baypiggies] Call for presenters for 2012 Message-ID: Hello and Happy New Year Everyone! I hope your holidays were happy and safe. Our first meeting for 2012 is on January 26th, and as yet we do not have anyone scheduled to give a presentation. If you have a project you would like to talk about or suggest a topic for a presentation, please post you comments to the list. Thanks Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From simeonf at gmail.com Tue Jan 3 03:49:04 2012 From: simeonf at gmail.com (Simeon Franklin) Date: Mon, 2 Jan 2012 18:49:04 -0800 Subject: [Baypiggies] Call for presenters for 2012 In-Reply-To: References: Message-ID: Possibly relevant. http://simeonfranklin.com/blog/2011/dec/23/calling-all-pycon-rejects/ We're also a great audience for a practice run-through of your accepted talk :) -regards Simeon Franklin On Mon, Jan 2, 2012 at 5:30 PM, Tony Cappellini wrote: > > > Hello and Happy New Year Everyone! > > I hope your holidays were happy and safe. > > > Our first meeting for 2012 is on January 26th, and as yet we do not have > anyone scheduled to give a presentation. > > If you have a project you would like to talk about or suggest a topic for a > presentation, please post you comments > to the list. > > > Thanks > > > Tony > > > _______________________________________________ > 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 Tue Jan 3 18:30:40 2012 From: glen at glenjarvis.com (Glen Jarvis) Date: Tue, 3 Jan 2012 09:30:40 -0800 Subject: [Baypiggies] Call for presenters for 2012 In-Reply-To: References: Message-ID: <2212F2DF-6D8E-4E5C-8801-3B96F7570787@glenjarvis.com> Tony, I'm working on a virtualization introduction talk discussing setting up an EC2 instance on Amazon and then installing virtualenv on that instance. It's still in rough planning stage as in more of a beginner/intermediate level tutorial on how these things work. It may be too basic for the typical BayPIGgies talk. But, one would walk away knowing how to create an Amazon Virtual Instance for free (and how these things are similar/different from virtualenv). Glen On Jan 2, 2012, at 5:30 PM, Tony Cappellini wrote: > > > Hello and Happy New Year Everyone! > > I hope your holidays were happy and safe. > > > Our first meeting for 2012 is on January 26th, and as yet we do not have anyone scheduled to give a presentation. > > If you have a project you would like to talk about or suggest a topic for a presentation, please post you comments > to the list. > > > Thanks > > > Tony > > _______________________________________________ > 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 Tue Jan 3 21:00:32 2012 From: glen at glenjarvis.com (Glen Jarvis) Date: Tue, 3 Jan 2012 12:00:32 -0800 Subject: [Baypiggies] Call for presenters for 2012 In-Reply-To: References: Message-ID: +1 on Simeon giving his talk that he isn't presenting at PyCon. G On Mon, Jan 2, 2012 at 6:49 PM, Simeon Franklin wrote: > Possibly relevant. > http://simeonfranklin.com/blog/2011/dec/23/calling-all-pycon-rejects/ > > We're also a great audience for a practice run-through of your accepted > talk :) > > -regards > Simeon Franklin > > > On Mon, Jan 2, 2012 at 5:30 PM, Tony Cappellini > wrote: > > > > > > Hello and Happy New Year Everyone! > > > > I hope your holidays were happy and safe. > > > > > > Our first meeting for 2012 is on January 26th, and as yet we do not have > > anyone scheduled to give a presentation. > > > > If you have a project you would like to talk about or suggest a topic > for a > > presentation, please post you comments > > to the list. > > > > > > Thanks > > > > > > Tony > > > > > > _______________________________________________ > > 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 > -- Things which matter most must never be at the mercy of things which matter least. -- Goethe -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at tcapp.com Tue Jan 3 21:49:07 2012 From: tony at tcapp.com (Tony Cappellini) Date: Tue, 3 Jan 2012 12:49:07 -0800 Subject: [Baypiggies] Call for presenters for 2012 In-Reply-To: <2212F2DF-6D8E-4E5C-8801-3B96F7570787@glenjarvis.com> References: <2212F2DF-6D8E-4E5C-8801-3B96F7570787@glenjarvis.com> Message-ID: When would you like to present this? On Tue, Jan 3, 2012 at 9:30 AM, Glen Jarvis wrote: > Tony, > > I'm working on a virtualization introduction talk discussing setting up an > EC2 instance on Amazon and then installing virtualenv on that instance. > > It's still in rough planning stage as in more of a beginner/intermediate > level tutorial on how these things work. It may be too basic for the > typical BayPIGgies talk. But, one would walk away knowing how to create an > Amazon Virtual Instance for free (and how these things are > similar/different from virtualenv). > > Glen > > On Jan 2, 2012, at 5:30 PM, Tony Cappellini wrote: > > > > > > > Hello and Happy New Year Everyone! > > > > I hope your holidays were happy and safe. > > > > > > Our first meeting for 2012 is on January 26th, and as yet we do not have > anyone scheduled to give a presentation. > > > > If you have a project you would like to talk about or suggest a topic > for a presentation, please post you comments > > to the list. > > > > > > Thanks > > > > > > Tony > > > > _______________________________________________ > > 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 tim.norman at dreamworks.com Wed Jan 4 18:54:44 2012 From: tim.norman at dreamworks.com (Tim Norman) Date: Wed, 4 Jan 2012 09:54:44 -0800 Subject: [Baypiggies] Dreamworks Animation is looking for a Python Engineer to joint the Render Farm Resource team, , , Message-ID: Hello, all. Happy New Year! Dreamworks Animation is looking for a Python Engineer for its Redwood City animation studio to join its Render Farm Resource team. The R&D Farm Resource Management group is responsible for designing and implementing software used in the production pipeline to create animated feature films. We write software to define process dependency graphs, submit those graphs to the studio's supercompute render farm, and monitor and report on the farm. As a software engineer on the farm resource management team, you will: ? Design, develop, test, and support software used to set up, submit, and manage jobs on DreamWorks' supercompute render farm ? Help allocate and monitor the distribution of render resources across productions and teams ? Work closely with production and other technology groups to maximize our compute resources Your software development experience must include: ? Extensive scripting in Python ? Programming in C++ ? Object oriented experience ? SQL (Oracle) and relational database concepts ? Large software systems ? UNIX/Linux working environment We also prefer experience with: ? Web standard protocols and applications (such as javascript, html, Apache, XML) ? Reporting and data warehousing ? Condor or other DRM systems such as LSF, Grid or Qube ? Java and/or services ? AMQP messaging If you are interested in discussing further, please email me your resume to tim.norman at dreamworks.com. Thanks and take care. Tim- Tim Norman Recruiting at DreamWorks Animation tim.norman at dreamworks.com 818 695 7801 -------------- next part -------------- An HTML attachment was scrubbed... URL: From corey.coughlin at comcast.net Fri Jan 6 01:57:23 2012 From: corey.coughlin at comcast.net (corey.coughlin at comcast.net) Date: Fri, 6 Jan 2012 00:57:23 +0000 (UTC) Subject: [Baypiggies] Tricky dictionary iteration problem In-Reply-To: Message-ID: <138836346.453980.1325811443162.JavaMail.root@sz0049a.emeryville.ca.mail.comcast.net> Hi all, Sorry to bug everybody, but I'm having some trouble with a somewhat tricky class I'm trying to make. I have a class that inherits from collections.OrderedDict, in an effort to create an ordered dictionary with some extra functions. Now what I'd like to do is to change the iteration so that when you iterate over it, it iterates over values instead of keys. This is turning out to be harder than I thought. First, I tried this: class od2(collections.OrderedDict): def __iter__(self): return iter(self.values()) Now the code I'm running creates a dict and tries to do a .copy on it, but I'd expect the problem to come up with most kind of dictionary access. The problem is that it goes into an infinite recursion with messages like this File "...", line 57, in __iter__ return iter(self.values()) File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 372 in values return [self[key] for key in self] It looks like the values() function uses the iterator to generate the values. OK, so maybe I'll try this: class od2(collections.OrderedDict): def __iter__(self): values = [self[key] for key in self.keys()] return iter(values) that gives me messages like this: File "...", line 56, in __iter__ values = [self[key] for key in self.keys()] File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 366 in keys return list(self) and list() uses the iterator. Gah. So I'm out of ideas here, even if I dig into OrderedDict and find some way to pull the keys out, I'll probably have to rewrite a bunch of access functions for it to still work like a dictionary. Am I just tilting at windmills, or is doing something like this actually possible? Or am I just being dense, and there's a super obvious way to do this? Thanks for any help! (Oh, and forgive me if there's a known fix for this, googling for anything along these lines just sent me to tons of tutorials about using the .values() function. No help there.) ------- Corey -------------- next part -------------- An HTML attachment was scrubbed... URL: From rob at zuber.net Fri Jan 6 02:22:14 2012 From: rob at zuber.net (Robert Zuber) Date: Thu, 5 Jan 2012 17:22:14 -0800 Subject: [Baypiggies] Tricky dictionary iteration problem In-Reply-To: <138836346.453980.1325811443162.JavaMail.root@sz0049a.emeryville.ca.mail.comcast.net> References: <138836346.453980.1325811443162.JavaMail.root@sz0049a.emeryville.ca.mail.comcast.net> Message-ID: using super to avoid the recursion seems to work: >>> class od2(collections.OrderedDict): ... def __iter__(self): ... return (v for v in super(collections.OrderedDict, self).itervalues()) ... >>> od = od2() >>> od['a'] = 'b' >>> od['c'] = 'd' >>> [v for v in od] ['b', 'd'] On Jan 5, 2012, at 4:57 PM, corey.coughlin at comcast.net wrote: > Hi all, > Sorry to bug everybody, but I'm having some trouble with a somewhat tricky class I'm trying to make. I have a class that inherits from collections.OrderedDict, in an effort to create an ordered dictionary with some extra functions. Now what I'd like to do is to change the iteration so that when you iterate over it, it iterates over values instead of keys. This is turning out to be harder than I thought. First, I tried this: > > class od2(collections.OrderedDict): > def __iter__(self): > return iter(self.values()) > > Now the code I'm running creates a dict and tries to do a .copy on it, but I'd expect the problem to come up with most kind of dictionary access. The problem is that it goes into an infinite recursion with messages like this > > File "...", line 57, in __iter__ > return iter(self.values()) > File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 372 in values > return [self[key] for key in self] > > It looks like the values() function uses the iterator to generate the values. OK, so maybe I'll try this: > > class od2(collections.OrderedDict): > def __iter__(self): > values = [self[key] for key in self.keys()] > return iter(values) > > that gives me messages like this: > > File "...", line 56, in __iter__ > values = [self[key] for key in self.keys()] > File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 366 in keys > return list(self) > > and list() uses the iterator. Gah. So I'm out of ideas here, even if I dig into OrderedDict and find some way to pull the keys out, I'll probably have to rewrite a bunch of access functions for it to still work like a dictionary. Am I just tilting at windmills, or is doing something like this actually possible? Or am I just being dense, and there's a super obvious way to do this? Thanks for any help! > > (Oh, and forgive me if there's a known fix for this, googling for anything along these lines just sent me to tons of tutorials about using the .values() function. No help there.) > > ------- Corey > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies From jason at mischievous.org Fri Jan 6 02:23:26 2012 From: jason at mischievous.org (Jason Culverhouse) Date: Thu, 5 Jan 2012 17:23:26 -0800 Subject: [Baypiggies] Tricky dictionary iteration problem In-Reply-To: <138836346.453980.1325811443162.JavaMail.root@sz0049a.emeryville.ca.mail.comcast.net> References: <138836346.453980.1325811443162.JavaMail.root@sz0049a.emeryville.ca.mail.comcast.net> Message-ID: On Jan 5, 2012, at 4:57 PM, corey.coughlin at comcast.net wrote: > Hi all, > Sorry to bug everybody, but I'm having some trouble with a somewhat tricky class I'm trying to make. I have a class that inherits from collections.OrderedDict, in an effort to create an ordered dictionary with some extra functions. Now what I'd like to do is to change the iteration so that when you iterate over it, it iterates over values instead of keys. This is turning out to be harder than I thought. First, I tried this: > > class od2(collections.OrderedDict): > def __iter__(self): > return iter(self.values()) I know I'm confused about what you want to do here... perhaps a code sample would be better but I'm thinking you just want itervalues? (An aside but I don't think anything happened along the lines of http://www.python.org/dev/peps/pep-3106/ ) >>> import collections >>> d = collections.OrderedDict([(1,'one'), (2, 'two'), (3, 'three'), (4, 'four')]) >>> d OrderedDict([(1, 'one'), (2, 'two'), (3, 'three'), (4, 'four')]) >>> d.values() ['one', 'two', 'three', 'four'] >>> [v for v in d.itervalues()] ['one', 'two', 'three', 'four'] It would be quite confusing for one to write the following and not get anything but >>> [k for k in d] [1, 2, 3, 4] > and list() uses the iterator. Gah. So I'm out of ideas here, even if I dig into OrderedDict and find some way to pull the keys out, I'll probably have to rewrite a bunch of access functions for it to still work like a dictionary. Am I just tilting at windmills, or is doing something like this actually possible? Or am I just being dense, and there's a super obvious way to do this? Thanks for any help! > > (Oh, and forgive me if there's a known fix for this, googling for anything along these lines just sent me to tons of tutorials about using the .values() function. No help there.) > > ------- Corey > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies Jason From corey.coughlin at comcast.net Fri Jan 6 03:05:01 2012 From: corey.coughlin at comcast.net (corey.coughlin at comcast.net) Date: Fri, 6 Jan 2012 02:05:01 +0000 (UTC) Subject: [Baypiggies] Tricky dictionary iteration problem In-Reply-To: Message-ID: <342758540.456660.1325815501562.JavaMail.root@sz0049a.emeryville.ca.mail.comcast.net> Thanks, that looks pretty good. It still fails doing a .copy(), so I'll have to rewrite that. And see what else I need to fix. As far as why I want to do it goes, well, I originally had an IndexedList class, which contained a list and a dictionary. All the objects in the list had a .reference string attribute, and it worked mostly like a list with an index on it. I wrote getitem to check the index to see if it were an integer or a string, and if it was a string use the dictionary reference for a fast look up of the object. The problem there is that it eats a lot of memory for big data sets, so I was looking at using an OrderedDict based object to emulate that behavior. Works pretty well, except that I need to change all my loops from: for obj in indexlist: to for obj in indexlist.values(): and that's kind of a pain. The simpler way to pull it off is to not inherit from OrderedDict, but just have an object attribute that holds an ordered dict and add all the mapping and iteration function calls manually. That works, but I was looking for a simpler way to do it. Looks like either way, I'll have to rewrite some functions. Thanks for the help! ------- Corey ----- Original Message ----- From: "Robert Zuber" To: "corey coughlin" Cc: baypiggies at python.org Sent: Thursday, January 5, 2012 5:22:14 PM Subject: Re: [Baypiggies] Tricky dictionary iteration problem using super to avoid the recursion seems to work: >>> class od2(collections.OrderedDict): ... def __iter__(self): ... return (v for v in super(collections.OrderedDict, self).itervalues()) ... >>> od = od2() >>> od['a'] = 'b' >>> od['c'] = 'd' >>> [v for v in od] ['b', 'd'] On Jan 5, 2012, at 4:57 PM, corey.coughlin at comcast.net wrote: > Hi all, > Sorry to bug everybody, but I'm having some trouble with a somewhat tricky class I'm trying to make. I have a class that inherits from collections.OrderedDict, in an effort to create an ordered dictionary with some extra functions. Now what I'd like to do is to change the iteration so that when you iterate over it, it iterates over values instead of keys. This is turning out to be harder than I thought. First, I tried this: > > class od2(collections.OrderedDict): > def __iter__(self): > return iter(self.values()) > > Now the code I'm running creates a dict and tries to do a .copy on it, but I'd expect the problem to come up with most kind of dictionary access. The problem is that it goes into an infinite recursion with messages like this > > File "...", line 57, in __iter__ > return iter(self.values()) > File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 372 in values > return [self[key] for key in self] > > It looks like the values() function uses the iterator to generate the values. OK, so maybe I'll try this: > > class od2(collections.OrderedDict): > def __iter__(self): > values = [self[key] for key in self.keys()] > return iter(values) > > that gives me messages like this: > > File "...", line 56, in __iter__ > values = [self[key] for key in self.keys()] > File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 366 in keys > return list(self) > > and list() uses the iterator. Gah. So I'm out of ideas here, even if I dig into OrderedDict and find some way to pull the keys out, I'll probably have to rewrite a bunch of access functions for it to still work like a dictionary. Am I just tilting at windmills, or is doing something like this actually possible? Or am I just being dense, and there's a super obvious way to do this? Thanks for any help! > > (Oh, and forgive me if there's a known fix for this, googling for anything along these lines just sent me to tons of tutorials about using the .values() function. No help there.) > > ------- Corey > _______________________________________________ > 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 hcarrinski at gmail.com Fri Jan 6 07:21:54 2012 From: hcarrinski at gmail.com (Hy Carrinski) Date: Fri, 6 Jan 2012 01:21:54 -0500 Subject: [Baypiggies] Tricky dictionary iteration problem In-Reply-To: <342758540.456660.1325815501562.JavaMail.root@sz0049a.emeryville.ca.mail.comcast.net> References: <342758540.456660.1325815501562.JavaMail.root@sz0049a.emeryville.ca.mail.comcast.net> Message-ID: <-582841565785088966@unknownmsgid> Here are a few brief thoughts and then documentation. I appreciate consideration of the limits of writing a note rapidly on my mobile device. 1. I think it will be hard to develop maintainable clean code by subclassing a dictionary to make it function like a dictionary but produce alternate output. 2. When one opens IDLE and chooses "open module" from the "File" menu, one can look at the collections module. Several of the methods of the OrderedDict depend on __iter__() so overriding it may produce interesting results (see info on subclassing in Python below). 3. In the collections module one can see the prevalence of yield statements. An iterator rarely benefits from returning a list. >From http://docs.python.org/tutorial/classes.html "Derived classes may override methods of their base classes. Because methods have no special privileges when calling other methods of the same object, a method of a base class that calls another method defined in the same base class may end up calling a method of a derived class that overrides it." For reference, here is an example of the __iter__ method being overridden. Apologies for removing comments/license when transcribing Python 2.7 source. def __iter__(): NEXT, KEY = 1, 2 root = self.__root curr = root[NEXT] while curr is not root: yield curr[KEY] curr = curr[NEXT] Hope these opinions and information add to the dialog. Hy On Jan 5, 2012, at 9:06 PM, "corey.coughlin at comcast.net" < corey.coughlin at comcast.net> wrote: Thanks, that looks pretty good. It still fails doing a .copy(), so I'll have to rewrite that. And see what else I need to fix. As far as why I want to do it goes, well, I originally had an IndexedList class, which contained a list and a dictionary. All the objects in the list had a .reference string attribute, and it worked mostly like a list with an index on it. I wrote getitem to check the index to see if it were an integer or a string, and if it was a string use the dictionary reference for a fast look up of the object. The problem there is that it eats a lot of memory for big data sets, so I was looking at using an OrderedDict based object to emulate that behavior. Works pretty well, except that I need to change all my loops from: for obj in indexlist: to for obj in indexlist.values(): and that's kind of a pain. The simpler way to pull it off is to not inherit from OrderedDict, but just have an object attribute that holds an ordered dict and add all the mapping and iteration function calls manually. That works, but I was looking for a simpler way to do it. Looks like either way, I'll have to rewrite some functions. Thanks for the help! ------- Corey ------------------------------ *From: *"Robert Zuber" *To: *"corey coughlin" *Cc: *baypiggies at python.org *Sent: *Thursday, January 5, 2012 5:22:14 PM *Subject: *Re: [Baypiggies] Tricky dictionary iteration problem using super to avoid the recursion seems to work: >>> class od2(collections.OrderedDict): ... def __iter__(self): ... return (v for v in super(collections.OrderedDict, self).itervalues()) ... >>> od = od2() >>> od['a'] = 'b' >>> od['c'] = 'd' >>> [v for v in od] ['b', 'd'] On Jan 5, 2012, at 4:57 PM, corey.coughlin at comcast.net wrote: > Hi all, > Sorry to bug everybody, but I'm having some trouble with a somewhat tricky class I'm trying to make. I have a class that inherits from collections.OrderedDict, in an effort to create an ordered dictionary with some extra functions. Now what I'd like to do is to change the iteration so that when you iterate over it, it iterates over values instead of keys. This is turning out to be harder than I thought. First, I tried this: > > class od2(collections.OrderedDict): > def __iter__(self): > return iter(self.values()) > > Now the code I'm running creates a dict and tries to do a .copy on it, but I'd expect the problem to come up with most kind of dictionary access. The problem is that it goes into an infinite recursion with messages like this > > File "...", line 57, in __iter__ > return iter(self.values()) > File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 372 in values > return [self[key] for key in self] > > It looks like the values() function uses the iterator to generate the values. OK, so maybe I'll try this: > > class od2(collections.OrderedDict): > def __iter__(self): > values = [self[key] for key in self.keys()] > return iter(values) > > that gives me messages like this: > > File "...", line 56, in __iter__ > values = [self[key] for key in self.keys()] > File ".../python/2.7.1/linux64/lib/python2.7/_abcoll.py" line 366 in keys > return list(self) > > and list() uses the iterator. Gah. So I'm out of ideas here, even if I dig into OrderedDict and find some way to pull the keys out, I'll probably have to rewrite a bunch of access functions for it to still work like a dictionary. Am I just tilting at windmills, or is doing something like this actually possible? Or am I just being dense, and there's a super obvious way to do this? Thanks for any help! > > (Oh, and forgive me if there's a known fix for this, googling for anything along these lines just sent me to tons of tutorials about using the .values() function. No help there.) > > ------- Corey > _______________________________________________ > 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 aahz at pythoncraft.com Mon Jan 9 16:19:09 2012 From: aahz at pythoncraft.com (Aahz) Date: Mon, 9 Jan 2012 10:19:09 -0500 (EST) Subject: [Baypiggies] FINAL REMINDER: OSCON Call for Proposals (deadline 1/12) Message-ID: <20120109151909.BB3E128420@mailbackend.panix.com> DEADLINE Thursday January 12 OSCON (O'Reilly Open Source Convention), the premier Open Source gathering, will be held in Portland, OR July 16-20. We're looking for people to deliver tutorials and shorter presentations. http://www.oscon.com/oscon2012 http://www.oscon.com/oscon2012/public/cfp/197 Hope to see you there! -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "Do not taunt happy fun for loops. Do not change lists you are looping over." --Remco Gerlich From venkat83 at gmail.com Wed Jan 11 04:46:04 2012 From: venkat83 at gmail.com (Venkatraman S) Date: Wed, 11 Jan 2012 09:16:04 +0530 Subject: [Baypiggies] [X-POST] Selenium Simple Test Message-ID: This does look super-simple! Linky : http://www.youtube.com/watch?v=qGPostUOAEI -Venkat -------------- next part -------------- An HTML attachment was scrubbed... URL: From viky.nandha at gmail.com Wed Jan 11 06:26:14 2012 From: viky.nandha at gmail.com (=?UTF-8?B?4K614K6/4K6V4K+N4K6p4K+H4K634K+NIOCuqOCuqOCvjeCupCDgrpXgr4Hgrq7grr7grrA=?= =?UTF-8?B?4K+NIChWaWduZXNoIE5hbmRoYSBLdW1hcik=?=) Date: Wed, 11 Jan 2012 10:56:14 +0530 Subject: [Baypiggies] [Ilugc] [X-POST] Selenium Simple Test In-Reply-To: References: Message-ID: On Wed, Jan 11, 2012 at 9:16 AM, Venkatraman S wrote: > This does look super-simple! Linky : > http://www.youtube.com/watch?v=qGPostUOAEI > Wow! Sounds awesome :) Going to try it right away. Thanks. -- Vignesh Nandha Kumar -------------- next part -------------- An HTML attachment was scrubbed... URL: From simeonf at gmail.com Wed Jan 11 21:33:36 2012 From: simeonf at gmail.com (Simeon Franklin) Date: Wed, 11 Jan 2012 12:33:36 -0800 Subject: [Baypiggies] This seemed appropriate after our discussion of Pythonic and Un-pythonic last month Message-ID: http://python-for-humans.heroku.com/#1 Has anyone else read through this? The basic premise is that much of stdlib and supporting tools (installers, packaging, etc) is un-pythonic. The author wrote the Requests package and having used it I am tempted to agree with regard to urllib/urllib2. I haven't yet used his replacement packate but have experienced pain with subprocess. I don't think I agree about etree being horrid - did anybody more experienced have contrary thoughts? -regards Simeon Franklin From mark.voorhies at ucsf.edu Wed Jan 11 22:55:04 2012 From: mark.voorhies at ucsf.edu (Mark Voorhies) Date: Wed, 11 Jan 2012 13:55:04 -0800 Subject: [Baypiggies] This seemed appropriate after our discussion of Pythonic and Un-pythonic last month In-Reply-To: References: Message-ID: <201201111355.05165.mark.voorhies@ucsf.edu> On Wednesday, January 11, 2012 12:33:36 pm Simeon Franklin wrote: > http://python-for-humans.heroku.com/#1 > > Has anyone else read through this? The basic premise is that much of > stdlib and supporting tools (installers, packaging, etc) is > un-pythonic. > > The author wrote the Requests package and having used it I am tempted > to agree with regard to urllib/urllib2. I haven't yet used his > replacement packate but have experienced pain with subprocess. > I don't > think I agree about etree being horrid - did anybody more experienced > have contrary thoughts? It depends on what you're using it for. If you want to parse large xml files fast and you need to be able to do complex searches (i.e., xpath) then lxml is _very_ good (and faster/more flexible than etree). I think that the installation/dependencies discussion at the end is interesting, but possibly separate from the "pythonic" question. If you're not doing cross-platform development and have the choice of working on a system with good package management (e.g., Debian), then these problems mostly go away (e.g., for packages that he points to like lxml and python-mysql as well as really messy things like the scipy/numpy/matplotlib stack). I don't have any experience with distribute/pip/virtualenv, but my bias is that packages that need to integrate deeply with non-python parts of the system (e.g., numerical libraries) are easier to delegate to the operating system's (rather than the language's) package manager -- but perhaps other people on this list have had a different experience? --Mark > > -regards > Simeon Franklin > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > From langton2 at llnl.gov Thu Jan 12 21:23:20 2012 From: langton2 at llnl.gov (Asher Langton) Date: Thu, 12 Jan 2012 12:23:20 -0800 Subject: [Baypiggies] Improving Python+MPI import performance Message-ID: Hi all, I work on a Python/C++ scientific code that runs as a number of independent Python processes communicating via MPI. Unfortunately, as some of you may have experienced, module importing does not scale well in Python/MPI applications. For 32k processes on BlueGene/P, importing 100 trivial C-extension modules takes 5.5 hours, compared to 35 minutes for all other interpreter loading and initialization. We developed a simple pure-Python module (based on knee.py, a hierarchical import example) that cuts the import time from 5.5 hours to 6 minutes. The code is available here: https://github.com/langton/MPI_Import Usage, implementation details, and limitations are described in a docstring at the beginning of the file (just after the mandatory legalese). I've talked with a few people who've faced the same problem and heard about a variety of approaches, which range from putting all necessary files in one directory to hacking the interpreter itself so it distributes the module-loading over MPI. Last summer, I had a student intern try a few of these approaches. It turned out that the problem wasn't so much the simultaneous module loads, but rather the huge number of failed open() calls (ENOENT) as the interpreter tries to find the module files. In the MPI_Import module, we have rank 0 perform the module lookups and then broadcast the locations to the rest of the processes. For our real-world scientific applications written in Python and C++, this has meant that we can start a problem and actually make computational progress before the batch allocation ends. If you try out the code, I'd appreciate any feedback you have: performance results, bugfixes/feature-additions, or alternate approaches to solving this problem. Thanks! -Asher From mamin at mbasciences.com Thu Jan 12 23:28:29 2012 From: mamin at mbasciences.com (Minesh B. Amin) Date: Thu, 12 Jan 2012 14:28:29 -0800 Subject: [Baypiggies] Improving Python+MPI import performance In-Reply-To: References: Message-ID: <1326407309.3269.4.camel@lusaka> Hi Asher, Simply amazing :) Reducing the number of failed open() calls is indeed the key. Cheers! Minesh On Thu, 2012-01-12 at 12:23 -0800, Asher Langton wrote: > Hi all, > > I work on a Python/C++ scientific code that runs as a number of > independent Python processes communicating via MPI. Unfortunately, as > some of you may have experienced, module importing does not scale well > in Python/MPI applications. For 32k processes on BlueGene/P, importing > 100 trivial C-extension modules takes 5.5 hours, compared to 35 > minutes for all other interpreter loading and initialization. We > developed a simple pure-Python module (based on knee.py, a > hierarchical import example) that cuts the import time from 5.5 hours > to 6 minutes. > > The code is available here: > > https://github.com/langton/MPI_Import > > From fperez.net at gmail.com Fri Jan 13 01:39:33 2012 From: fperez.net at gmail.com (Fernando Perez) Date: Thu, 12 Jan 2012 16:39:33 -0800 Subject: [Baypiggies] Improving Python+MPI import performance In-Reply-To: References: Message-ID: On Thu, Jan 12, 2012 at 12:23 PM, Asher Langton wrote: > I work on a Python/C++ scientific code that runs as a number of > independent Python processes communicating via MPI. Unfortunately, as > some of you may have experienced, module importing does not scale well > in Python/MPI applications. For 32k processes on BlueGene/P, importing > 100 trivial C-extension modules takes 5.5 hours, compared to 35 > minutes for all other interpreter loading and initialization. We > developed a simple pure-Python module (based on knee.py, a > hierarchical import example) that cuts the import time from 5.5 hours > to 6 minutes. > > The code is available here: > > https://github.com/langton/MPI_Import Excellent! I suggest you post this to the numpy list, I bet you it will be of interest to a lot of people... Cheers, f From ramiroluz at gmail.com Mon Jan 16 14:24:38 2012 From: ramiroluz at gmail.com (Ramiro B. da Luz) Date: Mon, 16 Jan 2012 11:24:38 -0200 Subject: [Baypiggies] OFF: Trip to PyConUS. Message-ID: Hi all. I am a Brazilian pythonista, host of the PythonBrasil[6]-2010 (PythonBrasil is the name we gave to PyConBrazil). First of all, sorry about the cross posting. I am planning my trip to US to attend to the PyConUS. I would like to make the most from my travel to US, so I intend to arrive some days before the conference/tutorials and leave some days after the conference/sprint. I planned to arrive in San Francisco at March 3, visit some places, attend to the conference and leave San Francisco at March 18. My mileage program company doesn't have flies to San Jose, so I will go to Santa Clara through San Francisco. I would like to visit a lot of places, go surf(just to say to my friends, it can be only one morning), go sky, visit famous places, maybe Los Angeles, Hollywood, visit the desert, aquarium, the golden gate, and do some shopping, specially in a free trade area. Any advice or tip are welcome. Cheap hotel or places to stay, things to take care, etc... Thank you. -- -- -- Ramiro Batista da Luz -- ramiroluz at gmail.com -- (41) 9173-2231 -- http://www.ramiroluz.eti.br -- Programador || C?mara Municipal de Curitiba From wescpy at gmail.com Mon Jan 16 22:16:17 2012 From: wescpy at gmail.com (wesley chun) Date: Mon, 16 Jan 2012 13:16:17 -0800 Subject: [Baypiggies] OFF: Trip to PyConUS. In-Reply-To: References: Message-ID: bom dia ramiro!! (eu n?o entendo portugu?s, portanto eu fala ingl?s!) sorry i did not meet you at PythonBrasil[7] a few months ago, but we welcome you to California! from the PyCon website, you will find this link to area attractions: https://us.pycon.org/2012/venue/explore/ however, it is only for the San Francisco and Silicon Valley. others will have to help you with visiting the southern part of the state or elsewhere. Note that it is about a 6-hour drive from here to Los Angeles, or one-hour by plane. I recommend the following airlines if you're planning on flying (look for airfare around $50USD or 90BRL each way): southwest.com, virginamerica.com, or alaskaair.com. good luck on your trip, and say HI to luciano, rodolpho, and ?rico for me! (do most Brazilian mens names end with "o"?) :-) --wesley On Mon, Jan 16, 2012 at 5:24 AM, Ramiro B. da Luz wrote: > Hi all. > > I am a Brazilian pythonista, host of the PythonBrasil[6]-2010 > (PythonBrasil is > the name we gave to PyConBrazil). > > First of all, sorry about the cross posting. > > I am planning my trip to US to attend to the PyConUS. > > I would like to make the most from my travel to US, so I intend to arrive > some > days before the conference/tutorials and leave some days after the > conference/sprint. > > I planned to arrive in San Francisco at March 3, visit some places, > attend to the > conference and leave San Francisco at March 18. My mileage program company > doesn't have flies to San Jose, so I will go to Santa Clara through > San Francisco. > > I would like to visit a lot of places, go surf(just to say to my > friends, it can be only > one morning), go sky, visit famous places, maybe Los Angeles, Hollywood, > visit > the desert, aquarium, the golden gate, and do some shopping, specially in > a free > trade area. > > Any advice or tip are welcome. Cheap hotel or places to stay, things > to take care, > etc... > > Thank you. -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python", Prentice Hall, (c)2007,2001 "Python Fundamentals", Prentice Hall, (c)2009 http://corepython.com wesley.chun : wescpy-gmail.com : @wescpy/+wescpy python training and technical consulting cyberweb.consulting : silicon valley, ca http://cyberwebconsulting.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jason at mischievous.org Mon Jan 16 23:08:08 2012 From: jason at mischievous.org (Jason Culverhouse) Date: Mon, 16 Jan 2012 14:08:08 -0800 Subject: [Baypiggies] OFF: Trip to PyConUS. In-Reply-To: References: Message-ID: My friends always think "California" and want to go surfing too, then I tell that the water here is REALLY cold, even in the summer, It's ~54F or ~12C off the coast right now. Say it better with charts... Off the San Mateo Coast http://www.surf-forecast.com/breaks/Lindamar/seatemp Vs Sao Paulo http://www.surf-forecast.com/breaks/Bonete/seatemp Jason On Jan 16, 2012, at 1:16 PM, wesley chun wrote: > bom dia ramiro!! (eu n?o entendo portugu?s, portanto eu fala ingl?s!) > > sorry i did not meet you at PythonBrasil[7] a few months ago, but we welcome you to California! from the PyCon website, you will find this link to area attractions: https://us.pycon.org/2012/venue/explore/ > > however, it is only for the San Francisco and Silicon Valley. others will have to help you with visiting the southern part of the state or elsewhere. Note that it is about a 6-hour drive from here to Los Angeles, or one-hour by plane. I recommend the following airlines if you're planning on flying (look for airfare around $50USD or 90BRL each way): southwest.com, virginamerica.com, or alaskaair.com. > > good luck on your trip, and say HI to luciano, rodolpho, and ?rico for me! (do most Brazilian mens names end with "o"?) :-) > > --wesley > > > On Mon, Jan 16, 2012 at 5:24 AM, Ramiro B. da Luz wrote: > Hi all. > > I am a Brazilian pythonista, host of the PythonBrasil[6]-2010 (PythonBrasil is > the name we gave to PyConBrazil). > > First of all, sorry about the cross posting. > > I am planning my trip to US to attend to the PyConUS. > > I would like to make the most from my travel to US, so I intend to arrive some > days before the conference/tutorials and leave some days after the > conference/sprint. > > I planned to arrive in San Francisco at March 3, visit some places, > attend to the > conference and leave San Francisco at March 18. My mileage program company > doesn't have flies to San Jose, so I will go to Santa Clara through > San Francisco. > > I would like to visit a lot of places, go surf(just to say to my > friends, it can be only > one morning), go sky, visit famous places, maybe Los Angeles, Hollywood, visit > the desert, aquarium, the golden gate, and do some shopping, specially in a free > trade area. > > Any advice or tip are welcome. Cheap hotel or places to stay, things > to take care, > etc... > > Thank you. > > > > -- > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > "Core Python", Prentice Hall, (c)2007,2001 > "Python Fundamentals", Prentice Hall, (c)2009 > http://corepython.com > > wesley.chun : wescpy-gmail.com : @wescpy/+wescpy > python training and technical consulting > cyberweb.consulting : silicon valley, ca > http://cyberwebconsulting.com > _______________________________________________ > 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 Web at StevePiercy.com Mon Jan 16 23:53:04 2012 From: Web at StevePiercy.com (Steve Piercy - Web Site Builder) Date: Mon, 16 Jan 2012 14:53:04 -0800 Subject: [Baypiggies] OFF: Trip to PyConUS. In-Reply-To: Message-ID: Indeed. You'll need at least a 3/2 or 4/3 wetsuit, probably a 4/3 during March. In Santa Cruz, Pleasure Point is my favorite spot. Lots of surf shops and food clustered on 41st Avenue in Capitola, with showers, easy access, and parking at the end of 41st. Always call a local shop for best information, including current conditions. http://g.co/maps/hpktt --steve On 1/16/12 at 2:08 PM, jason at mischievous.org (Jason Culverhouse) pronounced: >My friends always think "California" and want to go surfing >too, then I tell that the water here is REALLY cold, even in >the summer, It's ~54F or ~12C off the coast right now. >Say it better with charts... >Off the San Mateo Coast >http://www.surf-forecast.com/breaks/Lindamar/seatemp > >Vs >Sao Paulo >http://www.surf-forecast.com/breaks/Bonete/seatemp > >Jason > >On Jan 16, 2012, at 1:16 PM, wesley chun wrote: > >>bom dia ramiro!! (eu n?o entendo portugu?s, portanto eu fala ingl?s!) >> >>sorry i did not meet you at PythonBrasil[7] a few months ago, but we welcome you >to California! from the PyCon website, you will find this link >to area attractions: https://us.pycon.org/2012/venue/explore/ >> >>however, it is only for the San Francisco and Silicon Valley. others will have to >help you with visiting the southern part of the state or >elsewhere. Note that it is about a 6-hour drive from here to >Los Angeles, or one-hour by plane. I recommend the following >airlines if you're planning on flying (look for airfare around >$50USD or 90BRL each way): southwest.com, virginamerica.com, or alaskaair.com. >> >>good luck on your trip, and say HI to luciano, rodolpho, and ?rico for me! (do >most Brazilian mens names end with "o"?) :-) >> >>--wesley >> >> >>On Mon, Jan 16, 2012 at 5:24 AM, Ramiro B. da Luz wrote: >>Hi all. >> >>I am a Brazilian pythonista, host of the PythonBrasil[6]-2010 (PythonBrasil is >>the name we gave to PyConBrazil). >> >>First of all, sorry about the cross posting. >> >>I am planning my trip to US to attend to the PyConUS. >> >>I would like to make the most from my travel to US, so I intend to arrive some >>days before the conference/tutorials and leave some days after the >>conference/sprint. >> >>I planned to arrive in San Francisco at March 3, visit some places, >>attend to the >>conference and leave San Francisco at March 18. My mileage program company >>doesn't have flies to San Jose, so I will go to Santa Clara through >>San Francisco. >> >>I would like to visit a lot of places, go surf(just to say to my >>friends, it can be only >>one morning), go sky, visit famous places, maybe Los Angeles, Hollywood, visit >>the desert, aquarium, the golden gate, and do some shopping, specially in a free >>trade area. >> >>Any advice or tip are welcome. Cheap hotel or places to stay, things >>to take care, >>etc... >> >>Thank you. >> >> >> >>-- >>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >>"Core Python", Prentice Hall, (c)2007,2001 >>"Python Fundamentals", Prentice Hall, (c)2009 >>http://corepython.com >> >>wesley.chun : wescpy-gmail.com : @wescpy/+wescpy >>python training and technical consulting >>cyberweb.consulting : silicon valley, ca >>http://cyberwebconsulting.com >>_______________________________________________ >>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 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- Steve Piercy Web Site Builder Soquel, CA From keith at dartworks.biz Sat Jan 21 18:19:12 2012 From: keith at dartworks.biz (Keith Dart) Date: Sat, 21 Jan 2012 09:19:12 -0800 Subject: [Baypiggies] Anyone use urwid? Message-ID: <20120121091912.43c6dc84@dartworks.biz> Hello Pythonistas, Just curious if anyone has really used urwid library to create any console user interfaces? If so, how do you like it? Keith Dart -- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Keith Dart public key: ID: 19017044 ===================================================================== From itz at buug.org Mon Jan 23 05:50:50 2012 From: itz at buug.org (Ian Zimmerman) Date: Sun, 22 Jan 2012 20:50:50 -0800 Subject: [Baypiggies] version in python package distributions, argh Message-ID: <87bopv2f9x.fsf@foolinux.dyndns.org> How do people manage the version number in the setup.py file of your distributions? I have distributions that contain exectuable scripts. I like those scripts to have a -V or --version command line option like other well behaved programs. Unless I do something clever, this leads to duplication of the version info in at least 2 places, with predictable um, results. So, I did try something clever: from distutils.core import setup import subprocess sp = subprocess.Popen(['./hgit', '--version'], stdout=subprocess.PIPE) vline = sp.stdout.read() sp.wait() prog, version = vline.strip().split() setup (name = 'hgit', version = version, ... only to discover that during installation from a source package the script file is not necessarily executable, which will crash any invocation of setup.py. What other ways are there to solve this annoying situation? -- Ian Zimmerman gpg public key: 1024D/C6FF61AD fingerprint: 66DC D68F 5C1B 4D71 2EE5 BD03 8A00 786C C6FF 61AD Rule 420: All persons more than eight miles high to leave the court. From rbalfanz at gmail.com Mon Jan 23 07:25:43 2012 From: rbalfanz at gmail.com (Ryan Matthew Balfanz) Date: Sun, 22 Jan 2012 22:25:43 -0800 Subject: [Baypiggies] version in python package distributions, argh In-Reply-To: <87bopv2f9x.fsf@foolinux.dyndns.org> References: <87bopv2f9x.fsf@foolinux.dyndns.org> Message-ID: I have to look at another project setup.py file everytime I make one, to remember how to do it. I've found the one for django-celery to be pretty good: https://github.com/ask/django-celery/blob/master/setup.py. Hope it helps. Cheers, Ryan On Sun, Jan 22, 2012 at 8:50 PM, Ian Zimmerman wrote: > > How do people manage the version number in the setup.py file of your > distributions? I have distributions that contain exectuable scripts. I > like those scripts to have a -V or --version command line option like > other well behaved programs. Unless I do something clever, this leads > to duplication of the version info in at least 2 places, with > predictable um, results. > > So, I did try something clever: > > from distutils.core import setup > import subprocess > > sp = subprocess.Popen(['./hgit', '--version'], stdout=subprocess.PIPE) > vline = sp.stdout.read() > sp.wait() > prog, version = vline.strip().split() > > setup (name = 'hgit', > version = version, > > ... > > only to discover that during installation from a source package the > script file is not necessarily executable, which will crash any > invocation of setup.py. > > What other ways are there to solve this annoying situation? > > -- > Ian Zimmerman > gpg public key: 1024D/C6FF61AD > fingerprint: 66DC D68F 5C1B 4D71 2EE5 BD03 8A00 786C C6FF 61AD > Rule 420: All persons more than eight miles high to leave the court. > _______________________________________________ > 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 Mon Jan 23 17:38:29 2012 From: glen at glenjarvis.com (Glen Jarvis) Date: Mon, 23 Jan 2012 08:38:29 -0800 Subject: [Baypiggies] Talk this week? Message-ID: Do we have a BayPIGies this week? What subject? G -- Things which matter most must never be at the mercy of things which matter least. -- Goethe -------------- next part -------------- An HTML attachment was scrubbed... URL: From itz at buug.org Mon Jan 23 20:16:03 2012 From: itz at buug.org (Ian Zimmerman) Date: Mon, 23 Jan 2012 11:16:03 -0800 Subject: [Baypiggies] version in python package distributions, argh In-Reply-To: (Ryan Matthew Balfanz's message of "Sun, 22 Jan 2012 22:25:43 -0800") References: <87bopv2f9x.fsf@foolinux.dyndns.org> Message-ID: <87vco26xho.fsf@foolinux.dyndns.org> Ryan> I have to look at another project setup.py file everytime I make Ryan> one, to remember how to do it. I've found the one for Ryan> django-celery to be pretty good: Ryan> https://github.com/ask/django-celery/blob/master/setup.py. Ryan> Hope it helps. In a way it does :-/ It uses setuptools, not plain distutils. I have been trying to not depend on setuptools for some time. Maybe it is time to give up. -- Ian Zimmerman gpg public key: 1024D/C6FF61AD fingerprint: 66DC D68F 5C1B 4D71 2EE5 BD03 8A00 786C C6FF 61AD Rule 420: All persons more than eight miles high to leave the court. From dan at bot4.us Tue Jan 24 03:34:20 2012 From: dan at bot4.us (Dan Bikle) Date: Mon, 23 Jan 2012 18:34:20 -0800 Subject: [Baypiggies] Pythonistas invited to Sunday Hackternoon at Hacker Dojo Jan 29. Message-ID: Hello Bay Piggies, I invite you to Sunday Hackternoon at Hacker Dojo in Mountain View on Jan29 at 1pm: http://meetup.com/Hackternoon Sunday Hackternoon is for "Hackternooners" to practice paired programming. The resulting code is usually Open Source so we avoid discussions about who owns it. One of our Hackternooners is working on a project to deploy some Python code on Heroku. The application will be used to help end-users gain a better standing of thought patterns in their mind. I am hopeful this type of project will appeal to one or more Pythonistas. -- Dan (Hackternooner Founder) -- Some traders make their own luck. We use a robot. http://bot4.us From glen at glenjarvis.com Tue Jan 24 21:50:19 2012 From: glen at glenjarvis.com (Glen Jarvis) Date: Tue, 24 Jan 2012 12:50:19 -0800 Subject: [Baypiggies] Who's speaking (two days from now)? Message-ID: I'm sorry if I missed this in email (I'm looking at BayPIGgies.net). Does anyone know who is speaking this week and what the subject will be? Glen -- Things which matter most must never be at the mercy of things which matter least. -- Goethe -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux at gmail.com Tue Jan 24 22:49:04 2012 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Tue, 24 Jan 2012 13:49:04 -0800 Subject: [Baypiggies] Who's speaking (two days from now)? In-Reply-To: References: Message-ID: On Tue, Jan 24, 2012 at 12:50 PM, Glen Jarvis wrote: > I'm sorry if I missed this in email (I'm looking at BayPIGgies.net). Does > anyone know who is speaking this week and what the subject will be? I am. Here are the details: Speaker: Shannon -jj Behrens Talk: Dart Abstract: Dart is a new class-based programming language for creating structured web applications. Developed with the goals of simplicity, efficiency, and scalability, the Dart language combines powerful new language features with familiar language constructs into a clear, readable syntax. Why is Dart significant? Because Google has a fork of WebKit with the Dart VM integrated into the browser! Bio: JJ is a developer advocate for YouTube APIs. His goal is to foster a rich set of third-party applications built on YouTube APIs. He's a well-known member of the Python community. He blogs atjjinux.blogspot.com on topics such as Python, Ruby, Linux, open source software, the Web, and lesser-known programming languages. Best Regards, -jj -- 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 glen at glenjarvis.com Wed Jan 25 00:16:55 2012 From: glen at glenjarvis.com (Glen Jarvis) Date: Tue, 24 Jan 2012 15:16:55 -0800 Subject: [Baypiggies] Who's speaking (two days from now)? In-Reply-To: References: Message-ID: <553F6503-3304-40B7-BCD0-8DEF135CC54E@glenjarvis.com> Excellent!! Thanks, JJ G On Jan 24, 2012, at 1:49 PM, Shannon -jj Behrens wrote: > On Tue, Jan 24, 2012 at 12:50 PM, Glen Jarvis wrote: > I'm sorry if I missed this in email (I'm looking at BayPIGgies.net). Does anyone know who is speaking this week and what the subject will be? > > I am. Here are the details: > > Speaker: Shannon -jj Behrens > > Talk: Dart > > Abstract: > > Dart is a new class-based programming language for creating structured web applications. Developed with the goals of simplicity, efficiency, and scalability, the Dart language combines powerful new language features with familiar language constructs into a clear, readable syntax. Why is Dart significant? Because Google has a fork of WebKit with the Dart VM integrated into the browser! > > Bio: > > JJ is a developer advocate for YouTube APIs. His goal is to foster a rich set of third-party applications built on YouTube APIs. He's a well-known member of the Python community. He blogs atjjinux.blogspot.com on topics such as Python, Ruby, Linux, open source software, the Web, and lesser-known programming languages. > > Best Regards, > -jj > > -- > 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 bill at idealgov.com Wed Jan 25 01:13:17 2012 From: bill at idealgov.com (William Deegan) Date: Tue, 24 Jan 2012 16:13:17 -0800 Subject: [Baypiggies] Who's speaking (two days from now)? In-Reply-To: References: Message-ID: <711ACC2C-3E64-4CA2-A87C-539602B2E3B4@gmail.com> All, If I get a chance I'll add that to the website tonight. Any newbie nuggets? -Bill On Jan 24, 2012, at 1:49 PM, Shannon -jj Behrens wrote: > On Tue, Jan 24, 2012 at 12:50 PM, Glen Jarvis wrote: > I'm sorry if I missed this in email (I'm looking at BayPIGgies.net). Does anyone know who is speaking this week and what the subject will be? > > I am. Here are the details: > > Speaker: Shannon -jj Behrens > > Talk: Dart > > Abstract: > > Dart is a new class-based programming language for creating structured web applications. Developed with the goals of simplicity, efficiency, and scalability, the Dart language combines powerful new language features with familiar language constructs into a clear, readable syntax. Why is Dart significant? Because Google has a fork of WebKit with the Dart VM integrated into the browser! > > Bio: > > JJ is a developer advocate for YouTube APIs. His goal is to foster a rich set of third-party applications built on YouTube APIs. He's a well-known member of the Python community. He blogs atjjinux.blogspot.com on topics such as Python, Ruby, Linux, open source software, the Web, and lesser-known programming languages. > > Best Regards, > -jj > > -- > In this life we cannot do great things. We can only do small things with great love. -- Mother Teresa > _______________________________________________ > 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 ramiroluz at gmail.com Wed Jan 25 01:10:02 2012 From: ramiroluz at gmail.com (Ramiro B. da Luz) Date: Tue, 24 Jan 2012 22:10:02 -0200 Subject: [Baypiggies] OFF: Trip to PyConUS. In-Reply-To: References: Message-ID: Hi. Thank you for all the responses. I tried to reply each one individually. I bought the flying tickets, and made some plans. Fly: G3 1988 - Feb, 29 >From CWB(Curitiba) 09:50 To GIG(Rio de Janeiro) 11:19 Fly: AA 0974 - Feb, 29 >From GIG 22:25 To JFK 06:29 (Mar, 1) Fly: AA 0001 - Mar, 1 >From JFK 09:00 To LAX 12:30 Fly: AA 1954 - Mar, 4 >From LAX 14:20 To SFO 15:40 So, I made a stop over in Los Angeles without extra expenses, I intend to do a city tour in L.A. on Friday, Mar, 2. On Saturday I would like to visit Lake Tahoe, my plan is to fly to Reno, do a basic ski lesson(I have never seen snow) and go back to Los Angeles in the same day(by plane). Fly to San Francisco on Sunday and visit some places on Monday and Tuesday. I will try to subscribe in a tutorial at PyCon, but if I don't I will have two more days free to do some tourism. I will leave US on March, 19. Fly UA 0847, Mar, 19 >From SFO 13:02 To Washington Washington - S?o Paulo S?o Paulo - Curitiba. I plan to do some tourism in Santa Clara after the PyCon, following the recommendations from the PyCon site. Going to San Francisco just on Mar, 19 in the morning. Let me know if you have some advise, specially about clothes to ski. Thank you again. On Mon, Jan 16, 2012 at 11:24 AM, Ramiro B. da Luz wrote: > Hi all. > > I am a Brazilian pythonista, host of the PythonBrasil[6]-2010 (PythonBrasil is > the name we gave to PyConBrazil). > > First of all, sorry about the cross posting. > > I am planning my trip to US to attend to the PyConUS. > > I would like to make the most from my travel to US, so I intend to arrive some > days before the conference/tutorials and leave some days after the > conference/sprint. > > I planned to arrive in San Francisco at March 3, visit some places, > attend to the > conference and leave San Francisco at March 18. My mileage program company > doesn't have flies to San Jose, so I will go to Santa Clara through > San Francisco. > > I would like to visit a lot of places, go surf(just to say to my > friends, it can be only > one morning), go sky, visit famous places, maybe Los Angeles, Hollywood, visit > the desert, aquarium, the golden gate, and do some shopping, specially in a free > trade area. > > Any advice or tip are welcome. Cheap hotel or places to stay, things > to take care, > etc... > > Thank you. > > -- > -- > -- Ramiro Batista da Luz > -- ramiroluz at gmail.com > -- (41) 9173-2231 > -- http://www.ramiroluz.eti.br > -- Programador || C?mara Municipal de Curitiba -- -- -- Ramiro Batista da Luz -- ramiroluz at gmail.com -- (41) 9173-2231 -- http://www.ramiroluz.eti.br -- Programador || C?mara Municipal de Curitiba From jjinux at gmail.com Wed Jan 25 17:41:06 2012 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Wed, 25 Jan 2012 08:41:06 -0800 Subject: [Baypiggies] OFF: Trip to PyConUS. In-Reply-To: References: Message-ID: You should also: * Visit the Computer History Museum * Go to Frys (which is a huge store full of computer stuff) Both are somewhat close to PyCon. -jj On Tue, Jan 24, 2012 at 4:10 PM, Ramiro B. da Luz wrote: > Hi. > > Thank you for all the responses. > > I tried to reply each one individually. > > I bought the flying tickets, and made some plans. > > Fly: G3 1988 - Feb, 29 > >From CWB(Curitiba) 09:50 To GIG(Rio de Janeiro) 11:19 > > Fly: AA 0974 - Feb, 29 > >From GIG 22:25 To JFK 06:29 (Mar, 1) > > Fly: AA 0001 - Mar, 1 > >From JFK 09:00 To LAX 12:30 > > Fly: AA 1954 - Mar, 4 > >From LAX 14:20 To SFO 15:40 > > So, I made a stop over in Los Angeles without extra expenses, > I intend to do a city tour in L.A. on Friday, Mar, 2. On Saturday > I would like to visit Lake Tahoe, my plan is to fly to Reno, do > a basic ski lesson(I have never seen snow) and go back to Los > Angeles in the same day(by plane). Fly to San Francisco on > Sunday and visit some places on Monday and Tuesday. I will try to > subscribe in a tutorial at PyCon, but if I don't I will have two more > days free to do some tourism. > > I will leave US on March, 19. > Fly UA 0847, Mar, 19 > >From SFO 13:02 To Washington > Washington - S?o Paulo > S?o Paulo - Curitiba. > > I plan to do some tourism in Santa Clara after the PyCon, following > the recommendations from the PyCon site. Going to San Francisco > just on Mar, 19 in the morning. > > Let me know if you have some advise, specially about clothes to ski. > > Thank you again. > > > On Mon, Jan 16, 2012 at 11:24 AM, Ramiro B. da Luz > wrote: > > Hi all. > > > > I am a Brazilian pythonista, host of the PythonBrasil[6]-2010 > (PythonBrasil is > > the name we gave to PyConBrazil). > > > > First of all, sorry about the cross posting. > > > > I am planning my trip to US to attend to the PyConUS. > > > > I would like to make the most from my travel to US, so I intend to > arrive some > > days before the conference/tutorials and leave some days after the > > conference/sprint. > > > > I planned to arrive in San Francisco at March 3, visit some places, > > attend to the > > conference and leave San Francisco at March 18. My mileage program > company > > doesn't have flies to San Jose, so I will go to Santa Clara through > > San Francisco. > > > > I would like to visit a lot of places, go surf(just to say to my > > friends, it can be only > > one morning), go sky, visit famous places, maybe Los Angeles, Hollywood, > visit > > the desert, aquarium, the golden gate, and do some shopping, specially > in a free > > trade area. > > > > Any advice or tip are welcome. Cheap hotel or places to stay, things > > to take care, > > etc... > > > > Thank you. > > > > -- > > -- > > -- Ramiro Batista da Luz > > -- ramiroluz at gmail.com > > -- (41) 9173-2231 > > -- http://www.ramiroluz.eti.br > > -- Programador || C?mara Municipal de Curitiba > > > > -- > -- > -- Ramiro Batista da Luz > -- ramiroluz at gmail.com > -- (41) 9173-2231 > -- http://www.ramiroluz.eti.br > -- Programador || C?mara Municipal de Curitiba > _______________________________________________ > 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 jim at systemateka.com Wed Jan 25 18:16:06 2012 From: jim at systemateka.com (jim) Date: Wed, 25 Jan 2012 09:16:06 -0800 Subject: [Baypiggies] January BayPIGgies meeting: Thursday, January 26, 2012: Dart Message-ID: <1327511766.1696.23.camel@jim-LAPTOP> January BayPIGgies meeting: Thursday, January 26, 2012: Dart Speaker: Shannon JJ Behrens Abstract: Dart is a new class-based programming language for creating structured web applications. Developed with the goals of simplicity, efficiency, and scalability, the Dart language combines powerful new language features with familiar language constructs into a clear, readable syntax. Why is Dart significant? Because Google has a fork of WebKit with the Dart VM integrated into the browser! Bio: JJ is a developer advocate for YouTube APIs. His goal is to foster a rich set of third-party applications built on YouTube APIs. He's a well-known member of the Python community. He blogs at jjinux.blogspot.com on topics such as Python, Ruby, Linux, open source software, the Web, and lesser-known programming languages. http://jjinux.blogspot.com ......................................... LOCATION Symantec Corporation Symantec Vcafe 350 Ellis Street Mountain View, CA 94043 http://maps.google.com/maps/ms?oe=utf-8&client=firefox-a&ie=UTF8&fb=1&split=1&gl=us&ei=w6i_Sfr6MZmQsQOzlv0v&hl=en&t=h&msa=0&msid=116202735295394761637.00046550c09ff3d96bff1&ll=37.397693,-122.053707&spn=0.002902,0.004828&z=18 BayPIGgies meeting information is available at http://www.baypiggies.net/ ------------------------ Agenda ------------------------ ..... 7:30 PM ........................... General hubbub, inventory end-of-meeting announcements, any first-minute announcements. ..... 7:35 PM to 8:25 PM (or so) ................ The talk: Dart ..... 8:25 PM to 8:55 PM (or so) ................ Questions and Answers ..... 8:55 PM to 9:30 PM (or so) ................ Mapping and Random Access Mapping is a rapid-fire audience announcement of issues, hiring, events, and other topics. Random Access follows people immediately to allow follow up on the announcements and other interests. From daves at cfotogo.com Wed Jan 25 18:52:08 2012 From: daves at cfotogo.com (David Schnepper) Date: Wed, 25 Jan 2012 09:52:08 -0800 Subject: [Baypiggies] OFF: Trip to PyConUS. In-Reply-To: References: Message-ID: And, of course WeirdStuff http://www.weirdstuff.com/cgi-bin/category.cgi?category=sunnyvalestore On Wed, Jan 25, 2012 at 8:41 AM, Shannon -jj Behrens wrote: > You should also: > > * Visit the Computer History Museum > * Go to Frys (which is a huge store full of computer stuff) > > Both are somewhat close to PyCon. > > -jj > > On Tue, Jan 24, 2012 at 4:10 PM, Ramiro B. da Luz wrote: > >> Hi. >> >> Thank you for all the responses. >> >> I tried to reply each one individually. >> >> I bought the flying tickets, and made some plans. >> >> Fly: G3 1988 - Feb, 29 >> >From CWB(Curitiba) 09:50 To GIG(Rio de Janeiro) 11:19 >> >> Fly: AA 0974 - Feb, 29 >> >From GIG 22:25 To JFK 06:29 (Mar, 1) >> >> Fly: AA 0001 - Mar, 1 >> >From JFK 09:00 To LAX 12:30 >> >> Fly: AA 1954 - Mar, 4 >> >From LAX 14:20 To SFO 15:40 >> >> So, I made a stop over in Los Angeles without extra expenses, >> I intend to do a city tour in L.A. on Friday, Mar, 2. On Saturday >> I would like to visit Lake Tahoe, my plan is to fly to Reno, do >> a basic ski lesson(I have never seen snow) and go back to Los >> Angeles in the same day(by plane). Fly to San Francisco on >> Sunday and visit some places on Monday and Tuesday. I will try to >> subscribe in a tutorial at PyCon, but if I don't I will have two more >> days free to do some tourism. >> >> I will leave US on March, 19. >> Fly UA 0847, Mar, 19 >> >From SFO 13:02 To Washington >> Washington - S?o Paulo >> S?o Paulo - Curitiba. >> >> I plan to do some tourism in Santa Clara after the PyCon, following >> the recommendations from the PyCon site. Going to San Francisco >> just on Mar, 19 in the morning. >> >> Let me know if you have some advise, specially about clothes to ski. >> >> Thank you again. >> >> >> On Mon, Jan 16, 2012 at 11:24 AM, Ramiro B. da Luz >> wrote: >> > Hi all. >> > >> > I am a Brazilian pythonista, host of the PythonBrasil[6]-2010 >> (PythonBrasil is >> > the name we gave to PyConBrazil). >> > >> > First of all, sorry about the cross posting. >> > >> > I am planning my trip to US to attend to the PyConUS. >> > >> > I would like to make the most from my travel to US, so I intend to >> arrive some >> > days before the conference/tutorials and leave some days after the >> > conference/sprint. >> > >> > I planned to arrive in San Francisco at March 3, visit some places, >> > attend to the >> > conference and leave San Francisco at March 18. My mileage program >> company >> > doesn't have flies to San Jose, so I will go to Santa Clara through >> > San Francisco. >> > >> > I would like to visit a lot of places, go surf(just to say to my >> > friends, it can be only >> > one morning), go sky, visit famous places, maybe Los Angeles, >> Hollywood, visit >> > the desert, aquarium, the golden gate, and do some shopping, specially >> in a free >> > trade area. >> > >> > Any advice or tip are welcome. Cheap hotel or places to stay, things >> > to take care, >> > etc... >> > >> > Thank you. >> > >> > -- >> > -- >> > -- Ramiro Batista da Luz >> > -- ramiroluz at gmail.com >> > -- (41) 9173-2231 >> > -- http://www.ramiroluz.eti.br >> > -- Programador || C?mara Municipal de Curitiba >> >> >> >> -- >> -- >> -- Ramiro Batista da Luz >> -- ramiroluz at gmail.com >> -- (41) 9173-2231 >> -- http://www.ramiroluz.eti.br >> -- Programador || C?mara Municipal de Curitiba >> _______________________________________________ >> 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 > > _______________________________________________ > 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 simeonf at gmail.com Wed Jan 25 19:15:30 2012 From: simeonf at gmail.com (Simeon Franklin) Date: Wed, 25 Jan 2012 10:15:30 -0800 Subject: [Baypiggies] Who's speaking (two days from now)? In-Reply-To: <711ACC2C-3E64-4CA2-A87C-539602B2E3B4@gmail.com> References: <711ACC2C-3E64-4CA2-A87C-539602B2E3B4@gmail.com> Message-ID: On Tue, Jan 24, 2012 at 4:13 PM, William Deegan wrote: > If I get a chance I'll add that to the website tonight. > Any newbie nuggets? > > -Bill I think Hy Carrel was planning to talk about TDD for the Newbie Nugget. -regards Simeon Franklin From janssen at parc.com Wed Jan 25 20:31:52 2012 From: janssen at parc.com (Bill Janssen) Date: Wed, 25 Jan 2012 11:31:52 PST Subject: [Baypiggies] OFF: Trip to PyConUS. In-Reply-To: References: Message-ID: <71566.1327519912@parc.com> Shannon -jj Behrens wrote: > You should also: > > * Visit the Computer History Museum Excellent tip. > * Go to Frys (which is a huge store full of computer stuff) Can't recommend it. Micro Center Silicon Valley is closer to the conference, and more fun (IMO). Bill From hcarrinski at gmail.com Fri Jan 27 07:09:12 2012 From: hcarrinski at gmail.com (Hy Carrinski) Date: Thu, 26 Jan 2012 22:09:12 -0800 Subject: [Baypiggies] Text of Newbie Nugget Message-ID: <8492696586115090950@unknownmsgid> The text of my Newbie Nugget from tonight can be found at: https://github.com/grepdisc/python_testing_talk The talk format is based on JJ's BDD talk, in the references. Let's talk testing! Hy Hy Carrel senior software engineer moduleQ 169 11th St, SF CA From glen at glenjarvis.com Fri Jan 27 20:11:10 2012 From: glen at glenjarvis.com (Glen Jarvis) Date: Fri, 27 Jan 2012 11:11:10 -0800 Subject: [Baypiggies] TDD and mocking Message-ID: Hy gave a good newbie nugget last night. I've been doing more TDD and am really excited about it. But, I struggle with mocking. My question last night was how to mock properly. The example that I gave was for my current project (A mechanical turk and Django smash up). Most of my project is really basic -- just interfacing with other libraries, etc. There are pieces that I need to test -- like some admin actions, Django management commands, etc. I've tried to use Mock libraries, but haven't gotten over the hump. Let me re-ask the question now. Would it be "cool" or "uncool" if I made my equivalent Python class for a HIT, Assignment and Answer (these are equivalent classes from Boto)? The class would be a very basic/thin slice of what Amazon/Boto would provide. And, then when I try to mock, I inject my models into my project (hand-wavy somehow via monkey patching)? Now that I write this, would it be better to instantiate the results that Boto would present and inject those into a mocked response from Amazon? I'm bumping around in the dark on this and just haven't gotten past the hump to really mock well. I think I'm going to just give my best college try and then send a link to the project, asking for feedback/review on how I could have done it better. Any offline advice would be appreciated. The project is currently "written" but I consider it my first draft -- and already have found mistakes that would have been found by doing TDD first. I'd like to remove code, build failing tests, put in each part of code, and let the design drive. Wiki: https://github.com/glenjarvis/djurk/wiki/Quick-Start Code: https://github.com/glenjarvis/djurk Warmest Regards Glen P.S. I got some good advice last night from JJ and others. But, as I thought of my question further, I don't think I need to go as far as the WSGI layer as I just need to simulate the objects that would be received from the function call.... thoughts? -- Things which matter most must never be at the mercy of things which matter least. -- Goethe -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux at gmail.com Fri Jan 27 22:48:23 2012 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Fri, 27 Jan 2012 13:48:23 -0800 Subject: [Baypiggies] Dart talk Message-ID: Hey guys, Thanks for letting me give the talk on Dart last night. Here are the slides: https://docs.google.com/open?id=0B_Z56A18VRlxMTI3YWU2ZTYtNzY3ZC00MDA1LTgzYmYtYTNhMDY3ZjUwNzc0 Best Regards, -jj -- 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 Fri Jan 27 23:03:01 2012 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Fri, 27 Jan 2012 14:03:01 -0800 Subject: [Baypiggies] TDD and mocking In-Reply-To: References: Message-ID: Here's my updated, slightly more pragmatic take on the issue. I think you should segregate code the interacts with Boto from code that deals with the data that you get back from Boto. For instance, if most of your code can be segregated into a function that takes some JSON and does something with it, then it'll be really easy to test. If you have an extremely short function that uses Boto that you don't have test coverage for, so be it. Eventually, you'll learn how to do dependency injection to test things like that, but in the short term, it's all about bang for buck. Happy Hacking! -jj On Fri, Jan 27, 2012 at 11:11 AM, Glen Jarvis wrote: > Hy gave a good newbie nugget last night. I've been doing more TDD and am > really excited about it. But, I struggle with mocking. > > My question last night was how to mock properly. The example that I gave > was for my current project (A mechanical turk and Django smash up). Most of > my project is really basic -- just interfacing with other libraries, etc. > There are pieces that I need to test -- like some admin actions, Django > management commands, etc. > > I've tried to use Mock libraries, but haven't gotten over the hump. Let me > re-ask the question now. > > Would it be "cool" or "uncool" if I made my equivalent Python class for a > HIT, Assignment and Answer (these are equivalent classes from Boto)? The > class would be a very basic/thin slice of what Amazon/Boto would provide. > And, then when I try to mock, I inject my models into my project > (hand-wavy somehow via monkey patching)? > > Now that I write this, would it be better to instantiate the results that > Boto would present and inject those into a mocked response from Amazon? I'm > bumping around in the dark on this and just haven't gotten past the hump to > really mock well. > > I think I'm going to just give my best college try and then send a link to > the project, asking for feedback/review on how I could have done it better. > Any offline advice would be appreciated. The project is currently "written" > but I consider it my first draft -- and already have found mistakes that > would have been found by doing TDD first. I'd like to remove code, build > failing tests, put in each part of code, and let the design drive. > > Wiki: https://github.com/glenjarvis/djurk/wiki/Quick-Start > > Code: https://github.com/glenjarvis/djurk > > Warmest Regards > > > Glen > P.S. I got some good advice last night from JJ and others. But, as I > thought of my question further, I don't think I need to go as far as the > WSGI layer as I just need to simulate the objects that would be received > from the function call.... thoughts? > -- > Things which matter most must never be at the mercy of things which matter > least. > > -- Goethe > > _______________________________________________ > 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 Fri Jan 27 23:40:17 2012 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Fri, 27 Jan 2012 14:40:17 -0800 Subject: [Baypiggies] Bad Gateway Message-ID: It looks like baypiggies.net is down. -jj -- 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 bill at idealgov.com Sat Jan 28 00:09:51 2012 From: bill at idealgov.com (William Deegan) Date: Fri, 27 Jan 2012 15:09:51 -0800 Subject: [Baypiggies] Bad Gateway In-Reply-To: References: Message-ID: Fixed. -Bill On Jan 27, 2012, at 2:40 PM, Shannon -jj Behrens wrote: > It looks like baypiggies.net is down. > > -jj > > -- > In this life we cannot do great things. We can only do small things with great love. -- Mother Teresa > _______________________________________________ > 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 meenalpant at gmail.com Tue Jan 31 08:56:45 2012 From: meenalpant at gmail.com (Meenal Pant) Date: Mon, 30 Jan 2012 23:56:45 -0800 Subject: [Baypiggies] Web designer /company ? Message-ID: Is anyone on this list a web designer or does anyone know/ can recommend a good and affordable web designer / company that creates logos and headers ? I have a job requirement and I am looking for someone for a few hours of work. Kindly reply to my email address and not the list. Thanks, Meenal -------------- next part -------------- An HTML attachment was scrubbed... URL: From aahz at pythoncraft.com Tue Jan 31 16:03:15 2012 From: aahz at pythoncraft.com (Aahz) Date: Tue, 31 Jan 2012 07:03:15 -0800 Subject: [Baypiggies] Happy Guido Day! Message-ID: <20120131150315.GA21834@panix.com>