From charles.merriam at gmail.com Mon Sep 1 03:27:14 2008 From: charles.merriam at gmail.com (Charles Merriam) Date: Sun, 31 Aug 2008 18:27:14 -0700 Subject: [Baypiggies] Looking for a newbie nugget presenter for Thursday, Sept 11th In-Reply-To: References: <8249c4ac0808281253y2d07a003h38cd077e1e14315b@mail.gmail.com> <47c890dc0808281830j67023214v21e833ff118bea55@mail.gmail.com> <1621f9fa0808291305w16770b37u5a2930592d4a25dd@mail.gmail.com> Message-ID: +1 on any talk working through scoping and immutables. I can give an introduction to Nose in 11 minutes. I would want someone to be the back-up laptop in case of projector problems. I'm getting cautious about running interactive demonstrations without a back-up. From max at theslimmers.net Tue Sep 2 18:13:14 2008 From: max at theslimmers.net (Max Slimmer) Date: Tue, 02 Sep 2008 09:13:14 -0700 Subject: [Baypiggies] translating shell environment variables In-Reply-To: References: Message-ID: <48BD661A.40803@theslimmers.net> Shiqi Yang wrote: > Hi, My python code is reading some xml files that have several shell > style environment variables like "$_" or "$$". > for example: > /tmp/$$.log > I need to extract them and translate them into real value when I read the file. > > Now I can only think of two ways of doing this, > 1 is to have a big dictionary in my python code which have all the > mappings from shell to python os module(or others as well) > another way is to get shell involved and have it pre-process the file, > but I'm afraid that way some of the values may not be well translated > since the context switch (like the pids, etc). > > Are there any python module that could help this kind of task? > or anyone has done similar work can share your experience? > > Any help will be highly appreciated. > > Thanks, > > you can use os.path.expandvars() on the cdata From charles.merriam at gmail.com Tue Sep 2 20:28:39 2008 From: charles.merriam at gmail.com (Charles Merriam) Date: Tue, 2 Sep 2008 11:28:39 -0700 Subject: [Baypiggies] Class methods as constructors? Message-ID: This may seem like a basic question. Apologies if it's a known recipe. I have a spot where I need a number of constructors for the same class and don't want to have too complicated an __init__ function. Using class methods seems like the cleanest code. x = Spam() # Simple case x = Spam.Pickled_Loaf(['Pimentos','Menthos']) x = Spam.Shake('chunky') with code in the Spam class like: @classmethod def Picked_Loaf(additives, extra_gelatin = False): assert not ('Menthos' in additives and 'Diet Coke' in additives) i = Spam() # make an instance i.additives = additives i.add_to_production_queue(Process.chopping) return i Is this the usual pattern? Any gotchas? Usually use "cls()" instead of "Spam()"? Charles From aleax at google.com Tue Sep 2 21:12:07 2008 From: aleax at google.com (Alex Martelli) Date: Tue, 2 Sep 2008 12:12:07 -0700 Subject: [Baypiggies] Class methods as constructors? In-Reply-To: References: Message-ID: <55dc209b0809021212s46457101vd99e285a2064b849@mail.gmail.com> On Tue, Sep 2, 2008 at 11:28 AM, Charles Merriam wrote: > This may seem like a basic question. Apologies if it's a known recipe. > > I have a spot where I need a number of constructors for the same class > and don't want to have too complicated an __init__ function. Using > class methods seems like the cleanest code. > > x = Spam() # Simple case > x = Spam.Pickled_Loaf(['Pimentos','Menthos']) > x = Spam.Shake('chunky') > > with code in the Spam class like: > > @classmethod > def Picked_Loaf(additives, extra_gelatin = False): You missed the cls first argument. > assert not ('Menthos' in additives and 'Diet Coke' in additives) > i = Spam() # make an instance > i.additives = additives > i.add_to_production_queue(Process.chopping) > return i > > Is this the usual pattern? Any gotchas? Usually use "cls()" instead > of "Spam()"? Yes, yes (you need to have cls!) AND most emphatically yes (if you don't call cls(), inheritance will produce pretty weird results). Alex From aahz at pythoncraft.com Tue Sep 2 22:47:05 2008 From: aahz at pythoncraft.com (Aahz) Date: Tue, 2 Sep 2008 13:47:05 -0700 Subject: [Baypiggies] Class methods as constructors? In-Reply-To: References: Message-ID: <20080902204705.GA25851@panix.com> On Tue, Sep 02, 2008, Charles Merriam wrote: > > I have a spot where I need a number of constructors for the same class > and don't want to have too complicated an __init__ function. Using > class methods seems like the cleanest code. > > x = Spam() # Simple case > x = Spam.Pickled_Loaf(['Pimentos','Menthos']) > x = Spam.Shake('chunky') > > with code in the Spam class like: > > @classmethod > def Picked_Loaf(additives, extra_gelatin = False): > assert not ('Menthos' in additives and 'Diet Coke' in additives) > i = Spam() # make an instance > i.additives = additives > i.add_to_production_queue(Process.chopping) > return i You probably don't want to use assert -- that gets optimized away with .pyo files. Overall, I personally would be more inclined to use a factory function or a slightly more complicated __init__ that dispatches, but there's nothing wrong with what you're doing. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ Adopt A Process -- stop killing all your children! From jjinux at gmail.com Wed Sep 3 02:37:06 2008 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Tue, 2 Sep 2008 17:37:06 -0700 Subject: [Baypiggies] Class methods as constructors? In-Reply-To: <20080902204705.GA25851@panix.com> References: <20080902204705.GA25851@panix.com> Message-ID: On Tue, Sep 2, 2008 at 1:47 PM, Aahz wrote: > On Tue, Sep 02, 2008, Charles Merriam wrote: >> >> I have a spot where I need a number of constructors for the same class >> and don't want to have too complicated an __init__ function. Using >> class methods seems like the cleanest code. >> >> x = Spam() # Simple case >> x = Spam.Pickled_Loaf(['Pimentos','Menthos']) >> x = Spam.Shake('chunky') >> >> with code in the Spam class like: >> >> @classmethod >> def Picked_Loaf(additives, extra_gelatin = False): >> assert not ('Menthos' in additives and 'Diet Coke' in additives) >> i = Spam() # make an instance >> i.additives = additives >> i.add_to_production_queue(Process.chopping) >> return i > > You probably don't want to use assert -- that gets optimized away with > .pyo files. > > Overall, I personally would be more inclined to use a factory function > or a slightly more complicated __init__ that dispatches, but there's > nothing wrong with what you're doing. Call me old school, but I still use factory functions (i.e. outside the class) like Aahz, but what you're doing is perfectly fine. -jj -- Don't you wish you had a really clever sig like mine? http://jjinux.blogspot.com/ From jjinux at gmail.com Wed Sep 3 02:40:14 2008 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Tue, 2 Sep 2008 17:40:14 -0700 Subject: [Baypiggies] Looking for a newbie nugget presenter for Thursday, Sept 11th In-Reply-To: References: <8249c4ac0808281253y2d07a003h38cd077e1e14315b@mail.gmail.com> <47c890dc0808281830j67023214v21e833ff118bea55@mail.gmail.com> <1621f9fa0808291305w16770b37u5a2930592d4a25dd@mail.gmail.com> Message-ID: On Sun, Aug 31, 2008 at 6:27 PM, Charles Merriam wrote: > +1 on any talk working through scoping and immutables. Let us all agree to give thanks to Guido. We no longer need to worry about the difference between a const pointer to an int and a pointer to a const int ;) -jj -- Don't you wish you had a really clever sig like mine? http://jjinux.blogspot.com/ From aleax at google.com Wed Sep 3 04:11:00 2008 From: aleax at google.com (Alex Martelli) Date: Tue, 2 Sep 2008 19:11:00 -0700 Subject: [Baypiggies] Class methods as constructors? In-Reply-To: References: <20080902204705.GA25851@panix.com> Message-ID: <55dc209b0809021911t64080edfk524f5f3a59a43197@mail.gmail.com> Problem with a factory function is that it doesn't generate "the right subclass"; as a class gets subclassed, the subclasses' authors have to keep adding corresponding factory functions to make instances of _them_ instead of ones the original class. And whenever you see names such as the_factory, subclass1_the_factory, subclass2_the_factory, that's a very strong code smell: somebody's not using namespaces and object orientation right. And "Namespaces are one honking great idea -- let's do more of those!", as the Zen of Python says as its rousing conclusion; basically, wanting to use factory functions instead of factory classmethods rejects this rousing applause for namespaces, and in a sense all of the Zen of Python. And yet, it's so *INCREDIBLY* easy...! Consider: >>> class mydt(datetime.datetime): " some cool added functionality here " ... >>> mydt.fromordinal(999999) mydt(2738, 11, 27, 0, 0) Could it be any easier? If the author of the datetime module had been so silly as to define a factor function datetime_fromordinal (instead of a class method of the datetime type) the poor author of the mydt subclass would have had to add their own laboriously named and boringly implemented mydt_fromordinal factory function -- presumably using the datetime_fromordinal factory to build a temporary datetime object, then copying the fields from those. How much silly boilerplate and wasted work...! But luckily, the author of the datetime module didn't make that silly mistake: they defined a class method, and mydt automatically takes advantage of it, freely and easily. Guess that module author understands and appreciates the Zen of Python, hm? Considering said author is Tim Peters, who also happened to *write* the Zen of Python, maybe that's not surprising;-). As for who's old-fashioned, well, my memory is a bit hazy after so long, but I believe I recall that Smalltalk '76 didn't yet have class methods, but Smalltalk '80 introduced them -- and the key use case has always been "alternate constructors" done RIGHT, as opposed to C++'s silly alternative of type-based overloading... who's to tell if a large number passed to a datetime constructor is meant as an ordinal or as a timestamp?! Having fromordinal and fromtimestamp as separately named class methods puts paid to that! So, averaging the difference, I think I've been using class methods as alternate constructors starting about 30 years ago (though I had to forgo them for a sadly long time when using languages that just didn't HAVE factory methods). How much longer has YOUR so-called-old-fashioned preferred approach of "factory functions" been around?-) Alex On Tue, Sep 2, 2008 at 5:37 PM, Shannon -jj Behrens wrote: > On Tue, Sep 2, 2008 at 1:47 PM, Aahz wrote: >> On Tue, Sep 02, 2008, Charles Merriam wrote: >>> >>> I have a spot where I need a number of constructors for the same class >>> and don't want to have too complicated an __init__ function. Using >>> class methods seems like the cleanest code. >>> >>> x = Spam() # Simple case >>> x = Spam.Pickled_Loaf(['Pimentos','Menthos']) >>> x = Spam.Shake('chunky') >>> >>> with code in the Spam class like: >>> >>> @classmethod >>> def Picked_Loaf(additives, extra_gelatin = False): >>> assert not ('Menthos' in additives and 'Diet Coke' in additives) >>> i = Spam() # make an instance >>> i.additives = additives >>> i.add_to_production_queue(Process.chopping) >>> return i >> >> You probably don't want to use assert -- that gets optimized away with >> .pyo files. >> >> Overall, I personally would be more inclined to use a factory function >> or a slightly more complicated __init__ that dispatches, but there's >> nothing wrong with what you're doing. > > Call me old school, but I still use factory functions (i.e. outside > the class) like Aahz, but what you're doing is perfectly fine. > > -jj > > -- > Don't you wish you had a really clever sig like mine? > http://jjinux.blogspot.com/ > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > From jjinux at gmail.com Wed Sep 3 08:46:23 2008 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Tue, 2 Sep 2008 23:46:23 -0700 Subject: [Baypiggies] Class methods as constructors? In-Reply-To: <55dc209b0809021911t64080edfk524f5f3a59a43197@mail.gmail.com> References: <20080902204705.GA25851@panix.com> <55dc209b0809021911t64080edfk524f5f3a59a43197@mail.gmail.com> Message-ID: Well argued. Thanks for schoolin' me ;) Now, if only you would have been around when I was stuck chaining together factory methods to begin with so I wouldn't have had to make that mistake! -jj On Tue, Sep 2, 2008 at 7:11 PM, Alex Martelli wrote: > Problem with a factory function is that it doesn't generate "the right > subclass"; as a class gets subclassed, the subclasses' authors have to > keep adding corresponding factory functions to make instances of > _them_ instead of ones the original class. > > And whenever you see names such as the_factory, subclass1_the_factory, > subclass2_the_factory, that's a very strong code smell: somebody's not > using namespaces and object orientation right. And "Namespaces are > one honking great idea -- let's do more of those!", as the Zen of > Python says as its rousing conclusion; basically, wanting to use > factory functions instead of factory classmethods rejects this rousing > applause for namespaces, and in a sense all of the Zen of Python. > > And yet, it's so *INCREDIBLY* easy...! Consider: > >>>> class mydt(datetime.datetime): " some cool added functionality here " > ... >>>> mydt.fromordinal(999999) > mydt(2738, 11, 27, 0, 0) > > Could it be any easier? If the author of the datetime module had been > so silly as to define a factor function datetime_fromordinal (instead > of a class method of the datetime type) the poor author of the mydt > subclass would have had to add their own laboriously named and > boringly implemented mydt_fromordinal factory function -- presumably > using the datetime_fromordinal factory to build a temporary datetime > object, then copying the fields from those. How much silly > boilerplate and wasted work...! > > But luckily, the author of the datetime module didn't make that silly > mistake: they defined a class method, and mydt automatically takes > advantage of it, freely and easily. Guess that module author > understands and appreciates the Zen of Python, hm? > > Considering said author is Tim Peters, who also happened to *write* > the Zen of Python, maybe that's not surprising;-). > > As for who's old-fashioned, well, my memory is a bit hazy after so > long, but I believe I recall that Smalltalk '76 didn't yet have class > methods, but Smalltalk '80 introduced them -- and the key use case has > always been "alternate constructors" done RIGHT, as opposed to C++'s > silly alternative of type-based overloading... who's to tell if a > large number passed to a datetime constructor is meant as an ordinal > or as a timestamp?! Having fromordinal and fromtimestamp as > separately named class methods puts paid to that! > > So, averaging the difference, I think I've been using class methods as > alternate constructors starting about 30 years ago (though I had to > forgo them for a sadly long time when using languages that just didn't > HAVE factory methods). How much longer has YOUR > so-called-old-fashioned preferred approach of "factory functions" been > around?-) > > > Alex > > On Tue, Sep 2, 2008 at 5:37 PM, Shannon -jj Behrens wrote: >> On Tue, Sep 2, 2008 at 1:47 PM, Aahz wrote: >>> On Tue, Sep 02, 2008, Charles Merriam wrote: >>>> >>>> I have a spot where I need a number of constructors for the same class >>>> and don't want to have too complicated an __init__ function. Using >>>> class methods seems like the cleanest code. >>>> >>>> x = Spam() # Simple case >>>> x = Spam.Pickled_Loaf(['Pimentos','Menthos']) >>>> x = Spam.Shake('chunky') >>>> >>>> with code in the Spam class like: >>>> >>>> @classmethod >>>> def Picked_Loaf(additives, extra_gelatin = False): >>>> assert not ('Menthos' in additives and 'Diet Coke' in additives) >>>> i = Spam() # make an instance >>>> i.additives = additives >>>> i.add_to_production_queue(Process.chopping) >>>> return i >>> >>> You probably don't want to use assert -- that gets optimized away with >>> .pyo files. >>> >>> Overall, I personally would be more inclined to use a factory function >>> or a slightly more complicated __init__ that dispatches, but there's >>> nothing wrong with what you're doing. >> >> Call me old school, but I still use factory functions (i.e. outside >> the class) like Aahz, but what you're doing is perfectly fine. >> >> -jj >> >> -- >> Don't you wish you had a really clever sig like mine? >> http://jjinux.blogspot.com/ >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> http://mail.python.org/mailman/listinfo/baypiggies >> > -- Don't you wish you had a really clever sig like mine? http://jjinux.blogspot.com/ From amax at redsymbol.net Wed Sep 3 19:12:23 2008 From: amax at redsymbol.net (Aaron Maxwell) Date: Wed, 3 Sep 2008 10:12:23 -0700 Subject: [Baypiggies] custom date parser Message-ID: <200809031012.23400.amax@redsymbol.net> Hi all, Below is a function that parses a date string in the form "YYYY-MM-DD" and returns a datetime.date object, or None if it's bad input and cannot be converted. However, it does a couple of special tricks. The data in certain cases is known to have a value for the day or month that is not in the valid range; e.g., it may be 2007-11-31 (November traditionally only has 30 days), or 2002-14-23. In this situation, I want to keep the most signficant good field(s) and set the lessors to 1, then return the date object from that - so the results of the above would be date(2007, 11, 1) or date(2002, 1, 1) respectively. The function below does this. It uses a triply-nested try/except block, and I can't shake the feeling that there is a shorter and clearer implementation. Any thoughts? Of course, one approach would be to manually check that the month and day field before passing them to datetime.date. I would rather reuse the validation code in the date class, though, for obvious reasons. Thanks in advance, Aaron {{{ import datetime def parse_datefield(raw_pubdate): ''' Parse a datefield Takes in a date string in the format YYYY-MM-DD. Returns a datetime.date object. ''' # ... imagine validation/error checking code here ... parts = map(int, raw_pubdate.split('-')) try: d = datetime.date(*parts) except ValueError: # day out of range? parts[-1] = 1 try: d = datetime.date(*parts) except ValueError: # month out of range? parts[-2] = 1 try: d = datetime.date(*parts) except ValueError: # give up d = None return d }}} -- Aaron Maxwell http://redsymbol.net From annaraven at gmail.com Wed Sep 3 19:17:52 2008 From: annaraven at gmail.com (Anna Ravenscroft) Date: Wed, 3 Sep 2008 10:17:52 -0700 Subject: [Baypiggies] custom date parser In-Reply-To: <200809031012.23400.amax@redsymbol.net> References: <200809031012.23400.amax@redsymbol.net> Message-ID: The dateutil module has a great fuzzy parser that lets you do all this. On Wed, Sep 3, 2008 at 10:12 AM, Aaron Maxwell wrote: > Hi all, > > Below is a function that parses a date string in the form "YYYY-MM-DD" > and returns a datetime.date object, or None if it's bad input and > cannot be converted. However, it does a couple of special tricks. > The data in certain cases is known to have a value for the day or > month that is not in the valid range; e.g., it may be 2007-11-31 > (November traditionally only has 30 days), or 2002-14-23. In this > situation, I want to keep the most signficant good field(s) and set > the lessors to 1, then return the date object from that - so the > results of the above would be date(2007, 11, 1) or date(2002, 1, 1) > respectively. > > The function below does this. It uses a triply-nested try/except > block, and I can't shake the feeling that there is a shorter and > clearer implementation. Any thoughts? > > Of course, one approach would be to manually check that the month and > day field before passing them to datetime.date. I would rather reuse > the validation code in the date class, though, for obvious reasons. > > Thanks in advance, > Aaron > > {{{ > import datetime > def parse_datefield(raw_pubdate): > ''' > Parse a datefield > Takes in a date string in the format YYYY-MM-DD. > Returns a datetime.date object. > ''' > # ... imagine validation/error checking code here ... > parts = map(int, raw_pubdate.split('-')) > try: > d = datetime.date(*parts) > except ValueError: > # day out of range? > parts[-1] = 1 > try: > d = datetime.date(*parts) > except ValueError: > # month out of range? > parts[-2] = 1 > try: > d = datetime.date(*parts) > except ValueError: > # give up > d = None > return d > }}} > > -- > Aaron Maxwell > http://redsymbol.net > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -- cordially, Anna -- Walking through the water. Trying to get across. Just like everybody else. -------------- next part -------------- An HTML attachment was scrubbed... URL: From aleax at google.com Wed Sep 3 20:22:15 2008 From: aleax at google.com (Alex Martelli) Date: Wed, 3 Sep 2008 11:22:15 -0700 Subject: [Baypiggies] custom date parser In-Reply-To: <200809031012.23400.amax@redsymbol.net> References: <200809031012.23400.amax@redsymbol.net> Message-ID: <55dc209b0809031122s5eeb9b6dgbbfb39914538190e@mail.gmail.com> Assuming you want exactly the functionality you've coded (as opposed to a more general fuzzy parse as Anna suggests), the key to making it more compact is seeing that what you're doing in your code is an unrolled loop -- and rolling it up again. E.g., after the initial assignment to parts, the rest of the code could be: for i in range(1, 4): try: return datetime.datetime(*parts) except ValueError: parts[-i] = 1 return None On Wed, Sep 3, 2008 at 10:12 AM, Aaron Maxwell wrote: > Hi all, > > Below is a function that parses a date string in the form "YYYY-MM-DD" > and returns a datetime.date object, or None if it's bad input and > cannot be converted. However, it does a couple of special tricks. > The data in certain cases is known to have a value for the day or > month that is not in the valid range; e.g., it may be 2007-11-31 > (November traditionally only has 30 days), or 2002-14-23. In this > situation, I want to keep the most signficant good field(s) and set > the lessors to 1, then return the date object from that - so the > results of the above would be date(2007, 11, 1) or date(2002, 1, 1) > respectively. > > The function below does this. It uses a triply-nested try/except > block, and I can't shake the feeling that there is a shorter and > clearer implementation. Any thoughts? > > Of course, one approach would be to manually check that the month and > day field before passing them to datetime.date. I would rather reuse > the validation code in the date class, though, for obvious reasons. > > Thanks in advance, > Aaron > > {{{ > import datetime > def parse_datefield(raw_pubdate): > ''' > Parse a datefield > Takes in a date string in the format YYYY-MM-DD. > Returns a datetime.date object. > ''' > # ... imagine validation/error checking code here ... > parts = map(int, raw_pubdate.split('-')) > try: > d = datetime.date(*parts) > except ValueError: > # day out of range? > parts[-1] = 1 > try: > d = datetime.date(*parts) > except ValueError: > # month out of range? > parts[-2] = 1 > try: > d = datetime.date(*parts) > except ValueError: > # give up > d = None > return d > }}} > > -- > Aaron Maxwell > http://redsymbol.net > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > From bsergean at gmail.com Wed Sep 3 20:57:50 2008 From: bsergean at gmail.com (Benjamin Sergeant) Date: Wed, 3 Sep 2008 11:57:50 -0700 Subject: [Baypiggies] return value from a recursive function is None while it should not be ... Message-ID: <1621f9fa0809031157w336aa389rda7c2e1f240a8cdd@mail.gmail.com> == The background == I'm trying to solve problem 26 from project euler: http://projecteuler.net/index.php?section=problems&id=26 The goal is to find digits recurring cycle in rational number fractional parts. 1 / 3 = 0.3333333 -> 3 is a recuring integer 1 / 7 = 0.142857 == The python problem == I have the following piece of code that try to solve that, probably not elegant but it kind of work. You can copy paste it and you should have the same output as I have, an assertion error: assert ( recurring_cycle(3) == '3'). find_recurring_part() returns a, that is printed and equals 3, but when recurring_cycle get it, it has become None !! Does anyone know what's going on ? Thanks ! - Benjamin. $ cat level26_strangeness.py #!/usr/bin/env python from decimal import Decimal, getcontext from re import findall def find_recurring_part(a, found): ''' >>> re.findall(r'(\d+)\1', '32323232') ['3232'] ''' result = findall(r'(\d+)\1', a) print a, result, found if len(result) == 0: return a if found else None # doing an old school if else does not help else: find_recurring_part(result[0], True) def recurring_cycle(i): q = Decimal(1) / Decimal(i) q = str(q)[2:] return find_recurring_part(q, False) getcontext().prec = 10 # increase for bigger numbers assert ( recurring_cycle(2) == None) assert ( recurring_cycle(3) == '3') $ ./level26_strangeness.py 5 [] False 3333333333 ['33333'] False 33333 ['33'] True 33 ['3'] True 3 [] True Traceback (most recent call last): File "./level26_strangeness.py", line 25, in assert ( recurring_cycle(3) == '3') AssertionError From jason.lai at gmail.com Wed Sep 3 21:18:12 2008 From: jason.lai at gmail.com (Jason Lai) Date: Wed, 3 Sep 2008 12:18:12 -0700 Subject: [Baypiggies] return value from a recursive function is None while it should not be ... In-Reply-To: <1621f9fa0809031157w336aa389rda7c2e1f240a8cdd@mail.gmail.com> References: <1621f9fa0809031157w336aa389rda7c2e1f240a8cdd@mail.gmail.com> Message-ID: <351d5ed20809031218y4a888dcdr2dd978c0e68bf578@mail.gmail.com> You need to put "return" in front of "find_recurring_part(result[0], True)" Hope that helps, - Jason On Wed, Sep 3, 2008 at 11:57 AM, Benjamin Sergeant wrote: > == The background == > > I'm trying to solve problem 26 from project euler: > http://projecteuler.net/index.php?section=problems&id=26 > The goal is to find digits recurring cycle in rational number fractional > parts. > 1 / 3 = 0.3333333 -> 3 is a recuring integer > 1 / 7 = 0.142857 > > == The python problem == > > I have the following piece of code that try to solve that, probably > not elegant but it kind of work. You can copy paste it and you should > have the same output as I have, an assertion error: assert ( > recurring_cycle(3) == '3'). find_recurring_part() returns a, that is > printed and equals 3, but when recurring_cycle get it, it has become > None !! > > Does anyone know what's going on ? > > Thanks ! > - Benjamin. > > $ cat level26_strangeness.py > #!/usr/bin/env python > > from decimal import Decimal, getcontext > from re import findall > > def find_recurring_part(a, found): > ''' > >>> re.findall(r'(\d+)\1', '32323232') > ['3232'] > ''' > result = findall(r'(\d+)\1', a) > print a, result, found > if len(result) == 0: > return a if found else None # doing an old school if else does not > help > else: > find_recurring_part(result[0], True) > > def recurring_cycle(i): > q = Decimal(1) / Decimal(i) > q = str(q)[2:] > return find_recurring_part(q, False) > > getcontext().prec = 10 # increase for bigger numbers > assert ( recurring_cycle(2) == None) > assert ( recurring_cycle(3) == '3') > > $ ./level26_strangeness.py > 5 [] False > 3333333333 ['33333'] False > 33333 ['33'] True > 33 ['3'] True > 3 [] True > Traceback (most recent call last): > File "./level26_strangeness.py", line 25, in > assert ( recurring_cycle(3) == '3') > AssertionError > _______________________________________________ > 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 Chris.Clark at ingres.com Wed Sep 3 21:29:22 2008 From: Chris.Clark at ingres.com (Chris Clark) Date: Wed, 03 Sep 2008 12:29:22 -0700 Subject: [Baypiggies] custom date parser In-Reply-To: <55dc209b0809031122s5eeb9b6dgbbfb39914538190e@mail.gmail.com> References: <200809031012.23400.amax@redsymbol.net> <55dc209b0809031122s5eeb9b6dgbbfb39914538190e@mail.gmail.com> Message-ID: <48BEE592.5000203@ingres.com> Also consider limiting the number of splits, to minimize processing, i.e.: From: ...raw_pubdate.split('-')..... To: ...raw_pubdate.split('-', 3)..... I ended up using a regex for my apps: # yyyy-mm-dd (ISO 8601 style) but only the date (no time, and no week), fairly strict, e.g. expect 2 digits for month and day ISO_regex_str = r'(?P\d{4})-(?P\d{2})-(?P\d{2})' Chris On 9/3/2008 11:22 AM, Alex Martelli wrote: > Assuming you want exactly the functionality you've coded (as opposed > to a more general fuzzy parse as Anna suggests), the key to making it > more compact is seeing that what you're doing in your code is an > unrolled loop -- and rolling it up again. E.g., after the initial > assignment to parts, the rest of the code could be: > > for i in range(1, 4): > try: return datetime.datetime(*parts) > except ValueError: parts[-i] = 1 > return None > > On Wed, Sep 3, 2008 at 10:12 AM, Aaron Maxwell wrote: > >> Hi all, >> >> Below is a function that parses a date string in the form "YYYY-MM-DD" >> and returns a datetime.date object, or None if it's bad input and >> cannot be converted. However, it does a couple of special tricks. >> The data in certain cases is known to have a value for the day or >> month that is not in the valid range; e.g., it may be 2007-11-31 >> (November traditionally only has 30 days), or 2002-14-23. In this >> situation, I want to keep the most signficant good field(s) and set >> the lessors to 1, then return the date object from that - so the >> results of the above would be date(2007, 11, 1) or date(2002, 1, 1) >> respectively. >> >> The function below does this. It uses a triply-nested try/except >> block, and I can't shake the feeling that there is a shorter and >> clearer implementation. Any thoughts? >> >> Of course, one approach would be to manually check that the month and >> day field before passing them to datetime.date. I would rather reuse >> the validation code in the date class, though, for obvious reasons. >> >> Thanks in advance, >> Aaron >> >> {{{ >> import datetime >> def parse_datefield(raw_pubdate): >> ''' >> Parse a datefield >> Takes in a date string in the format YYYY-MM-DD. >> Returns a datetime.date object. >> ''' >> # ... imagine validation/error checking code here ... >> parts = map(int, raw_pubdate.split('-')) >> try: >> d = datetime.date(*parts) >> except ValueError: >> # day out of range? >> parts[-1] = 1 >> try: >> d = datetime.date(*parts) >> except ValueError: >> # month out of range? >> parts[-2] = 1 >> try: >> d = datetime.date(*parts) >> except ValueError: >> # give up >> d = None >> return d >> }}} >> >> -- >> Aaron Maxwell >> http://redsymbol.net >> _______________________________________________ >> 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 mikeyp at snaplogic.org Wed Sep 3 21:16:07 2008 From: mikeyp at snaplogic.org (Michael Pittaro) Date: Wed, 03 Sep 2008 12:16:07 -0700 Subject: [Baypiggies] [Job Posting] Web Developer at SnapLogic Message-ID: <48BEE277.9000404@snaplogic.org> We're looking for a web developer to pick up some of the ongoing maintenance and enhancements to the SnapLogic developer site at http://www.snaplogic.org. Details are on the baypiggies job listing page http://baypiggies.net/new/plone/job-listings mike -- Mike Pittaro Co-Founder Snaplogic, Inc. mikeyp at snaplogic.org http://www.snaplogic.org/developer/mikeyp From amax at redsymbol.net Wed Sep 3 21:53:18 2008 From: amax at redsymbol.net (Aaron Maxwell) Date: Wed, 3 Sep 2008 12:53:18 -0700 Subject: [Baypiggies] custom date parser Message-ID: <200809031253.18483.amax@redsymbol.net> On Wednesday 03 September 2008 11:22:15 am you wrote: > Assuming you want exactly the functionality you've coded That is correct. > (as opposed > to a more general fuzzy parse as Anna suggests), the key to making it > more compact is seeing that what you're doing in your code is an > unrolled loop -- and rolling it up again. E.g., after the initial > assignment to parts, the rest of the code could be: > > for i in range(1, 4): > try: return datetime.datetime(*parts) > except ValueError: parts[-i] = 1 > return None That is the insight I was looking for. Thanks Alex. Anna, thanks for suggesting dateutils - not what's needed for this particular problem, but I was not familiar with it. Aaron > > On Wed, Sep 3, 2008 at 10:12 AM, Aaron Maxwell wrote: > > Hi all, > > > > Below is a function that parses a date string in the form "YYYY-MM-DD" > > and returns a datetime.date object, or None if it's bad input and > > cannot be converted. However, it does a couple of special tricks. > > The data in certain cases is known to have a value for the day or > > month that is not in the valid range; e.g., it may be 2007-11-31 > > (November traditionally only has 30 days), or 2002-14-23. In this > > situation, I want to keep the most signficant good field(s) and set > > the lessors to 1, then return the date object from that - so the > > results of the above would be date(2007, 11, 1) or date(2002, 1, 1) > > respectively. > > > > The function below does this. It uses a triply-nested try/except > > block, and I can't shake the feeling that there is a shorter and > > clearer implementation. Any thoughts? > > > > Of course, one approach would be to manually check that the month and > > day field before passing them to datetime.date. I would rather reuse > > the validation code in the date class, though, for obvious reasons. > > > > Thanks in advance, > > Aaron > > > > {{{ > > import datetime > > def parse_datefield(raw_pubdate): > > ''' > > Parse a datefield > > Takes in a date string in the format YYYY-MM-DD. > > Returns a datetime.date object. > > ''' > > # ... imagine validation/error checking code here ... > > parts = map(int, raw_pubdate.split('-')) > > try: > > d = datetime.date(*parts) > > except ValueError: > > # day out of range? > > parts[-1] = 1 > > try: > > d = datetime.date(*parts) > > except ValueError: > > # month out of range? > > parts[-2] = 1 > > try: > > d = datetime.date(*parts) > > except ValueError: > > # give up > > d = None > > return d > > }}} > > > > -- > > Aaron Maxwell > > http://redsymbol.net > > _______________________________________________ > > Baypiggies mailing list > > Baypiggies at python.org > > To change your subscription options or unsubscribe: > > http://mail.python.org/mailman/listinfo/baypiggies -- Aaron Maxwell http://redsymbol.net From bsergean at gmail.com Wed Sep 3 22:00:31 2008 From: bsergean at gmail.com (Benjamin Sergeant) Date: Wed, 3 Sep 2008 13:00:31 -0700 Subject: [Baypiggies] return value from a recursive function is None while it should not be ... In-Reply-To: <351d5ed20809031218y4a888dcdr2dd978c0e68bf578@mail.gmail.com> References: <1621f9fa0809031157w336aa389rda7c2e1f240a8cdd@mail.gmail.com> <351d5ed20809031218y4a888dcdr2dd978c0e68bf578@mail.gmail.com> Message-ID: <1621f9fa0809031300v4081acddla15388323c879cc@mail.gmail.com> That helped ... it looks like a missing ; level problem ... :) Thanks ! Benjamin. On Wed, Sep 3, 2008 at 12:18 PM, Jason Lai wrote: > You need to put "return" in front of "find_recurring_part(result[0], True)" > > Hope that helps, > > - Jason > > On Wed, Sep 3, 2008 at 11:57 AM, Benjamin Sergeant > wrote: >> >> == The background == >> >> I'm trying to solve problem 26 from project euler: >> http://projecteuler.net/index.php?section=problems&id=26 >> The goal is to find digits recurring cycle in rational number fractional >> parts. >> 1 / 3 = 0.3333333 -> 3 is a recuring integer >> 1 / 7 = 0.142857 >> >> == The python problem == >> >> I have the following piece of code that try to solve that, probably >> not elegant but it kind of work. You can copy paste it and you should >> have the same output as I have, an assertion error: assert ( >> recurring_cycle(3) == '3'). find_recurring_part() returns a, that is >> printed and equals 3, but when recurring_cycle get it, it has become >> None !! >> >> Does anyone know what's going on ? >> >> Thanks ! >> - Benjamin. >> >> $ cat level26_strangeness.py >> #!/usr/bin/env python >> >> from decimal import Decimal, getcontext >> from re import findall >> >> def find_recurring_part(a, found): >> ''' >> >>> re.findall(r'(\d+)\1', '32323232') >> ['3232'] >> ''' >> result = findall(r'(\d+)\1', a) >> print a, result, found >> if len(result) == 0: >> return a if found else None # doing an old school if else does not >> help >> else: >> find_recurring_part(result[0], True) >> >> def recurring_cycle(i): >> q = Decimal(1) / Decimal(i) >> q = str(q)[2:] >> return find_recurring_part(q, False) >> >> getcontext().prec = 10 # increase for bigger numbers >> assert ( recurring_cycle(2) == None) >> assert ( recurring_cycle(3) == '3') >> >> $ ./level26_strangeness.py >> 5 [] False >> 3333333333 ['33333'] False >> 33333 ['33'] True >> 33 ['3'] True >> 3 [] True >> Traceback (most recent call last): >> File "./level26_strangeness.py", line 25, in >> assert ( recurring_cycle(3) == '3') >> AssertionError >> _______________________________________________ >> Baypiggies mailing list >> Baypiggies at python.org >> To change your subscription options or unsubscribe: >> http://mail.python.org/mailman/listinfo/baypiggies > > From bdbaddog at gmail.com Fri Sep 5 06:58:32 2008 From: bdbaddog at gmail.com (William Deegan) Date: Thu, 4 Sep 2008 21:58:32 -0700 Subject: [Baypiggies] Baypiggies.net site changes. Message-ID: <8540148a0809042158n341cf958x2f610bd46fecdd03@mail.gmail.com> Greetings, After reading much of the plone book, I've made a few changes. Reverted to the plone default skin, and cropped the previous logo. I've reworked the book review section, and working with Tony, Jim and JJ to get the meeting schedules into Plone events. (Which I think will be RSS'able, not sure about that) The old skin is gone, so finally I can read the site on my blackjack phone. At some point I'll update to latest plone, but for now, I think it's a bit better than it was. Enjoy, Bill From cappy2112 at gmail.com Fri Sep 5 08:03:25 2008 From: cappy2112 at gmail.com (Tony Cappellini) Date: Thu, 4 Sep 2008 23:03:25 -0700 Subject: [Baypiggies] Baypiggies.net site changes. In-Reply-To: <8540148a0809042158n341cf958x2f610bd46fecdd03@mail.gmail.com> References: <8540148a0809042158n341cf958x2f610bd46fecdd03@mail.gmail.com> Message-ID: <8249c4ac0809042303o36618808y2fb5ec8e917663b3@mail.gmail.com> It looks great! Finally, it's readable. Thanks bill! On Thu, Sep 4, 2008 at 9:58 PM, William Deegan wrote: > Greetings, > > After reading much of the plone book, I've made a few changes. > > Reverted to the plone default skin, and cropped the previous logo. > > I've reworked the book review section, and working with Tony, Jim and > JJ to get the meeting schedules into Plone events. > (Which I think will be RSS'able, not sure about that) > > The old skin is gone, so finally I can read the site on my blackjack phone. > > At some point I'll update to latest plone, but for now, I think it's a > bit better than it was. > > Enjoy, > Bill > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > From wescpy at gmail.com Fri Sep 5 10:16:53 2008 From: wescpy at gmail.com (wesley chun) Date: Fri, 5 Sep 2008 01:16:53 -0700 Subject: [Baypiggies] [ANN] final 2008 Python courses, San Francisco Message-ID: <78b3a9580809050116w2cfd7a98s10b7b9d201a979d8@mail.gmail.com> *** some of you asked me for more specific information when speaking with me at the meeting several weeks ago, so here is the general announcement. i will also X-post to CLP so apologies in advance for duplicates *** Need to get up-to-speed with Python as quickly as possible? Come join me, Wesley Chun, author of Prentice-Hall's bestseller "Core Python Programming," for another comprehensive intro course plus a 1-day Internet programming course coming up in November in beautiful Northern California! I look forward to meeting you! (Comprehensive) Introduction to Python Mon-Wed, 2008 Nov 10-12, 9am-5pm Internet Programming with Python Sat, 2008 Nov 15, 9am-5pm courses can be taken separately or combined for a discounted price. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (COMPREHENSIVE) INTRODUCTION TO PYTHON Although this course may appear to those new to Python, it is also perfect for those who have tinkered with it and want to "fill in the gaps" and/or want to get more in-depth formal training. It combines the best of both an introduction to the language as well as a "Python Internals" training course. We will immerse you in the world of Python in only a few days, showing you more than just its syntax (which you don't really need a book to learn, right?). Knowing more about how Python works under the covers, including the relationship between data objects and memory management, will make you a much more effective Python programmer coming out of the gate. 3 hands-on labs each day will help hammer the concepts home. Come find out why Google, Yahoo!, Disney, ILM/LucasFilm, VMware, NASA, Ubuntu, YouTube, and Red Hat all use Python. Users supporting or jumping to Plone, Zope, TurboGears, Pylons, Django, Google App Engine, Jython, IronPython, and Mailman will also benefit! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INTERNET PROGRAMMING WITH PYTHON This is a one-day course with lecture and lab exposing attendees to FOUR distinct areas of Internet programming: * Network Programming using Sockets -- we introduce client/server architecture and how to program sockets using Python. * Internet Client Programming -- we learn how to use Python's standard library to create FTP, NNTP, POP3, and SMTP clients * Web Programming -- before you jump on all the web framework bandwagons, it's a good idea to learn basics and the basis of how all web servers deliver dynamic content back to the client browser to prepare you better when jumping to a full-stack web framework * Intro to Django -- a lightweight introduction to the Django web framework including whipping up a very simple blog application in 20min! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WHERE: near the San Francisco Airport (SFO/San Bruno), CA, USA WEB: http://cyberwebconsulting.com (click "Python Training") LOCALS: easy freeway (101/280/380) with lots of parking plus public transit (BART and CalTrain) access via the San Bruno stations, easily accessible from all parts of the Bay Area VISITORS: free shuttle to/from the airport, free high-speed internet, free breakfast and regular evening receptions; fully-equipped suites See website for costs, venue info, and registration. Discounts are available for multiple registrations as well as for teachers/students. Hope to see you there! -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Prentice Hall, (c)2007,2001 http://corepython.com "Python Web Development with Django", Addison Wesley, (c) 2008 http://withdjango.com wesley.j.chun :: wescpy-at-gmail.com python training and technical consulting cyberweb.consulting : silicon valley, ca http://cyberwebconsulting.com From slander at unworkable.org Fri Sep 5 19:25:27 2008 From: slander at unworkable.org (Harry Tormey) Date: Fri, 5 Sep 2008 10:25:27 -0700 Subject: [Baypiggies] PyGameSF meetup Tuesday September 16th 7pm @ Metreon San Francisco Message-ID: <20080905172527.GB13213@unworkable.org> Hi All, Just writing to say that this months PyGameSF meet up is on Tuesday September 16th from 7pm at the Metreon food court in San Francisco. This month's presentations are: - Amar Chaudhary "Python, OpenSound Control and Open Sound World." About: This talk will demonstrate Open Sound World (OSW), a dynamic, scalable environment for audio and music processing, and the ability to control OSW via Python and OpenSound Control. This system can be used for building musical instruments or effects for use in live performance, as well as "live coding." PyGame SF is an informal group meet up in San Francisco for Software engineers interested in python, OpenGL, audio, pygame, SDL, programming and generally anything to do with multimedia development. The format of our meetings typically involve several people giving presentations on projects they are developing followed by group discussion and feedback. If anyone else would like to give a micro presentation, show demos or just talk about what they are doing or generally give examples of any relevant software they are working on please feel free to head along. To subscribe to the pygamesf mailing list simply email pygame-sf+subscribe at unworkable.org -- Harry Tormey From jjinux at gmail.com Fri Sep 5 22:56:58 2008 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Fri, 5 Sep 2008 13:56:58 -0700 Subject: [Baypiggies] Baypiggies.net site changes. In-Reply-To: <8249c4ac0809042303o36618808y2fb5ec8e917663b3@mail.gmail.com> References: <8540148a0809042158n341cf958x2f610bd46fecdd03@mail.gmail.com> <8249c4ac0809042303o36618808y2fb5ec8e917663b3@mail.gmail.com> Message-ID: Thanks for all your hard work Bill and Jim. -jj On Thu, Sep 4, 2008 at 11:03 PM, Tony Cappellini wrote: > It looks great! Finally, it's readable. > Thanks bill! > > On Thu, Sep 4, 2008 at 9:58 PM, William Deegan wrote: >> Greetings, >> >> After reading much of the plone book, I've made a few changes. >> >> Reverted to the plone default skin, and cropped the previous logo. >> >> I've reworked the book review section, and working with Tony, Jim and >> JJ to get the meeting schedules into Plone events. >> (Which I think will be RSS'able, not sure about that) >> >> The old skin is gone, so finally I can read the site on my blackjack phone. >> >> At some point I'll update to latest plone, but for now, I think it's a >> bit better than it was. >> >> Enjoy, >> Bill >> _______________________________________________ >> 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 > -- Don't you wish you had a really clever sig like mine? http://jjinux.blogspot.com/ From slander at unworkable.org Fri Sep 5 23:04:10 2008 From: slander at unworkable.org (Harry Tormey) Date: Fri, 5 Sep 2008 14:04:10 -0700 Subject: [Baypiggies] Additional speaker for PyGameSF September 16th Meet up In-Reply-To: <20080905172527.GB13213@unworkable.org> References: <20080905172527.GB13213@unworkable.org> Message-ID: <20080905210410.GB7447@unworkable.org> Hi All, A last minute addition to the line up for this months PyGameSF meet up: -Keith Nemitz (http://www.mousechief.com/) 'Making PyGames That Make Money' About: This talk will cover how to organize your production and tools, how to exploit market opportunities, and what the near future of small game developer business and tools look like. -Harry On Fri, Sep 05, 2008 at 10:25:27AM -0700, Harry Tormey wrote: > Hi All, > Just writing to say that this months PyGameSF meet up is on Tuesday > September 16th from 7pm at the Metreon food court in San Francisco. This > month's presentations are: > > - Amar Chaudhary "Python, OpenSound Control and Open Sound World." > > About: This talk will demonstrate Open Sound World (OSW), a dynamic, scalable > environment for audio and music processing, and the ability to control > OSW via Python and OpenSound Control. This system can be used for building > musical instruments or effects for use in live performance, as well as > "live coding." > > PyGame SF is an informal group meet up in San Francisco for Software > engineers interested in python, OpenGL, audio, pygame, SDL, programming > and generally anything to do with multimedia development. The format of > our meetings typically involve several people giving presentations on projects > they are developing followed by group discussion and feedback. > > If anyone else would like to give a micro presentation, show demos or > just talk about what they are doing or generally give examples of any > relevant software they are working on please feel free to head along. > > To subscribe to the pygamesf mailing list simply email > pygame-sf+subscribe at unworkable.org > > -- > Harry Tormey > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies -- Harry Tormey P2P Research http://p2presearch.com From cappy2112 at gmail.com Sun Sep 7 00:04:10 2008 From: cappy2112 at gmail.com (Tony Cappellini) Date: Sat, 6 Sep 2008 15:04:10 -0700 Subject: [Baypiggies] Volunteer wanted to review: Pragmatic Version Control Using Subversion, 2nd Ed Message-ID: <8249c4ac0809061504t67ee45bel3a90b7360ef1c1e2@mail.gmail.com> Someone requested this book way back in 2005 but never did the review. The book was just returned to me. Title: Pragmatic Version Control Using Subversion ISBN: 0-9745140-6-3 Author: Mike Mason Publisher: Pragmatic Bookshelf It's yours if you want to write a review on this book. Please reply off list. Thanks Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: From bdbaddog at gmail.com Sun Sep 7 20:31:55 2008 From: bdbaddog at gmail.com (William Deegan) Date: Sun, 7 Sep 2008 11:31:55 -0700 Subject: [Baypiggies] Video from baypiggies scons presentation available? (August 2008 baypiggies meeting)? Message-ID: <8540148a0809071131n376d8710qc422cc9d24451a46@mail.gmail.com> Greetings, Anyone know if the video of the august 2008 baypiggies meeting is up on google video somewhere yet? If not, any ETA? There's a bunch of bay area python + scons users who didn't make it to the meeting who'd like to see it. Thanks, Bill From lhawthorn at google.com Sun Sep 7 22:35:17 2008 From: lhawthorn at google.com (Leslie Hawthorn) Date: Sun, 7 Sep 2008 13:35:17 -0700 Subject: [Baypiggies] Video from baypiggies scons presentation available? (August 2008 baypiggies meeting)? In-Reply-To: <8540148a0809071131n376d8710qc422cc9d24451a46@mail.gmail.com> References: <8540148a0809071131n376d8710qc422cc9d24451a46@mail.gmail.com> Message-ID: <4869cee70809071335j119b63d3x57542c8baab96452@mail.gmail.com> Hi William, On Sun, Sep 7, 2008 at 11:31 AM, William Deegan wrote: > Greetings, > > Anyone know if the video of the august 2008 baypiggies meeting is up > on google video somewhere yet? > If not, any ETA? > I have a mail in to check on this. This process used to be automatic but there seem to be snags over the past few month, not sure why. I'll update the list when I find out more. Cheers, LH -- Leslie Hawthorn Program Manager - Open Source Google Inc. http://code.google.com/opensource/ I blog here: http://google-opensource.blogspot.com - http://www.hawthornlandings.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From lhawthorn at google.com Sun Sep 7 22:38:23 2008 From: lhawthorn at google.com (Leslie Hawthorn) Date: Sun, 7 Sep 2008 13:38:23 -0700 Subject: [Baypiggies] Video from baypiggies scons presentation available? (August 2008 baypiggies meeting)? In-Reply-To: <4869cee70809071335j119b63d3x57542c8baab96452@mail.gmail.com> References: <8540148a0809071131n376d8710qc422cc9d24451a46@mail.gmail.com> <4869cee70809071335j119b63d3x57542c8baab96452@mail.gmail.com> Message-ID: <4869cee70809071338v234cd9cfg1189876c5dc012f7@mail.gmail.com> On Sun, Sep 7, 2008 at 1:35 PM, Leslie Hawthorn wrote: > Hi William, > > On Sun, Sep 7, 2008 at 11:31 AM, William Deegan wrote: > >> Greetings, >> >> Anyone know if the video of the august 2008 baypiggies meeting is up >> on google video somewhere yet? >> If not, any ETA? >> > > I have a mail in to check on this. This process used to be automatic but > there seem to be snags over the past few month, not sure why. I'll update > the list when I find out more. > Wait, now I am confused. This is the program information and video linked from the baypiggies.net site: http://baypiggies.net/new/plone/meeting-archive Thursday, August 9, 2007 *7:30* General hubbub, inventory end-of-meeting announcements, any first-minute announcements. *7:35 - 8:40pm Technical Program* *Topic: *Newbies' Night Part Deux *Speakers:* Alex Martelli This mentions nothing about Scons. Are we talking about a talk for a different month perhaps? Cheers, LH -------------- next part -------------- An HTML attachment was scrubbed... URL: From bdbaddog at gmail.com Sun Sep 7 22:42:26 2008 From: bdbaddog at gmail.com (William Deegan) Date: Sun, 7 Sep 2008 13:42:26 -0700 Subject: [Baypiggies] Video from baypiggies scons presentation available? (August 2008 baypiggies meeting)? In-Reply-To: <4869cee70809071338v234cd9cfg1189876c5dc012f7@mail.gmail.com> References: <8540148a0809071131n376d8710qc422cc9d24451a46@mail.gmail.com> <4869cee70809071335j119b63d3x57542c8baab96452@mail.gmail.com> <4869cee70809071338v234cd9cfg1189876c5dc012f7@mail.gmail.com> Message-ID: <8540148a0809071342y13d807en5975fdbe02a8d237@mail.gmail.com> Leslie, Here's the meeting I'm asking about: http://baypiggies.net/new/plone/eventfolder/baypiggies-meeting-august-14th/?searchterm=None Looks like the baypiggies meeting archive is not corrrect. I'll fix that. -Bill On Sun, Sep 7, 2008 at 1:38 PM, Leslie Hawthorn wrote: > > > On Sun, Sep 7, 2008 at 1:35 PM, Leslie Hawthorn > wrote: >> >> Hi William, >> >> On Sun, Sep 7, 2008 at 11:31 AM, William Deegan >> wrote: >>> >>> Greetings, >>> >>> Anyone know if the video of the august 2008 baypiggies meeting is up >>> on google video somewhere yet? >>> If not, any ETA? >> >> I have a mail in to check on this. This process used to be automatic but >> there seem to be snags over the past few month, not sure why. I'll update >> the list when I find out more. > > Wait, now I am confused. This is the program information and video linked > from the baypiggies.net site: > > http://baypiggies.net/new/plone/meeting-archive > > Thursday, August 9, 2007 > > 7:30 > > General hubbub, inventory end-of-meeting announcements, any first-minute > announcements. > > 7:35 - 8:40pm Technical Program > > Topic: Newbies' Night Part Deux > > Speakers: Alex Martelli > > This mentions nothing about Scons. Are we talking about a talk for a > different month perhaps? > > Cheers, > LH > > From cuba at well.com Mon Sep 8 00:08:15 2008 From: cuba at well.com (Larry Cuba) Date: Sun, 07 Sep 2008 15:08:15 -0700 Subject: [Baypiggies] Video from baypiggies scons presentation available? (August 2008 baypiggies meeting)? In-Reply-To: <8540148a0809071342y13d807en5975fdbe02a8d237@mail.gmail.com > References: <8540148a0809071131n376d8710qc422cc9d24451a46@mail.gmail.com> <4869cee70809071335j119b63d3x57542c8baab96452@mail.gmail.com> <4869cee70809071338v234cd9cfg1189876c5dc012f7@mail.gmail.com> <8540148a0809071342y13d807en5975fdbe02a8d237@mail.gmail.com> Message-ID: <6.2.5.6.2.20080907144257.04a52508@well.com> Right. Something's wrong there. The most recent meeting in that archive is the August of *2007* meeting (not '08) . But, while we're on this subject... That Aug.7,2007 meeting was Part 2 of Martelli's two-part Newbies' Night talks, "Python for Programmers" Part 1 is listed further down on May 10, 2007. However... The video link under *both* talks point to the video of Part 1: http://video.google.com/videoplay?docid=1135114630744003385 and the same goes for the links to the pdf of the slides: http://www.aleax.it/goo_py4prog.pdf So whatever happened to the video (and slides) of Part 2? Are they online somewhere? Or was "Part 2" just a repeat of Part 1 and not recorded? Please let me know. I've been looking for them. thanks. Larry C. At 01:42 PM 9/7/2008, you wrote: >Leslie, > >Here's the meeting I'm asking about: >http://baypiggies.net/new/plone/eventfolder/baypiggies-meeting-august-14th/?searchterm=None > >Looks like the baypiggies meeting archive is not corrrect. >I'll fix that. > >-Bill > >On Sun, Sep 7, 2008 at 1:38 PM, Leslie Hawthorn wrote: >> >> >> On Sun, Sep 7, 2008 at 1:35 PM, Leslie Hawthorn >> wrote: >>> >>> Hi William, >>> >>> On Sun, Sep 7, 2008 at 11:31 AM, William Deegan >>> wrote: >>>> >>>> Greetings, >>>> >>>> Anyone know if the video of the august 2008 baypiggies meeting is up >>>> on google video somewhere yet? >>>> If not, any ETA? >>> >>> I have a mail in to check on this. This process used to be automatic but >>> there seem to be snags over the past few month, not sure why. I'll update >>> the list when I find out more. >> >> Wait, now I am confused. This is the program information and video linked >> from the baypiggies.net site: >> >> http://baypiggies.net/new/plone/meeting-archive >> >> Thursday, August 9, 2007 >> >> 7:30 >> >> General hubbub, inventory end-of-meeting announcements, any first-minute >> announcements. >> >> 7:35 - 8:40pm Technical Program >> >> Topic: Newbies' Night Part Deux >> >> Speakers: Alex Martelli >> >> This mentions nothing about Scons. Are we talking about a talk for a >> different month perhaps? >> >> Cheers, >> LH >> >> >_______________________________________________ >Baypiggies mailing list >Baypiggies at python.org >To change your subscription options or unsubscribe: >http://mail.python.org/mailman/listinfo/baypiggies From mrbmahoney at gmail.com Tue Sep 9 05:12:49 2008 From: mrbmahoney at gmail.com (Brian Mahoney) Date: Mon, 8 Sep 2008 20:12:49 -0700 Subject: [Baypiggies] Dinner Announcement - Thursday, September 11, 6 pm Message-ID: <5538c19b0809082012x37ae2b13haa633e416002ae08@mail.gmail.com> For Thursday, September 11, I can coordinate a pre-meeting dinner in Mountain View, before the BayPIGgies meeting at Google . Restaurant reservations may be sent to my email until Thursday afternoon (earlier is better). We eat family-style, there are vegetarian and non-vegetarian dishes. Cost around $10 per person, including tax and tip. Bring cash, please. Start dinner at 6pm and I will keep things moving so that we finish and get everyone headed towards Google to complete sign-in before the 7:30 meeting start. The restaurant is Cafe Yulong in downtown Mountain View (650) 960-1677 743 W Dana Street, 1/2 block from Castro where Books, Inc is on the corner. Parking lots all around, but downtown Mountain View parking can be difficult. It is a slightly out of the ordinary Chinese restaurant. This link has a downtown map and additional information. http://www.mountainviewca.net/restaurants/cafeyulong.html I've made reservations under "Python" for 6pm Thursday. If you wish to join us for dinner please e-mail me by 3 pm Thursday (earlier is better) so I may confirm the headcount. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappy2112 at gmail.com Tue Sep 9 18:33:39 2008 From: cappy2112 at gmail.com (Tony Cappellini) Date: Tue, 9 Sep 2008 09:33:39 -0700 Subject: [Baypiggies] Fwd: [php|architect] Join Us at php|works and PyWorks 2008! In-Reply-To: <9D89FFBA-2A8F-4F86-94E6-F8105E29204A@phparch.com> References: <9D89FFBA-2A8F-4F86-94E6-F8105E29204A@phparch.com> Message-ID: <8249c4ac0809090933g25d82df9i7271ce2a4b27d11a@mail.gmail.com> If you are experiencing problems reading this e-mail, please click here. Join Us at php|works and PyWorks 2008! Free training when you sign up! Sign up for any conference + tutorial day package *before September 27* and receive complimentary access to one of our training classes free of charge?*a $900 value yours completely free*! For more information, visit our Specials Page Dear tony? The publishers of php|architectand Python Magazine, are proud to invite you to php|worksand PyWorks, two great conferences that will take place in *Atlanta, GA, USA*, between November 12 and November 14. With over *65 talks in 5 tracks, 10 tutorials* and great networking events and parties, php|works and PyWorks represent a unique opportunity to not only hone your technical skills, but also meet and interact with members of a vibrant community of developers from all walks of life. And remember?your attendance fee covers access to *both conferences!* Here's a brief, partial selection of some of the great talks that will be presented at php|works and PyWorks: - Matthew Weier O'Phinney: *Rich UIs with Zend Framework and Dojo* - Sebastian Bergmann: *Lambdas, closures and traits in PHP* - Sara Golemon: *Simple scaling every developer should know* - Travis Swicegood: *Introduction to Git* - Mark Ramm: *Building Web Applications with TurboGears* - Michael Foord: *IronPython: Python on .NET* - Morgan Tocker: *Performance Tuning MySQL* - Chris Shiflett: *Security-Centered Design* - D. Keith Casey, Jr.: *Mobilizing the Web* You can find the complete schedule for both conferences here. With attendance fees starting as low as $499 per person, special hotel deals and a location that is just minutes by one of the most accessible international airports in the world, php|works and PyWorks are *your* chance to be part of a unique learning experience! Sign up today?don't miss out! Copyright (c) 2002-2008 Marco Tabini & Associates, Inc. ? All Rights Reserved Contact Us? Manage your e-mail preferences -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at well.com Wed Sep 10 07:50:23 2008 From: jim at well.com (jim) Date: Tue, 09 Sep 2008 22:50:23 -0700 Subject: [Baypiggies] BayPIGgies meeting Thursday September 11, 2008: Music and Lights Message-ID: <1221025823.30326.132.camel@ubuntu> BayPIGgies meeting Thursday September 11, 2008: Finger Painting with Planets by Speaker Finger Painting with Planets is an interactive installation using FingerWorks iGesture multitouch pads in a custom-built controller. The installation lets people place objects in space. Gravitational attraction between the objects produces graceful movements that are translated into visuals and sound. Knobs and buttons on the controller are used to adjust parameters. A musical keyboard is used to select notes that will be used in the music. Theater Lighting System by Drew Perttula I'll talk about 3 major new improvements to my theater lighting system since the last presentation in 2005: a midi input device (with python driver); the use of RDF for most of the persistent data; and a new tool for rendering previews of lighting scenes with opengl. The meeting starts with a Newbie Nugget, a short discussion of an essential Python feature, specially for those new to Python. Tonight's Newbie Nugget is... Micro-benchmarking with timeit, presented by Matt Good. Location: Google Campus Building 40, the Seville room (check in at the lobby in bldg 43) bayPIGgies meeting information: http://baypiggies.net/new/plone * Please sign up in advance to have your google access badge ready: http://wiki.python.org/moin/BayPiggiesGoogleMeetings (no later than close of business on Wednesday.) Agenda ..... 7:30 PM ........................... General hubbub, inventory end-of-meeting announcements, any first-minute announcements. ..... 7:35 PM to 7:45 PM ................ Newbie Nugget Benchmarking with timeit by Matt Good ..... 7:45 PM to 8:15 PM ................ Finger Painting with Planets by Tim Thompson ..... 8:15 PM to 8:45 PM ................ Theater Lighting System by Drew Perttula ..... 8:45 PM to 9:00 PM -- After The Talk ................ Mapping and Random Access Mapping is a rapid-fire audience announcement of topics the announcers are interested in. Random Access follows immediately to allow follow up individually on the announcements and other topics of interest. From ibuono at pixar.com Wed Sep 10 22:58:43 2008 From: ibuono at pixar.com (Ian Buono) Date: Wed, 10 Sep 2008 13:58:43 -0700 Subject: [Baypiggies] Software Engineer in Test at Pixar, Emeryville Message-ID: <56E88BB4-CEEE-4E55-B4DF-FAB0F537D722@pixar.com> We're looking to fill a position on the QA team responsible for testing an in house tool set used to make films such as Wall-E, Ratatouille and Toy Story. This is a full time position focused on extending the test framework and test coverage. The tools under test have a python API and the test harness is written in python as well. For a full job description see: http://tinyurl.com/yjv6he If you're interested, either mail ibuono at pixar.com or submit your resume though the above link. From lhawthorn at google.com Thu Sep 11 01:15:12 2008 From: lhawthorn at google.com (Leslie Hawthorn) Date: Wed, 10 Sep 2008 16:15:12 -0700 Subject: [Baypiggies] BayPIGgies meeting Thursday September 11, 2008: Music and Lights In-Reply-To: <1221025823.30326.132.camel@ubuntu> References: <1221025823.30326.132.camel@ubuntu> Message-ID: <4869cee70809101615n3590415eu37df4fe633eca557@mail.gmail.com> Hi folks, You're back with me as your Google Mountain View meetings point of contact. Please try to sign up on the wiki to attend tomorrow's meeting no later than 12 noon. Sorry for the late reminder. http://wiki.python.org/moin/BayPiggiesGoogleMeetings Jim, since you are coordinating meetings on the community side can you please send out this reminder? Apologies if you have and I have missed it in the past. It would also be lovely to make the "register on the wiki" note on baypiggies.net more prominent. I was about to ask that this information be added to the website when I happened to see the word "register" in the left hand nav out of the corner of my eye. Donna, are you still handling site updates? Cheers, LH -------------- next part -------------- An HTML attachment was scrubbed... URL: From spmcinerney at hotmail.com Fri Sep 12 22:45:43 2008 From: spmcinerney at hotmail.com (Stephen McInerney) Date: Fri, 12 Sep 2008 13:45:43 -0700 Subject: [Baypiggies] Reproing IDLE bug 3841 Message-ID: Could anyone help reproing this minor IDLE bug? http://bugs.python.org/issue3841 I found it on Windows Vista with Python 2.5 / IDLE 1.2.2. I don't have ready access to non-Windows installs or else I would do it myself and not bother the list with such a request. Copy-and-paste the testcase, view it inside IDLE and see what if the issue occurs. Should only take 1 minute. Please let me know if you can/cannot repro on a combination of each of these: OS: Windows XP (SP2?), Windows Vista (SP1?), Linux Python version: 2.5, 2.6, 2.7, 3.0 IDLE versions: ? Thanks in advance, Stephen _________________________________________________________________ Want to do more with Windows Live? Learn ?10 hidden secrets? from Jamie. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From cvrebert at gmail.com Fri Sep 12 22:54:47 2008 From: cvrebert at gmail.com (Chris Rebert) Date: Fri, 12 Sep 2008 13:54:47 -0700 Subject: [Baypiggies] Reproing IDLE bug 3841 In-Reply-To: References: Message-ID: <47c890dc0809121354i4b0fd456n9888822f5a1e969a@mail.gmail.com> Assuming the string is supposed to be all on one line, I can't reproduce. Python 2.5.2 IDLE 1.2.2 Mac OS X 10.5.4 Regards, Chris On Fri, Sep 12, 2008 at 1:45 PM, Stephen McInerney wrote: > > Could anyone help reproing this minor IDLE bug? > http://bugs.python.org/issue3841 > I found it on Windows Vista with Python 2.5 / IDLE 1.2.2. > I don't have ready access to non-Windows installs or else I would do it > myself > and not bother the list with such a request. > Copy-and-paste the testcase, view it inside IDLE and see what if the issue > occurs. > Should only take 1 minute. > > Please let me know if you can/cannot repro on a combination of each > of these: > OS: Windows XP (SP2?), Windows Vista (SP1?), Linux > Python version: 2.5, 2.6, 2.7, 3.0 > IDLE versions: ? > > Thanks in advance, > Stephen > > ________________________________ > Want to do more with Windows Live? Learn "10 hidden secrets" from Jamie. > Learn Now > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > -- Follow the path of the Iguana... http://rebertia.com From lavendula6654 at yahoo.com Sat Sep 13 01:09:54 2008 From: lavendula6654 at yahoo.com (Elaine) Date: Fri, 12 Sep 2008 16:09:54 -0700 (PDT) Subject: [Baypiggies] Python course at Foothill College Message-ID: <309480.45238.qm@web31301.mail.mud.yahoo.com> If you would like to learn Python, Foothill College is offering a course in Palo Alto starting Wednesday evening, 24 Sept, at 6 pm. This 12-week course is designed for students who are already familiar with another structured programming language. Here is more detailed information: CIS 68K "INTRODUCTION TO PYTHON PROGRAMMING" 5 Units Meets Wednesday evenings, 6 -9:40 pm, from 24 Sept. until 10 Dec. at Middlefield campus room J3. If you would like to sign up for the class, please register beforehand by going to: http://www.foothill.fhda.edu/reg/index.php If you have questions, you can contact the instructor at: haightElaine at foothill.edu From AFife at untangle.com Sat Sep 13 21:01:02 2008 From: AFife at untangle.com (Andrew Fife) Date: Sat, 13 Sep 2008 12:01:02 -0700 Subject: [Baypiggies] BALUG = Ian Murdock (Tuesday) In-Reply-To: References: Message-ID: <9347C2AED406124287DD2A007EB15B13BAEB5A5F@EXCHANGE.Untangle.local> Hi Folks: Ian Murdock will be speaking at BALUG this coming Tuesday (9/16). Ian founded Debian in 1993 and served as project lead through 1996. Currently Ian is the Vice President of Developer and Community Marketing at Sun Microsystems and previously was the CTO of the Linux Foundation. (Full bio links below) ============================ VERY important changes... ============================ 1)Change in venue We are NOT meeting at the Four Seas Restaurant because they have a conflict. However, Songbird (http://www.songbird.com/) has kindly offer the use of their office in SOMA for the meeting. (Address below) 2)Change in food & cost We will be ordering pizza & soda for this meeting. The cost will be $10, meat and veggie-friendly options will be available and we promise it won't be Pizza Hut or Domino's. 3)RSVPs REQUIRED Due to the fact that Songbird can host about 75 attendees (we may well get a full house) _AND_ that BALUG volunteers are personally paying for pizza upfront, we are *requiring* an RSVP for this event. So, if you'd like to join us *please* RSVP now (or at least as soon as you can!) to: rsvp at balug.org Meeting Details... 6:30 P.M. September 16th, 2008 Songbird's Corporate Office 585 Howard St. (near 2nd St.) San Francisco, CA 94105-3032 Map w/ Parking Garages: http://tinyurl.com/5zbwuu Cost: The meetings are always free, but pizza & soda is $10 Links to Ian Murdock's full bios: Personal: http://ianmurdock.com/about/ Corporate: http://www.sun.com/aboutsun/media/ceo/bio.jsp?name=Ian%20Murdock More information, additional maps, other upcoming meetings, etc.: http://www.balug.org/ -- publicity-feedback at balug.org From zander at longnow.org Tue Sep 16 18:22:04 2008 From: zander at longnow.org (Long Now) Date: Tue, 16 Sep 2008 09:22:04 -0700 Subject: [Baypiggies] Python Programmer for The Long Now Foundation Message-ID: <48CFDD2C.2020400@longnow.org> Python payment processing Developer http://www.longnow.org/jobs/ The Long Now Foundation is looking for a Python programmer, familiar with Paypal's Payflow Pro (recurring) billing module and both it's client side SDK and HTTP Interface API. We are looking to integrate membership functionality into our new Django-based web site; allowing users to signup for a recurring charge membership. Most internal functionality (for auth, users, profile, messaging) is written. You will be in charge of creating, in Python, the bits that interact with Payflow Pro Gateway through their HTTP Interface API. Creating, Polling, Updating paypal-bound profiles. You will need to write the error handling, retry logic and all other functionality surrounding Payflow Pro interaction since the HTTP Interface does not include it. Ideally the candidate would be local to the San Francisco Bay Area, but we are willing to consider candidates anywhere in the PST time zone. The candidate should have past experience with recurring credit card transaction systems, and be available for ongoing support after the development process. We are looking to develop a long-term relationship. Recommended Skills * Django web-framework * Python * PHP * MySQL * Version Control (Subversion) * General UNIX knowledge Please send text resume and well considered cover letter to jobs at longnow.org (Resume and cover letter should be in the body of an email, links to past work a plus, NO ATTACHMENTS) -- Alexander Rose From careers at flowgram.com Wed Sep 17 18:58:26 2008 From: careers at flowgram.com (Flowgram Careers) Date: Wed, 17 Sep 2008 09:58:26 -0700 Subject: [Baypiggies] Developer Opening at Flowgram (San Francisco, CA) Message-ID: <9bbccded0809170958h413bf543qb733d9d5d7117ff9@mail.gmail.com> Please send your resume and cover letter to careers at flowgram.com. Visit http://www.flowgram.com to see Flowgram in action. *Position Details* Flowgram is seeking passionate, versatile developers with a focus on back-end technologies. If you enjoy constant exploration, learning, a fast-paced environment, and believe that working with other great people is paramount to building a great product and company, we should talk. Responsibilities: - Optimize and continue to develop current product offerings based on user feedback and analysis. - Collaborate with the team to plan and design new functionality - Do whatever it takes to translate product designs and requirements into launch ready web offerings. Command of at least several of the following... - HTML, XHTML, CSS, DOM, AJAX - Object oriented JavaScript development - Cross-browser compatibility issues and degradation strategies - Django/Python - Flex/Flash - Object oriented programming - LAMP and competing technologies - Automated build and test systems, functional, unit, and integration testing - Linux/FreeBSD Bonus points - Experience building widgets for MySpace and/or Facebook platform - Data driven product evolution expertise - Webkit development experience or deep knowledge of other browser technologies - Previous experience scaling consumer facing applications *Other Details:* Full-time/Salaried positions *About Us* We are building a new communications platform that lets *anyone* package and share *anything* on the internet in ways never before possible. A Flowgram combines the advantages of slide presentations and screencasts with an interactive user experience that fully exploits the fact that almost all the information we might ever need is already on the web. Using the zero download Flowgram Maker, creators can assemble and annotate web pages, photographs, videos etc on any topic, and add a voice narrative which provides context, emotion and consistency. This uniquely personalized package can be shared as an embeddable widget, email or as a link to either a private group or with the world. Flowgram recipients can interact with any of its pages by, for example, clicking on links, and playing and pausing videos. Thousands of compelling Flowgrams have already been created for education, training, sales, photo journalism, humor, website walkthroughs, and tutorials etc. Our small team has backgrounds from Macromedia, Yahoo, Google and is committed to building the most compelling and hassle free user experiences human possible. Our founder Abhay Parekh previously co-founded Fast Forward Networks which sold for over $1b and is also an Adjunct Professor of EECS at UC Berkeley. Flowgram's mission has captured the imagination of a prestigious group of individuals with exceptional track records including Flowgram investors include Reid Hoffman (Paypal, Linkedin), First Round Capital, Kevin Lynch (CTO Adobe), the founders of Flickr and Half.com, the founding CEO of Macromedia, and members of the founding team of WebEx and Tibco Software. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux at gmail.com Wed Sep 17 20:40:16 2008 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Wed, 17 Sep 2008 11:40:16 -0700 Subject: [Baypiggies] multithreading question Message-ID: I know that threads are the devil and all, but I have a threading question ;) I'm using the queue module to coordinate a bunch of threads. Those threads need to log a line to STDOUT. The line is short. Can I count on the GIL to make sure that writing a single line to STDOUT is atomic, or do I need to be more paranoid? -jj -- Don't you wish you had a really clever sig like mine? http://jjinux.blogspot.com/ From adam at hupp.org Wed Sep 17 21:01:45 2008 From: adam at hupp.org (Adam Hupp) Date: Wed, 17 Sep 2008 12:01:45 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: References: Message-ID: <766a29bd0809171201k6742dfbcn86436232ee8676f8@mail.gmail.com> On Wed, Sep 17, 2008 at 11:40 AM, Shannon -jj Behrens wrote: > > I'm using the queue module to coordinate a bunch of threads. Those > threads need to log a line to STDOUT. The line is short. Can I count > on the GIL to make sure that writing a single line to STDOUT is > atomic, or do I need to be more paranoid? Isn't the GIL dropped during any IO? In that case I don't think you can rely on it. -- Adam Hupp | http://hupp.org/adam/ From jjinux at gmail.com Wed Sep 17 21:06:53 2008 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Wed, 17 Sep 2008 12:06:53 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: <766a29bd0809171201k6742dfbcn86436232ee8676f8@mail.gmail.com> References: <766a29bd0809171201k6742dfbcn86436232ee8676f8@mail.gmail.com> Message-ID: On Wed, Sep 17, 2008 at 12:01 PM, Adam Hupp wrote: > On Wed, Sep 17, 2008 at 11:40 AM, Shannon -jj Behrens wrote: >> >> I'm using the queue module to coordinate a bunch of threads. Those >> threads need to log a line to STDOUT. The line is short. Can I count >> on the GIL to make sure that writing a single line to STDOUT is >> atomic, or do I need to be more paranoid? > > Isn't the GIL dropped during any IO? In that case I don't think you > can rely on it. Python gives up the GIL. The C library goes to write the string. It writes out only four bytes. A context switch occurs. Some other thread does the same thing. Kaboom. Seems plausible. Is it really as bad as that? Ugh. -jj -- Don't you wish you had a really clever sig like mine? http://jjinux.blogspot.com/ From aleax at google.com Wed Sep 17 22:07:37 2008 From: aleax at google.com (Alex Martelli) Date: Wed, 17 Sep 2008 13:07:37 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: References: <766a29bd0809171201k6742dfbcn86436232ee8676f8@mail.gmail.com> Message-ID: <55dc209b0809171307j771bc61pe05ef4780d427bee@mail.gmail.com> On Wed, Sep 17, 2008 at 12:06 PM, Shannon -jj Behrens wrote: > On Wed, Sep 17, 2008 at 12:01 PM, Adam Hupp wrote: >> On Wed, Sep 17, 2008 at 11:40 AM, Shannon -jj Behrens wrote: >>> >>> I'm using the queue module to coordinate a bunch of threads. Those >>> threads need to log a line to STDOUT. The line is short. Can I count >>> on the GIL to make sure that writing a single line to STDOUT is >>> atomic, or do I need to be more paranoid? >> >> Isn't the GIL dropped during any IO? In that case I don't think you >> can rely on it. > > Python gives up the GIL. The C library goes to write the string. It > writes out only four bytes. A context switch occurs. Some other > thread does the same thing. Kaboom. > > Seems plausible. Is it really as bad as that? Ugh. Yep. If you need real reliability, devote a separate thread to the sole task of writing to stdout, listening on a Queue for such write requests. Or, you could use the logging module. Alex From donnamsnow at gmail.com Wed Sep 17 22:15:31 2008 From: donnamsnow at gmail.com (Donna Snow) Date: Wed, 17 Sep 2008 13:15:31 -0700 Subject: [Baypiggies] World Plone Day - November 7, 2008 Message-ID: Hi, I'm coordinating an event for World Plone Day in San Jose (or somewhere in the area) Still looking for a location and I am lining up sessions for the day long event. If you'd like to present a Plone related talk (it doesn't have to be formal) for November 7th please get a hold of me. Anyone know of a good place to hold an all day event? It'll be a session per hour (not multi-track) and it'll include "introductory talks" + a couple tutorials. (tried google, they aren't available for that time frame so looking at central locale) It's a world wide event and I'm just one of many people organizing these day long sessions. If you have any questions at all (especially since Plone 3 was launched a year ago) and just want to find out more about Plone this is a good place to be! So still need a location..anyone wanna donate a room for a day and/or sponsor the event? Best Regards, Donna M Snow, Principal C Squared Enterprises illuminating your path to Open Source http://www.csquaredtech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From spmcinerney at hotmail.com Wed Sep 17 22:27:38 2008 From: spmcinerney at hotmail.com (Stephen McInerney) Date: Wed, 17 Sep 2008 13:27:38 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: <55dc209b0809171307j771bc61pe05ef4780d427bee@mail.gmail.com> References: <766a29bd0809171201k6742dfbcn86436232ee8676f8@mail.gmail.com> <55dc209b0809171307j771bc61pe05ef4780d427bee@mail.gmail.com> Message-ID: Alex, Is there a need to more clearly document which Python modules and fns (in the CPython implementation) are threadsafe? This sort of information is impossible to find. Stephen _________________________________________________________________ See how Windows Mobile brings your life together?at home, work, or on the go. http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aahz at pythoncraft.com Wed Sep 17 23:17:51 2008 From: aahz at pythoncraft.com (Aahz) Date: Wed, 17 Sep 2008 14:17:51 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: References: Message-ID: <20080917211750.GA5199@panix.com> On Wed, Sep 17, 2008, Shannon -jj Behrens wrote: > > I know that threads are the devil and all, but I have a threading > question ;) What makes you say that threads are the devil? > I'm using the queue module to coordinate a bunch of threads. Those > threads need to log a line to STDOUT. The line is short. Can I count > on the GIL to make sure that writing a single line to STDOUT is > atomic, or do I need to be more paranoid? That depends really on the underlying OS library. Mostly yes: a single Python C-level call to fwrite() will be atomic. So technically, you're not counting on the GIL. ;-) -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "Argue for your limitations, and sure enough they're yours." --Richard Bach From aleax at google.com Wed Sep 17 23:33:35 2008 From: aleax at google.com (Alex Martelli) Date: Wed, 17 Sep 2008 14:33:35 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: References: <766a29bd0809171201k6742dfbcn86436232ee8676f8@mail.gmail.com> <55dc209b0809171307j771bc61pe05ef4780d427bee@mail.gmail.com> Message-ID: <55dc209b0809171433v1b164f31id310c420e212a5f@mail.gmail.com> On Wed, Sep 17, 2008 at 1:27 PM, Stephen McInerney wrote: > Alex, > > Is there a need to more clearly document which Python modules and fns > (in the CPython implementation) are threadsafe? > This sort of information is impossible to find. You can safely assume that no module is thread-safe unless it claims it is. At http://docs.python.org/lib/node424.html for example you can read: """ 14.5.9 Thread Safety The logging module is intended to be thread-safe without any special work needing to be done by its clients. It achieves this though using threading locks; there is one lock to serialize access to the module's shared data, and each handler also creates a lock to serialize access to its underlying I/O. """ and at http://docs.python.org/lib/module-Queue.html: """ especially useful in threads programming when information must be exchanged safely between multiple threads. The Queue class in this module implements all the required locking semantics. """ How is this info hard to find? Alex From aleax at google.com Wed Sep 17 23:38:57 2008 From: aleax at google.com (Alex Martelli) Date: Wed, 17 Sep 2008 14:38:57 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: <20080917211750.GA5199@panix.com> References: <20080917211750.GA5199@panix.com> Message-ID: <55dc209b0809171438n48ff8a9fq2c16be8889bf2eff@mail.gmail.com> On Wed, Sep 17, 2008 at 2:17 PM, Aahz wrote: > On Wed, Sep 17, 2008, Shannon -jj Behrens wrote: >> >> I know that threads are the devil and all, but I have a threading >> question ;) > > What makes you say that threads are the devil? > >> I'm using the queue module to coordinate a bunch of threads. Those >> threads need to log a line to STDOUT. The line is short. Can I count >> on the GIL to make sure that writing a single line to STDOUT is >> atomic, or do I need to be more paranoid? > > That depends really on the underlying OS library. Mostly yes: a single > Python C-level call to fwrite() will be atomic. So technically, you're > not counting on the GIL. ;-) I don't consider this reliable, in general: depending on the length of data being written, writes on distributed filesystems such as NFS or SMB are notoriously prone to NOT being atomic; how can I ensure that stdout will never be redirected to a file living on such a filesystem, for example? IMHO, using the logging module or a dedicated output-writing thread is well worth the (small) inconvenience. Alex From jjinux at gmail.com Wed Sep 17 23:45:43 2008 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Wed, 17 Sep 2008 14:45:43 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: <55dc209b0809171438n48ff8a9fq2c16be8889bf2eff@mail.gmail.com> References: <20080917211750.GA5199@panix.com> <55dc209b0809171438n48ff8a9fq2c16be8889bf2eff@mail.gmail.com> Message-ID: > What makes you say that threads are the devil? Threads make an otherwise deterministic program non-deterministic. Threads that share data require locking in a way that is often hard to get right. This conversation is an example of that. Last of all, because of the GIL (as you well know), threads in Python aren't as useful for CPU parallelization as, say, threads in C. -jj -- Don't you wish you had a really clever sig like mine? http://jjinux.blogspot.com/ From spmcinerney at hotmail.com Wed Sep 17 23:49:18 2008 From: spmcinerney at hotmail.com (Stephen McInerney) Date: Wed, 17 Sep 2008 14:49:18 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: <55dc209b0809171433v1b164f31id310c420e212a5f@mail.gmail.com> References: <766a29bd0809171201k6742dfbcn86436232ee8676f8@mail.gmail.com> <55dc209b0809171307j771bc61pe05ef4780d427bee@mail.gmail.com> <55dc209b0809171433v1b164f31id310c420e212a5f@mail.gmail.com> Message-ID: I don't think the default assumption "You can safely assume that no module is thread-safe unless it claims it is. " is explicitly stated anywhere in the Python library doc? (http://docs.python.org/lib/*) I definitely think that is worth adding? Yes, I saw logging has a note saying it is thread-safe, but (for example) popen2, Popen3 and Popen4 say nothing, I should assume they're not? [I'm holding the assumption that someday eventually the GIL may go away as the typical number of threads increases to the point where it becomes commercially important to solve that.] Stephen _________________________________________________________________ See how Windows Mobile brings your life together?at home, work, or on the go. http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From aleax at google.com Thu Sep 18 00:58:53 2008 From: aleax at google.com (Alex Martelli) Date: Wed, 17 Sep 2008 15:58:53 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: References: <766a29bd0809171201k6742dfbcn86436232ee8676f8@mail.gmail.com> <55dc209b0809171307j771bc61pe05ef4780d427bee@mail.gmail.com> <55dc209b0809171433v1b164f31id310c420e212a5f@mail.gmail.com> Message-ID: <55dc209b0809171558v695db35fme4dd39b10c426431@mail.gmail.com> On Wed, Sep 17, 2008 at 2:49 PM, Stephen McInerney wrote: > > I don't think the default assumption "You can safely assume that no module > is thread-safe unless it claims it is. " is explicitly stated anywhere in > the Python > library doc? (http://docs.python.org/lib/*) > I definitely think that is worth adding? I guess you could add one more caveat about that to the longish list at the bottom of http://docs.python.org/lib/module-thread.html . > Yes, I saw logging has a note saying it is thread-safe, but (for example) > popen2, Popen3 and Popen4 say nothing, I should assume they're not? Right -- the file objects returned by popen2 &c aren't thread-safe, just like those returned by calling the built-in function open aren't thread-safe, &c, &c. > [I'm holding the assumption that someday eventually the GIL may go > away as the typical number of threads increases to the point where it > becomes commercially important to solve that.] Python implementations based on virtual machines developed with strong concern for "commercial importance" (JVM and CLR) are already GIL-free today; whether it's worth completely re-architecting yet another VM (CPython's own) towards similar goals is far from obvious to me -- particularly if the goal of such an ambitious effort was meant to be "commercial importance" rather than developers scratching their own itch -- what's the commercial value-added to justify the huge development costs, vs just using another, highly refined and optimized open source VM such as JVM? Alex From jeff at drinktomi.com Thu Sep 18 03:01:46 2008 From: jeff at drinktomi.com (Jeff Younker) Date: Wed, 17 Sep 2008 18:01:46 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: References: <766a29bd0809171201k6742dfbcn86436232ee8676f8@mail.gmail.com> <55dc209b0809171307j771bc61pe05ef4780d427bee@mail.gmail.com> <55dc209b0809171433v1b164f31id310c420e212a5f@mail.gmail.com> Message-ID: <32266B62-10E0-445B-B224-69A898B4B417@drinktomi.com> On Sep 17, 2008, at 2:49 PM, Stephen McInerney wrote: > [I'm holding the assumption that someday eventually the GIL may go > away as the typical number of threads increases to the point where it > becomes commercially important to solve that.] I once thought that, but as time has gone on I'm becoming less and less sure that it's necessary. The one language I know of that really focuses on reliability and concurrancy is erlang, and it eschews threads in favor of processes. -jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From jjinux at gmail.com Thu Sep 18 08:55:11 2008 From: jjinux at gmail.com (Shannon -jj Behrens) Date: Wed, 17 Sep 2008 23:55:11 -0700 Subject: [Baypiggies] multithreading question In-Reply-To: <32266B62-10E0-445B-B224-69A898B4B417@drinktomi.com> References: <766a29bd0809171201k6742dfbcn86436232ee8676f8@mail.gmail.com> <55dc209b0809171307j771bc61pe05ef4780d427bee@mail.gmail.com> <55dc209b0809171433v1b164f31id310c420e212a5f@mail.gmail.com> <32266B62-10E0-445B-B224-69A898B4B417@drinktomi.com> Message-ID: I think the easiest thing to do is: from __future__ import with_statement import threading # This is to protect stdout and stderr. output_lock = threading.Lock() def printf(s, file=sys.stdout): """Print s to file and then flush it. This function uses output_lock so that all writes to stdout and stderr are synchronized. Note, the caller is responsible for adding the newline. """ with output_lock: file.write(s) file.flush() I looked into using the logging module, but it turns out that the one place I write to stdout is via the csv module: with output_lock: writer.writerow(row) sys.stdout.flush() Hence, I use printf instead of print, and I explicitly manage a lock in the one place where I can't use printf. -jj From krnewton at gmail.com Thu Sep 18 20:25:41 2008 From: krnewton at gmail.com (Ken Newton) Date: Thu, 18 Sep 2008 11:25:41 -0700 Subject: [Baypiggies] Python development visualization Message-ID: <8fd67d4b0809181125t6afe91c1ld7ec39222ed2bb31@mail.gmail.com> I just found this video that visualizes the development of Python over most of the history of the language. See the web page below for more info on the project doing the visualization (no connection to me). http://www.vimeo.com/1093745 This type of visualization has been done for a variety of open source projects. Ken Newton Walnut Creek -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjt at nosuch.com Thu Sep 18 23:17:02 2008 From: tjt at nosuch.com (Tim Thompson) Date: Thu, 18 Sep 2008 14:17:02 -0700 Subject: [Baypiggies] slides from 'finger painting with planets' talk Message-ID: <004501c919d3$eaa1b5b0$bfe52110$@com> The slides from my talk last week can be found here: http://nosuch.com/tjt/fingerpaintingplanets/finger_painting_with_planets_bay piggies.pdf ...Tim... From carroll at tjc.com Sat Sep 20 01:19:40 2008 From: carroll at tjc.com (Terry Carroll) Date: Fri, 19 Sep 2008 16:19:40 -0700 (PDT) Subject: [Baypiggies] Python development visualization Message-ID: On Thu, 18 Sep 2008, Ken Newton wrote: > I just found this video that visualizes the development of Python over most > of the history of the language. See the web page below for more info on the > project doing the visualization (no connection to me). > > http://www.vimeo.com/1093745 I've seen this before; I wonder what the catalyst was that set off that burst in 2000 (starting at around 2:50 in the video). That was a few years before I started using Python. If this were Ruby, I'd expect a pop like that around when Rails came out. From aahz at pythoncraft.com Sat Sep 20 01:41:15 2008 From: aahz at pythoncraft.com (Aahz) Date: Fri, 19 Sep 2008 16:41:15 -0700 Subject: [Baypiggies] Python development visualization In-Reply-To: References: Message-ID: <20080919234115.GA23283@panix.com> On Fri, Sep 19, 2008, Terry Carroll wrote: > On Thu, 18 Sep 2008, Ken Newton wrote: >> >> I just found this video that visualizes the development of Python over most >> of the history of the language. See the web page below for more info on the >> project doing the visualization (no connection to me). >> >> http://www.vimeo.com/1093745 > > I've seen this before; I wonder what the catalyst was that set off that > burst in 2000 (starting at around 2:50 in the video). That was a few > years before I started using Python. Python 2.0, which also marked the point at which Python switched the repository to SourceForge, opening up development so that Guido was no longer the bottleneck for checkins. -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "Argue for your limitations, and sure enough they're yours." --Richard Bach From rdm at cfcl.com Mon Sep 22 20:51:31 2008 From: rdm at cfcl.com (Rich Morin) Date: Mon, 22 Sep 2008 11:51:31 -0700 Subject: [Baypiggies] BASS Meeting (SF), Wed. September 24 Message-ID: The Beer and Scripting SIG rides again! If you'd like to eat good Italian food, chat with other local scripters, and possibly take a look at laptop-demoed scripting hacks, this is the place to do it! For your convenience, here are the critical details: Date: Wednesday, September 24, 2008 (4th. Wed.) Time: 8:00 pm Place: Pasquales Pizzeria 701 Irving St. (At 8th. Ave.) San Francisco, California, USA 415/661-2140 See the BASS web page for more information: http://cfcl.com/rdm/bass/ We now have two (2) mailing lists, which you are welcome to join: * http://groups.google.com/group/bass-announce This will be used mostly for BASS announcements, though I may send an occasional notice about other events that look nifty. Expect 1-2 messages per month. * http://groups.google.com/group/bass-discuss This should have relatively little traffic, but no guarantees. The basic idea is that it gives BASS attendees (etc) a place to discuss scripting (and topics of interest to scripters). Like BASS, but more than one evening a month... -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From jim at well.com Wed Sep 24 00:46:43 2008 From: jim at well.com (jim) Date: Tue, 23 Sep 2008 15:46:43 -0700 Subject: [Baypiggies] Python Training in Cupertino 9/29 - 10/2 Message-ID: <1222210003.6651.213.camel@ubuntu> UCSC Extension is offering a 4-day Python Retreat for people who already know how to program with some other language. It's a lab-based class with lots of practice and lots of fun: http://pythontrainer.com I hope to see you there. Marilyn Davis Python Instructor From netgraviton at gmail.com Wed Sep 24 16:44:18 2008 From: netgraviton at gmail.com (Robert Stanley) Date: Wed, 24 Sep 2008 10:44:18 -0400 Subject: [Baypiggies] [ANNOUNCE] Message-ID: Dear Python baypiggies, Netgraviton believes the individuals in your community would be interested in the following position: *Sr Software engineer - Python, and Linux/Python Lead Systems Architect* *Job Responsibilities* The Sr. Software Developer will be responsible for the development of the NetGraviton suite of products. Development is done primarily using Python on the server, and with Adobe Flex or HTML/AJAX as a Rich Internet Application (RIA) frontend. Typical day-to-day activities include implementing new features in our products, which involve: - Development of processes to extract relevant data from input sources - Design of relational data storage models - Implementation of data processing algorithms - Development of AMF remoting methods, used for client/server connectivity - Development of graphical user interfaces *Qualifications* The candidate must have top-notch software development skills. Prior experience in Python or Adobe Flex is not a strict requirement, experience in related technologies will be accepted. Please note, only candidates with a bachelor's degree in computer science or engineering, or, a very substantial amount of related technical coursework and work experience in a related field will be considered. Prior experience working on web analytics applications, search engines, content management systems or other Web publishing systems is a plus. *Required Skills*: Structured Query Language (SQL), Object-Oriented Programming *Bonus Skills*: Python, Adobe Flex, SQLite, Open-Source software development, Git, Object-Relational Mapping (ORM), Postgres SQL, AJAX, HTML, Search Engine Optimization (SEO) or Search Engine Marketing (SEM) *Type of Position*: Full-time or Contract-to-hire *Travel Required*: None *Location*: Worldwide (telecommunication) *Position Title*: Sr. Software Developer *Compensation and Benefits*: Competitive salary based on experience. Employees will have an opportunity to participate in the company's stock option plan. *How To Apply* To apply for the Senior Software Engineer position, send a resume and cover letter to jobs at netgraviton dot com. *About NetGraviton* NetGraviton is a venture-backed startup engaged in providing search engine marketing software solutions for PPC/SEM and SEO. Our patented, innovative software-as-a-service applications automate the manual, repetitive work involved in search engine optimization, saving time and enabling customers to improve ROI on search marketing objectives in a consistent and repeatable manner. For more information please visit: www.netgraviton.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rocky at teampatent.com Wed Sep 24 18:06:33 2008 From: rocky at teampatent.com (Rocky Kahn) Date: Wed, 24 Sep 2008 09:06:33 -0700 Subject: [Baypiggies] Job: Backend Software Engineer for Collaborative Text/Image Editor Message-ID: <5e7dca810809240906o630e24e7lb0caa32443d522bf@mail.gmail.com> TeamPatent is building a browser-based, collaborative editor for documents which make frequent references to features inside drawings. We're applying this software first to draft patent applications and later to user manuals, software wireframes, etc. (many documents could be improved with the addition of highly-associative drawings). Without our software, groups working on a document typically maintain the text and drawings separately. All changes to the drawings are made in Visio/Illustrator/etc by one user (a draftsperson in the case of patent applications) because it's too hard to manipulate drawings collaboratively. MSWord revisions are emailed back-and-forth with exported PDFs of the drawings. The association between the text and drawings quickly becomes brittle. For example, it's difficult to coordinate changes to both the drawings and text so callouts are only added (never removed) and figures are changed rarely. This reduces the effectiveness of the document and/or increases the difficulty of maintaining the document. With TeamPatent's software, the editor automatically recognizes new terminology and allows users to manipulate occurrences across the document (e.g. renumbering when terms are reordered). An integrated Javascript drawing annotator allows users to place callouts inside drawings which remain associated with recognized terms in the text. All collaborators can make changes to the text and drawings and the association between the two is maintained automatically. We seek an architect / engineer who will be responsible for all aspects of backend development while solving super-complex engineering problems no one else in the world is working on. Strong candidates will have previously led architectural design and implementation of a data-driven web application, preferably at a smaller company where you had to wear many hats. Our backend technology stack includes Python and PostgreSQL and we're deployed on Linux-based Amazon EC2 instances. You must be proficient in these or related technologies, enabling you to quickly ramp up. As a member of TeamPatent, you'll help contribute to open source--we already maintain two of the largest widgets in Dojo--dijit.Editor & dojox.Sketch--and, under your direction, we hope to contribute facets of our backend infrastructure. There's currently just three of us so you'll have plenty of responsibility/autonomy to be an individual contributor. TeamPatent holds the potential to be a career-making project with enormous market potential and intellectual scope--the National Science Foundation (one of our founders), describes our innovations as "game-changing". Note, this is a really hard project (both conceptually and implementation-wise) and you'll be working with some really smart people who will be looking to you to deliver. - Requirements: - Demonstrated expert at back-end implementation; - Produce elegant, maintainable code; - Experience with databases in both design and access methodology; - Easy to get along with,, fun, ethical, and low-maintenance; and - Intensely driven, proactive, and hard-working. - Desirable: - Open-source contributions; and - Experience planning network operations. - Environment and Compensation: - Full-time role preferred; - This opportunity is ground floor with competitive compensation including significant equity; - Technical leadership at an early stage startup aiming to shake up a valuable market; - Flexible work environment focused on productivity; and - Should want to live in or near San Francisco Bay Area (we're in Oakland). Interested? Send a resume and cover letter to me at jobs at teampatent with the usual .com --Rocky Kahn, CEO -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at well.com Wed Sep 24 22:18:36 2008 From: jim at well.com (jim) Date: Wed, 24 Sep 2008 13:18:36 -0700 Subject: [Baypiggies] call for newbie nuggets Message-ID: <1222287516.6651.244.camel@ubuntu> Hi, all, if you're interested in giving a brief (ten minutes or so) presentation about some feature or technique of Python at a BayPIGgies meeting, please respond. the presentation should include one or more code snippets. the idea is to highlight one thing that helps newbies become more pythonic, reminds more experienced python programmers of something useful, and stirs up discussion and thought. topics might include: decorators generators list comprehensions use of dictionaries doc strings abstract classes (3.0 okay or not, opinions?) (or is this out of bounds?) anything to do with namespaces testing debugging commenting any elegant approach to a common problem ... jim From asheesh at asheesh.org Fri Sep 26 00:27:46 2008 From: asheesh at asheesh.org (Asheesh Laroia) Date: Thu, 25 Sep 2008 15:27:46 -0700 (PDT) Subject: [Baypiggies] Failing at generating quoted-printable-encoded email Message-ID: Some quick background: I'm writing a(n open-source) app that generates emails. There are (at least) two ways to encode characters not generally fit for email: base64 and quoted-printable. It's easy to get proper base64-encoded output of email.mime.text: >>> mt = email.mime.text.MIMEText('Ta m?re', 'plain', 'utf-8') >>> 'Content-Transfer-Encoding: base64' in mt.as_string() True >>> mt.as_string().split('\n')[-2] 'VGEgbcOocmU=' There we go, all nice and base64'd. I can *not* figure out how to get quoted-printable-encoding. I found http://docs.python.org/lib/module-email.encoders.html , so I thought great - I'll just encode my MIMEText object: >>> email.encoders.encode_quopri(mt) >>> 'Content-Transfer-Encoding: quoted-printable' in mt.as_string() True Great! Except it's actually double-encoded, and the headers admit to as much: >>> 'Content-Transfer-Encoding: base64' in mt.as_string() True >>> mt.as_string().split('\n')[-2] 'VGEgbcOocmU=3D' It should look like: >>> quopri.encodestring('ta m?re') 'ta m=C3=A8re' Um, how do I get these modules to only encode the mail *once*, as quoted-printable? This seems like a bug in the module - the double-encoding - it could easily be me walking down the wrong path in a module I'm not an expert in using. http://www.google.com/codesearch?q=encode_quopri&hl=en&btnG=Search+Code refers to a now-removed _encoding= parameter. (I want to use quoted-printable because it makes writing my tests straightforward as mock tests with Ian Bicking's MiniMock and doctests + doctest.ELLIPSIS. Plus, it's friendlier to people like my friend Kragen who read their email in /usr/bin/less!) -- Asheesh. -- It shall be unlawful for any suspicious person to be within the municipality. -- Local ordinance, Euclid Ohio From matt at matt-good.net Fri Sep 26 02:23:24 2008 From: matt at matt-good.net (Matt Good) Date: Thu, 25 Sep 2008 17:23:24 -0700 Subject: [Baypiggies] Failing at generating quoted-printable-encoded email In-Reply-To: References: Message-ID: <8B549ABC-1BEA-48EC-A736-A51821EE475E@matt-good.net> On Sep 25, 2008, at 3:27 PM, Asheesh Laroia wrote: > Some quick background: I'm writing a(n open-source) app that > generates emails. There are (at least) two ways to encode > characters not generally fit for email: base64 and quoted-printable. > > It's easy to get proper base64-encoded output of email.mime.text: > > >>> mt = email.mime.text.MIMEText('Ta m?re', 'plain', 'utf-8') > >>> 'Content-Transfer-Encoding: base64' in mt.as_string() > True > >>> mt.as_string().split('\n')[-2] > 'VGEgbcOocmU=' > > There we go, all nice and base64'd. > > I can *not* figure out how to get quoted-printable-encoding. There might be a better way, but this is the hack that Trac uses to get qp working: import email.mime.text import email.charset charset = email.charset.Charset('utf-8') charset.header_encoding = email.charset.QP charset.body_encoding = email.charset.QP msg = email.mime.text.MIMEText('foo', 'plain') # Message class computes the wrong type from MIMEText constructor, # which does not take a Charset object as initializer. Reset the # encoding type to force a new, valid evaluation del msg['Content-Transfer-Encoding'] msg.set_charset(charset) -- Matt From aahz at pythoncraft.com Sat Sep 27 01:26:14 2008 From: aahz at pythoncraft.com (Aahz) Date: Fri, 26 Sep 2008 16:26:14 -0700 Subject: [Baypiggies] PyCon 2009 Call for Proposals Message-ID: <20080926232614.GA2384@panix.com> Call for proposals -- PyCon 2009 -- =============================================================== Want to share your experience and expertise? PyCon 2009 is looking for proposals to fill the formal presentation tracks. The PyCon conference days will be March 27-29, 2009 in Chicago, Illinois, preceded by the tutorial days (March 25-26), and followed by four days of development sprints (March 30-April 2). Previous PyCon conferences have had a broad range of presentations, from reports on academic and commercial projects to tutorials and case studies. We hope to continue that tradition this year. Online proposal submission will open on September 29, 2008. Proposals will be accepted through November 03, with acceptance notifications coming out on December 15. For the detailed call for proposals, please see: We look forward to seeing you in Chicago! -- Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/ "Argue for your limitations, and sure enough they're yours." --Richard Bach From spmcinerney at hotmail.com Sat Sep 27 02:56:36 2008 From: spmcinerney at hotmail.com (Stephen McInerney) Date: Fri, 26 Sep 2008 17:56:36 -0700 Subject: [Baypiggies] BayPIGgies Oct-Dec meetings? Message-ID: Hi Jim, Can you send details of the October mtg, also the tentative calendar for Nov-Dec? And can we update baypiggies.net to October mtg? Thanks a lot, Stephen _________________________________________________________________ Get more out of the Web. Learn 10 hidden secrets of Windows Live. http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008 -------------- next part -------------- An HTML attachment was scrubbed... URL: From asheesh at asheesh.org Sun Sep 28 12:50:53 2008 From: asheesh at asheesh.org (Asheesh Laroia) Date: Sun, 28 Sep 2008 03:50:53 -0700 (PDT) Subject: [Baypiggies] San Francisco-based Introduction to Programming (in Python; taught by me for free) Message-ID: It's pretty late, so I may not be totally coherent, but: I've been using the "Python for Software Design: How to Think Like a Computer Scientist" textbook to teach an introduction to programming course here in San Francisco to the SF Linux Users Group. I'd be very happy if some other people on this list, say, were interested in attending. So far we will have had two meetings, Monday evenings at 6 PM at The Grind Cafe . We're only on chapter two, at our second meeting. The way I'm structuring it is that I want people to do the readings at home, and preferably do the exercises and email me their answers to them, so that the class time can be used to discuss what people have already read, and fix misunderstandings or address questions. I see it as a teacher-guided self-learning process. If it were a college class, it would be as if there were no real lectures, and only the TA sesisons. I think that sort of maximizes dynamism. There is still time for people to catch up, especially as the chapters are ten clearly-written pages (rather than long or painfully dense). I would love to have some more people - you're welcome to quiz me about this on the list or off-list by private mail. Feel free to take a look at the book and see where you would fit in; I'd also be happy if people tell me, "Call me when you reach chapter 7 and I'll join in" or something like that. By doing a chapter a week, it's somewhat slow-paced, I admit. -- Asheesh. P.S. OT: Path MTU discovery problems suck. P.P.S. I found a Python bug to conglomerate my earlier email about Quoted-Printable encoding onto. -- Do what comes naturally. Seethe and fume and throw a tantrum. From asheesh at asheesh.org Mon Sep 29 21:18:56 2008 From: asheesh at asheesh.org (Asheesh Laroia) Date: Mon, 29 Sep 2008 12:18:56 -0700 (PDT) Subject: [Baypiggies] Failing at generating quoted-printable-encoded email In-Reply-To: <8B549ABC-1BEA-48EC-A736-A51821EE475E@matt-good.net> References: <8B549ABC-1BEA-48EC-A736-A51821EE475E@matt-good.net> Message-ID: On Thu, 25 Sep 2008, Matt Good wrote: >> I can *not* figure out how to get quoted-printable-encoding. > > There might be a better way, but this is the hack that Trac uses to get > qp working: [snipped] Thanks, that worked like a charm! If we meet, I owe you some chocolate. (-: -- Asheesh. -- Nothing is ever a total loss; it can always serve as a bad example. From jim at well.com Tue Sep 30 01:50:10 2008 From: jim at well.com (jim) Date: Mon, 29 Sep 2008 16:50:10 -0700 Subject: [Baypiggies] BayPIGgies Oct-Dec meetings? In-Reply-To: References: Message-ID: <1222732210.6344.6.camel@ubuntu> i've learned that announcing (or leaking) future meeting plans can be dicey. The October 9 meeting is close enough not to be dicey: * Newbie Nugget: Unit Testing with Mock, by Daryl Spitzer * Main Talk: Pygame, by Harry Tormey and Andrew Turlock subsequent talks are probably about scipy/numpy followed by Nokia development. soon after there's a likelihood of getting a talk on Django development, a talk on Google App Engine.... in an email with a dedicated subject i'll put out a list of possible topics. On Fri, 2008-09-26 at 17:56 -0700, Stephen McInerney wrote: > Hi Jim, > > Can you send details of the October mtg, also the tentative calendar > for Nov-Dec? > > And can we update baypiggies.net to October mtg? > > Thanks a lot, > Stephen > > > ______________________________________________________________________ > Get more out of the Web. Learn 10 hidden secrets of Windows Live. > Learn Now From spmcinerney at hotmail.com Tue Sep 30 02:01:10 2008 From: spmcinerney at hotmail.com (Stephen McInerney) Date: Mon, 29 Sep 2008 17:01:10 -0700 Subject: [Baypiggies] BayPIGgies Oct-Dec meetings? In-Reply-To: <1222732210.6344.6.camel@ubuntu> References: <1222732210.6344.6.camel@ubuntu> Message-ID: Thanks Jim. Can folks update the webpage and wiki with October details? (What we found worked well previously was actually to send out a tentative advance schedule a few months at a time - just mark it 'tentative' and check in with the planned speakers to keep it accurate.) PS the Newbie Nuggets are going great and it is great to encourage newer people to present. Best, Stephen> Subject: Re: BayPIGgies Oct-Dec meetings?> From: jim at well.com> To: spmcinerney at hotmail.com> CC: baypiggies at python.org> Date: Mon, 29 Sep 2008 16:50:10 -0700> > > i've learned that announcing (or leaking) future > meeting plans can be dicey. > > The October 9 meeting is close enough not to be > dicey: > * Newbie Nugget: Unit Testing with Mock, by Daryl Spitzer > * Main Talk: Pygame, by Harry Tormey and Andrew Turlock > > subsequent talks are probably about scipy/numpy > followed by Nokia development. > soon after there's a likelihood of getting a talk on > Django development, a talk on Google App Engine.... > in an email with a dedicated subject i'll put out > a list of possible topics. > > > > On Fri, 2008-09-26 at 17:56 -0700, Stephen McInerney wrote:> > Hi Jim,> > > > Can you send details of the October mtg, also the tentative calendar> > for Nov-Dec?> > > > And can we update baypiggies.net to October mtg?> > > > Thanks a lot,> > Stephen> > > > > > ______________________________________________________________________> > Get more out of the Web. Learn 10 hidden secrets of Windows Live.> > Learn Now> _________________________________________________________________ See how Windows Mobile brings your life together?at home, work, or on the go. http://clk.atdmt.com/MRT/go/msnnkwxp1020093182mrt/direct/01/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From bdbaddog at gmail.com Tue Sep 30 02:22:47 2008 From: bdbaddog at gmail.com (William Deegan) Date: Mon, 29 Sep 2008 17:22:47 -0700 Subject: [Baypiggies] BayPIGgies Oct-Dec meetings? In-Reply-To: References: <1222732210.6344.6.camel@ubuntu> Message-ID: <8540148a0809291722k49430a4rd4251bbcad58f864@mail.gmail.com> Stephen, Yes. I'll update it later tonight. -Bill On Mon, Sep 29, 2008 at 5:01 PM, Stephen McInerney wrote: > Thanks Jim. Can folks update the webpage and wiki with October details? > > (What we found worked well previously was actually to send out > a tentative advance schedule a few months at a time - just > mark it 'tentative' and check in with the planned speakers to > keep it accurate.) > > PS the Newbie Nuggets are going great and it is great to encourage > newer people to present. > > Best, > Stephen > >> Subject: Re: BayPIGgies Oct-Dec meetings? >> From: jim at well.com >> To: spmcinerney at hotmail.com >> CC: baypiggies at python.org >> Date: Mon, 29 Sep 2008 16:50:10 -0700 >> >> >> i've learned that announcing (or leaking) future >> meeting plans can be dicey. >> >> The October 9 meeting is close enough not to be >> dicey: >> * Newbie Nugget: Unit Testing with Mock, by Daryl Spitzer >> * Main Talk: Pygame, by Harry Tormey and Andrew Turlock >> >> subsequent talks are probably about scipy/numpy >> followed by Nokia development. >> soon after there's a likelihood of getting a talk on >> Django development, a talk on Google App Engine.... >> in an email with a dedicated subject i'll put out >> a list of possible topics. >> >> >> >> On Fri, 2008-09-26 at 17:56 -0700, Stephen McInerney wrote: >> > Hi Jim, >> > >> > Can you send details of the October mtg, also the tentative calendar >> > for Nov-Dec? >> > >> > And can we update baypiggies.net to October mtg? >> > >> > Thanks a lot, >> > Stephen >> > >> > >> > ______________________________________________________________________ >> > Get more out of the Web. Learn 10 hidden secrets of Windows Live. >> > Learn Now >> > > > ________________________________ > See how Windows Mobile brings your life together?at home, work, or on the > go. See Now > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > From donnamsnow at gmail.com Tue Sep 30 05:07:37 2008 From: donnamsnow at gmail.com (Donna Snow) Date: Mon, 29 Sep 2008 20:07:37 -0700 Subject: [Baypiggies] World Plone Day - November 7, 2008 (need a venue) Message-ID: Hi, On November 7, 2008 Plone consultants and companies around the world will be hosting free presentations and training sessions for those interested in learning more about Plone. Potential Sessions Introducing Plone 3 - Donna M Snow - 1 hour A comprehensive tour through Plone 3 from front-end to back-end. What is good about the "new Plone" and what could be improved. Mythbusting: Dispelling the "virtual" rumors about Zope/Plone - Short presentation and then discussion afterwards - Donna M. Snow - 1 hour (and validating the ones that are true) Skinning for Plone - Donna M Snow - a general overview of creating a look & feel for Plone - 1 hour The Future of Plone (what's in store?) - Donna M Snow I figure a half-day of sessions will be good and then I'll be available afterwards to answer questions (or at least point you to resources). I really, really need a venue for this event so if anyone can "donate" some space from about 9am - 1pm on November 7th that'd be great. I'm not sure what the turnout will be but I'll need a place with wifi, a white board and ideally a projector. I AM planning on starting Plone training sessions in the Bay Area but that won't start until the first quarter in 2009. email me offlist if you A) have a venue I can use for this event and/or B) would like to attend this event (so I can plan for space) . If we only get a few "interested" we might just meet at a coffee shop somewhere. Thank You! Best Regards, Donna M. Snow, Principal C Squared Enterprises illuminating your path to Open Source http://www.csquaredtech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From donnamsnow at gmail.com Tue Sep 30 05:09:21 2008 From: donnamsnow at gmail.com (Donna Snow) Date: Mon, 29 Sep 2008 20:09:21 -0700 Subject: [Baypiggies] World Plone Day - November 7,2008 (forgot something) Message-ID: Hi, I forgot to mention that if you are interested in presenting or participating in World Plone Day (aka volunteering) please let me know that as well. Thanks!! Donna -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim at well.com Tue Sep 30 06:15:57 2008 From: jim at well.com (jim) Date: Mon, 29 Sep 2008 21:15:57 -0700 Subject: [Baypiggies] What's on for BayPIGgies October 9 meeting Message-ID: <1222748157.6344.16.camel@ubuntu> october 9, 2008 (in the Seville room, i believe) 7:30 PM to nine-ish newbie nugget: Unit testing with Mock by Daryl Spitzer I'll present examples using Michael Foord's Mock library to create unit tests with mocks or stubs taking the place of module and built-in functions. As Mr. Foord writes in http://www.voidspace.org.uk/python/mock.html#introduction "Most mocking libraries follow the 'record -> replay' pattern of mocking. I prefer the 'action -> assertion' pattern, which is more readable and intuitive particularly when working with the Python unittest module." main topic: Pygame by Harry Tormey and Andrew Turlock PyGameSF: A story of multimedia hacking fun with Python By Harry Tormey and Andrew Turley. This talk will give an overview of the technologies available for creating multimedia projects with Python, how the PyGameSF meetup got started, what it's all about, and an overview of the wide variety of projects presented at this meetup. From asheesh at asheesh.org Tue Sep 30 07:25:10 2008 From: asheesh at asheesh.org (Asheesh Laroia) Date: Mon, 29 Sep 2008 22:25:10 -0700 (PDT) Subject: [Baypiggies] San Francisco-based Introduction to Programming (in Python; taught by me for free) In-Reply-To: References: Message-ID: On Sun, 28 Sep 2008, Asheesh Laroia wrote: > It's pretty late, so I may not be totally coherent, but: > > I've been using the "Python for Software Design: How to Think Like a > Computer Scientist" textbook to teach an introduction to programming > course here in San Francisco to the SF Linux Users Group. And someone came out from Baypiggies - yay! If you want to keep track of this, join the SF-LUG mailing list; I'm sending out all the announcements there. http://linuxmafia.com/mailman/listinfo/sf-lug has the skinny. Next week will be chapter 3 of http://www.greenteapress.com/thinkpython/thinkpython.html - click "Here is the HTML version" on that page to read it in a web browser. -- Asheesh. -- Debian - All the power, without the silly hat. From jim at well.com Tue Sep 30 19:04:37 2008 From: jim at well.com (jim) Date: Tue, 30 Sep 2008 10:04:37 -0700 Subject: [Baypiggies] What's on for BayPIGgies October 9 meeting In-Reply-To: <1222748157.6344.16.camel@ubuntu> References: <1222748157.6344.16.camel@ubuntu> Message-ID: <1222794277.6344.29.camel@ubuntu> Errata: Andrew's last name is Turley, not Turlock. My apologies. On Mon, 2008-09-29 at 21:15 -0700, jim wrote: > > october 9, 2008 (in the Seville room, i believe) 7:30 PM to nine-ish > > > newbie nugget: Unit testing with Mock by Daryl Spitzer > > I'll present examples using Michael Foord's Mock library to create > unit tests with mocks or stubs taking the place of module and built-in > functions. > As Mr. Foord writes in > http://www.voidspace.org.uk/python/mock.html#introduction > "Most mocking libraries follow the 'record -> replay' pattern of > mocking. > I prefer the 'action -> assertion' pattern, which is more readable and > intuitive particularly when working with the Python unittest module." > > > main topic: Pygame by Harry Tormey and Andrew Turlock > > PyGameSF: A story of multimedia hacking fun with Python > By Harry Tormey and Andrew Turley. > > This talk will give an overview of the technologies available for > creating multimedia projects with Python, how the PyGameSF meetup got > started, what it's all about, and an overview of the wide variety of > projects presented at this meetup. > > > > _______________________________________________ > Baypiggies mailing list > Baypiggies at python.org > To change your subscription options or unsubscribe: > http://mail.python.org/mailman/listinfo/baypiggies > From eric at ericwalstad.com Tue Sep 30 19:07:11 2008 From: eric at ericwalstad.com (Eric Walstad) Date: Tue, 30 Sep 2008 10:07:11 -0700 Subject: [Baypiggies] Looking for a Python contractor Message-ID: We are looking for an experienced Python contractor to help us develop a few Django applications over the next six months, or so. The right person will have the following attributes: * experience working as an independent contractor * be open to working in an 'agile' fashion (short release cycles, love testing, etc...) * experience transferring data to and from external systems * be willing to visit San Francisco and/or Oakland weekly for project meetings * enjoy coding to PEP8 yet not a hobgoblin * want to become a better programmer We work with the following just about every day: * Ubuntu, Fedora and RedHat EL * Python, of course * PostgreSQL * Subversion * Django * BASH You get bonus points if you know: * JavaScript * dHTML * CSS * EDI * SQL * nginx * lighttp * scaling * memcached * Energy efficiency * the airspeed velocity of an unladen swallow A little about us: We are a small team of Python developers. We work deeply on a few relatively large projects rather than a lot of short, small projects. Our projects help facilitate the wide-scale adoption of energy efficiency. If this sounds interesting to you and you think you'll be a good fit please contact me off-list. Regards, Eric Walstad Eric Walstad Associates, LLC From bdbaddog at gmail.com Tue Sep 30 19:48:47 2008 From: bdbaddog at gmail.com (William Deegan) Date: Tue, 30 Sep 2008 10:48:47 -0700 Subject: [Baypiggies] What's on for BayPIGgies October 9 meeting In-Reply-To: <1222794277.6344.29.camel@ubuntu> References: <1222748157.6344.16.camel@ubuntu> <1222794277.6344.29.camel@ubuntu> Message-ID: <8540148a0809301048r4765668fn9340ae4f18e5a992@mail.gmail.com> Updated. -Bill On Tue, Sep 30, 2008 at 10:04 AM, jim wrote: > > Errata: > Andrew's last name is Turley, not Turlock. > My apologies. > > > On Mon, 2008-09-29 at 21:15 -0700, jim wrote: >> >> october 9, 2008 (in the Seville room, i believe) 7:30 PM to nine-ish >> >> >> newbie nugget: Unit testing with Mock by Daryl Spitzer >> >> I'll present examples using Michael Foord's Mock library to create >> unit tests with mocks or stubs taking the place of module and built-in >> functions. >> As Mr. Foord writes in >> http://www.voidspace.org.uk/python/mock.html#introduction >> "Most mocking libraries follow the 'record -> replay' pattern of >> mocking. >> I prefer the 'action -> assertion' pattern, which is more readable and >> intuitive particularly when working with the Python unittest module." >> >> >> main topic: Pygame by Harry Tormey and Andrew Turlock >> >> PyGameSF: A story of multimedia hacking fun with Python >> By Harry Tormey and Andrew Turley. >> >> This talk will give an overview of the technologies available for >> creating multimedia projects with Python, how the PyGameSF meetup got >> started, what it's all about, and an overview of the wide variety of >> projects presented at this meetup. >> >> >> >> _______________________________________________ >> 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 >