From kirby.urner at gmail.com Wed Dec 1 00:37:36 2010 From: kirby.urner at gmail.com (kirby urner) Date: Tue, 30 Nov 2010 15:37:36 -0800 Subject: [Edu-sig] gnu news from pdx / 97214 Message-ID: Some of you may recall how a few months ago I was angsting about the little feud that seems to go on twixt computer language families, a flavor of religious war, or maybe more "hillbilly" in some dimensions.[0] I'm speaking in particular of the functional vs. imperative rift. Python gets along famously with the Java community be comparison, but then these are both OO.[1] Anyway I'm revisiting that issue, having a diplomatic exchanges on math-thinking-l with some of the good people there (also off-list).[2] Also, thanks to Aahz, I've been in touch with an OpenStudy guy named Jon and invited him to join us. Lets see if he does. http://openstudy.com/ Perhaps old hat to some of you, I've been clued about xlrd and xlwt, FOSS modules that let you write Excel files even if you don't have Excel. I'll append some example code I've been working on.[3] Kirby "97214 -- the zip code of geniuses" [0] http://studiohourglass.blogspot.com/2010/10/yall-come-back-now-hillbilly.html slow to load, subcultural iconography -- seems to take forever actually, might be my Chrome buffer? [1] http://danielkaes.wordpress.com/2010/01/26/what-is-the-most-popular-programming-language/ [2] http://mybizmo.blogspot.com/2010/11/olive-branch.html If you follow links, you might get to some of my multiple choice examples, like: Mulitple choice: Which are special names for operations in Python (mark all that apply): (a) __add__ (b) subtract (c) __special__ (d) __mul__ [3] """ prototype: reads DBF format, outputs XLS format """ from xlwt import Workbook, easyxf import dbfpy.dbf from time import time def test1(): dbf = dbfpy.dbf.Dbf("C:\\ktraks6\\feecode.dbf", readOnly = True) header_style = easyxf('font: name Arial, bold True, height 200;') book = Workbook() sheet1 = book.add_sheet('Sheet 1') for (i, name) in enumerate(dbf.fieldNames): sheet1.write(0, i, name, header_style) for (i, thecol) in enumerate(dbf.fieldDefs): name, thetype, thelen, thedec = str(thecol).split() colwidth = max(len(name), int(thelen)) # print colwidth sheet1.col(i).width = colwidth * 310 for row in range(1,len(dbf)): for col in range(len(dbf.fieldNames)): sheet1.row(row).write(col, dbf[row][col]) book.save("C:\\Documents and Settings\\HP_Administrator\\My Documents\\Visual FoxPro Projects\\feecode.xls") if __name__ == "__main__": start = time() test1() end = time() print end - start -------------- next part -------------- An HTML attachment was scrubbed... URL: From vceder at gmail.com Mon Dec 6 14:44:04 2010 From: vceder at gmail.com (Vern Ceder) Date: Mon, 6 Dec 2010 08:44:04 -0500 Subject: [Edu-sig] Python in the news... Message-ID: Hi, In a surprise move, our local paper actually accepted one of our invitations to come see what we do in Comp Sci at the secondary level, namely our Python elective, which is mostly for first time programmers. The resulting article isn't bad, given that the kids were certain the reporter didn't understand a word they told her... ;) links to the web and printable version are here: web - http://www.jg.net/article/20101206/LOCAL04/312069949 printable - http://www.jg.net/apps/pbcs.dll/article?AID=/20101206/LOCAL04/312069949&template=printart Cheers, Vern -- Vern Ceder vceder at gmail.com, vceder at dogsinmotion.com The Quick Python Book, 2nd Ed - http://bit.ly/bRsWDW -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Mon Dec 6 22:02:51 2010 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 6 Dec 2010 13:02:51 -0800 Subject: [Edu-sig] Python in the news... In-Reply-To: References: Message-ID: On Mon, Dec 6, 2010 at 5:44 AM, Vern Ceder wrote: > Hi, > In a surprise move, our local paper actually accepted one of our invitations > to come see what we do in Comp Sci at the secondary level, namely our Python > elective, which is mostly for first time programmers. The resulting article > isn't bad, given that the kids were certain the reporter didn't understand a > word they told her... ;) > links to the web and printable version are here: > web - http://www.jg.net/article/20101206/LOCAL04/312069949 > printable - > http://www.jg.net/apps/pbcs.dll/article?AID=/20101206/LOCAL04/312069949&template=printart > Cheers, > Vern > -- > Vern Ceder > vceder at gmail.com, vceder at dogsinmotion.com > The Quick Python Book, 2nd Ed - http://bit.ly/bRsWDW Hi Vern -- That's a cool little article. I wrote this Python program to provide an applause track for ya (I think I spelled "shriek" wrong): == forvern.py == import threading from random import choice, randint import time noises = ["Bravo!\n","Clap Clap\n","Yay!\n","whistle\n","shreek\n"] class AudiencePerson( threading.Thread): def __init__(self, an, interval): self.applause_noise = an self.interval = interval super(AudiencePerson, self).__init__() def run(self): for i in range(5): print self.getName() + ": " + self.applause_noise time.sleep(self.interval) def testme(): for i in range(10): AudiencePerson(choice(noises), randint(0,5)/10.).start() return if __name__ == "__main__": testme() === Now if I could just turn that into a COM object (seriously, I'm trying to figure out how to call movingballs2.py, a Vpython script, from Visual FoxPro). I also passed on news of said article to an English teacher friend... Excerpt from outbox: --- A guy named Jon Birdsong with startup OpenStudy (OpenStudy.com) was in contact through Python list and I clued him re Martian Math. My hit counter jumped from like 1000 to 2000 though I don't know for sure there's any correlation. I referred him to the article on Vern Ceder. Excerpt (fixed typos): """ Here's a good one: http://www.jg.net/article/20101206/LOCAL04/312069949 Vern is our "watcher" (keying off Giles of Buffy VS), keeps a lookout for talent wanted to have posters at a Pycon. I mention his role in my briefing to GIS in Action / 2009: http://www.4dsolutions.net/presentations/gis_2009_workshop.pdf (EduPython track slide, lots more on PN) """ Letter exchange on Wikieducator list (how our correspondence began): http://groups.google.com/group/wikieducator/msg/3601e5b274b6190a?hl=en --- All in a day's work, Kirby From kirby.urner at gmail.com Mon Dec 6 23:33:16 2010 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 6 Dec 2010 14:33:16 -0800 Subject: [Edu-sig] IronLanguages in CS? Message-ID: Now that IronPython is out of the MSFT stable, at github, with an Apache 2 license, I'm wondering if any CS classrooms are planning on using it. There's no chance of the plug getting pulled at this point, and Miguel de Icaza, one of new new project leads, has a strong reputation for performance.** My first question was whether Mono now supports the DLR, a set of features the Iron Languages (Ruby, Scheme and Python) helped to inspire in the first place. This O'Reilly blog posting suggests that it does, though I'm wading through lots of apparent politics I don't understand, regarding the authenticity of the patch work: http://www.oreillynet.com/xml/blog/2007/05/monodlr_hello_dynamic_language.html A FOSS stack with Mono should give many coders a running start should they get snapped up by a Microsoft shop, but without indebting the university to Redmond overly much. Some CS departments pride themselves on being Debian-like "clean rooms" when it comes to not concealing or walling off internals. Others just don't have the funds to provide enough workstations with Visual Studio licenses. I've been seeing mixed reviews on whether unleashing these IronLanguages is going to add or detract from their popularity. They're esoteric to say the least, more like academic research projects than commercial endeavors, up until recently anyway. In theory, it oughta be possible to write some dynamite curriculum showing Scheme doing something trail recursive (its best circus trick) inside of Assembly S, with Python (or Ruby) then invoking it seamlessly. Best of both worlds (functional and imperative). But perhaps we're not really there yet. Anyway, thoughts welcome. Kirby ** blogs sometimes compare IronPython to Visual FoxPro, or at least mention them together, as the latter is in the throes of having its plug pulled -- a slow, painful process, with 100K VFP developers looking for a way ahead (just stick with VFP?). I've been testing Ethan Furman's dbf library, available through Python.org "cheese shop" (not called that). Has a familiar API with table.next(), table.previous(), table.bof(), table.eof(). Other ways to mine DBF/CDX/FPT format in the works. From kirby.urner at gmail.com Sat Dec 11 06:12:06 2010 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 10 Dec 2010 21:12:06 -0800 Subject: [Edu-sig] Python in the news... In-Reply-To: References: Message-ID: > > > > Now if I could just turn that into a COM object (seriously, I'm trying to > figure > out how to call movingballs2.py, a Vpython script, from Visual FoxPro). > > OK, I turned it into a COM object, pretty mickey mouse, yet instructive (at least to me): VFP = Visual FoxPro and in the middle you'll see how I'm in the interactive shell of that language, and creating this Python object. Even though control returns to the host language, the threads spawn and do their business, taking their time to fill a randomly named text file in some pre-specified directory. My thanks to Mark Hammond the one and only for swinging by on comp.lang.python -- more acknowledgment in my blog: http://mybizmo.blogspot.com/2010/12/office-work.html Here's the COM version (pycomsupport dependency not included for brevity) import threading from random import choice, randint import pycomsupport import os import time applause = ["Bravo!\n","Clap Clap\n","Yay!\n","whistle\n","shreek\n"] laugh = ["chuckle\n", "guffaw\n", "hoot\n", "howl\n", "ROFL\n"] boo = ["Boo!\n", "Nada mas!\n", "hissss\n"] class MPSS_Audience ( object ): _public_methods_ = [ 'applause_track', 'laugh_track', 'boo_track' ] _reg_progid_ = "LoadOpt.Feedback" # Use pythoncom.CreateGuid()" to make a new clsid _reg_clsid_ = '{BFE032DC-0F31-47CA-A714-7D6AADA41F5C}' def __init__(self, ident = None): self.logger = ident fp = os.path.normpath("C:\Users\Kirby\Documents\Visual FoxPro Projects\mpss") fn = pycomsupport.randomstring(8)+".txt" self.output = os.path.join(fp, fn) def _noise_threads(self, noise_type): hnd = open(self.output, 'w') for i in range(10): AudiencePerson(hnd, choice(noise_type), randint(0,5)).start() def applause_track(self): self._noise_threads(applause) def laugh_track(self): self._noise_threads(laugh) def boo_track(self): self._noise_threads(boo) class AudiencePerson( threading.Thread ): def __init__(self, output, an, interval): self.output = output self.audience_noise = an self.interval = interval super(AudiencePerson, self).__init__() def run(self): for i in range(5): self.output.write(self.getName() + ": " + self.audience_noise) time.sleep(self.interval) def testme(): loObj = MPSS_Audience(1) loObj.laugh_track() if __name__ == "__main__": print "Registering COM server..." import win32com.server.register win32com.server.register.UseCommandLine(MPSS_Audience) testme() On the VFP side: loCircus = CREATEOBJECT("Loadopt.Feedback", "some param") loCircus.applause_track() control returns immediately, even though the text file takes quite awhile to fill, thanks to the several second delays between thread writes. The final file: Thread-1: whistle Thread-2: shreek Thread-3: shreek Thread-4: whistle Thread-5: Yay! Thread-6: whistle Thread-7: Yay! Thread-7: Yay! Thread-7: Yay! Thread-7: Yay! Thread-7: Yay! Thread-8: Clap Clap Thread-9: Clap Clap Thread-9: Clap Clap Thread-9: Clap Clap Thread-9: Clap Clap Thread-9: Clap Clap Thread-10: Clap Clap Thread-2: shreek Thread-8: Clap Clap Thread-2: shreek Thread-8: Clap Clap Thread-2: shreek Thread-4: whistle Thread-5: Yay! Thread-6: whistle Thread-8: Clap Clap Thread-1: whistle Thread-2: shreek Thread-3: shreek Thread-8: Clap Clap Thread-10: Clap Clap Thread-4: whistle Thread-5: Yay! Thread-6: whistle Thread-1: whistle Thread-3: shreek Thread-4: whistle Thread-5: Yay! Thread-6: whistle Thread-10: Clap Clap Thread-1: whistle Thread-4: whistle Thread-3: shreek Thread-5: Yay! Thread-6: whistle Thread-10: Clap Clap Thread-1: whistle Thread-3: shreek Thread-10: Clap Clap Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From vceder at gmail.com Sun Dec 12 20:24:05 2010 From: vceder at gmail.com (Vern Ceder) Date: Sun, 12 Dec 2010 14:24:05 -0500 Subject: [Edu-sig] Python in the news... In-Reply-To: References: Message-ID: Thanks for both versions, Kirby! I'll take the applause wherever/however I can get it. ;) I'm not into COM/Windows much, but the basic example is a neat way to illustrate threading... I'll have to remember to steal it, maybe for the classes I teach to our 8th graders. ;) Speaking of 8th graders, these days I'm also teaching online Python courses for middle school kids through Northwestern's Gifted Learrning Links program - an intro to Python using Hello World! and (starting in January) an intermediate Python class, which will do more with OOP concepts and GUI's. The link is here (the intermediate course isn't up yet, but should be soon) - http://www.ctd.northwestern.edu/gll/courses/enrichment/winter2011/#Technology Cheers, Vern On Sat, Dec 11, 2010 at 12:12 AM, kirby urner wrote: > >> >> Now if I could just turn that into a COM object (seriously, I'm trying to >> figure >> out how to call movingballs2.py, a Vpython script, from Visual FoxPro). >> >> > > OK, I turned it into a COM object, pretty mickey mouse, yet instructive (at > least to me): > > VFP = Visual FoxPro and in the middle you'll see how I'm in the interactive > shell of that language, and creating this Python object. > > Even though control returns to the host language, the threads spawn and do > their business, taking their time to fill a randomly named text file in some > pre-specified directory. > > My thanks to Mark Hammond the one and only for swinging by on > comp.lang.python -- more acknowledgment in my blog: > > http://mybizmo.blogspot.com/2010/12/office-work.html > > Here's the COM version (pycomsupport dependency not included for brevity) > > import threading > from random import choice, randint > import pycomsupport > import os > import time > > applause = ["Bravo!\n","Clap Clap\n","Yay!\n","whistle\n","shreek\n"] > laugh = ["chuckle\n", "guffaw\n", "hoot\n", "howl\n", "ROFL\n"] > boo = ["Boo!\n", "Nada mas!\n", "hissss\n"] > > class MPSS_Audience ( object ): > > _public_methods_ = [ 'applause_track', 'laugh_track', 'boo_track' ] > _reg_progid_ = "LoadOpt.Feedback" > > # Use pythoncom.CreateGuid()" to make a new clsid > _reg_clsid_ = '{BFE032DC-0F31-47CA-A714-7D6AADA41F5C}' > > def __init__(self, ident = None): > self.logger = ident > fp = os.path.normpath("C:\Users\Kirby\Documents\Visual FoxPro > Projects\mpss") > fn = pycomsupport.randomstring(8)+".txt" > self.output = os.path.join(fp, fn) > > def _noise_threads(self, noise_type): > hnd = open(self.output, 'w') > > for i in range(10): > AudiencePerson(hnd, choice(noise_type), randint(0,5)).start() > > def applause_track(self): > self._noise_threads(applause) > > def laugh_track(self): > self._noise_threads(laugh) > > def boo_track(self): > self._noise_threads(boo) > > > class AudiencePerson( threading.Thread ): > > def __init__(self, output, an, interval): > self.output = output > self.audience_noise = an > > self.interval = interval > super(AudiencePerson, self).__init__() > > def run(self): > for i in range(5): > self.output.write(self.getName() + ": " + self.audience_noise) > > time.sleep(self.interval) > > def testme(): > loObj = MPSS_Audience(1) > loObj.laugh_track() > > if __name__ == "__main__": > print "Registering COM server..." > import win32com.server.register > win32com.server.register.UseCommandLine(MPSS_Audience) > testme() > > > On the VFP side: > > loCircus = CREATEOBJECT("Loadopt.Feedback", "some param") > loCircus.applause_track() > > control returns immediately, even though the text file > takes quite awhile to fill, thanks to the several second > delays between thread writes. The final file: > > Thread-1: whistle > Thread-2: shreek > Thread-3: shreek > Thread-4: whistle > Thread-5: Yay! > Thread-6: whistle > Thread-7: Yay! > Thread-7: Yay! > Thread-7: Yay! > Thread-7: Yay! > Thread-7: Yay! > Thread-8: Clap Clap > Thread-9: Clap Clap > Thread-9: Clap Clap > Thread-9: Clap Clap > Thread-9: Clap Clap > Thread-9: Clap Clap > Thread-10: Clap Clap > Thread-2: shreek > Thread-8: Clap Clap > Thread-2: shreek > Thread-8: Clap Clap > Thread-2: shreek > Thread-4: whistle > Thread-5: Yay! > Thread-6: whistle > Thread-8: Clap Clap > Thread-1: whistle > Thread-2: shreek > Thread-3: shreek > Thread-8: Clap Clap > Thread-10: Clap Clap > Thread-4: whistle > Thread-5: Yay! > Thread-6: whistle > Thread-1: whistle > Thread-3: shreek > Thread-4: whistle > Thread-5: Yay! > Thread-6: whistle > Thread-10: Clap Clap > Thread-1: whistle > Thread-4: whistle > Thread-3: shreek > Thread-5: Yay! > Thread-6: whistle > Thread-10: Clap Clap > Thread-1: whistle > Thread-3: shreek > Thread-10: Clap Clap > > Kirby > > -- Vern Ceder vceder at gmail.com, vceder at dogsinmotion.com The Quick Python Book, 2nd Ed - http://bit.ly/bRsWDW -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Mon Dec 13 23:36:27 2010 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 13 Dec 2010 14:36:27 -0800 Subject: [Edu-sig] Python in the news... In-Reply-To: References: Message-ID: On Sun, Dec 12, 2010 at 11:24 AM, Vern Ceder wrote: > Thanks for both versions, Kirby! I'll take the applause wherever/however I > can get it. ;) > > That's cool. You've been a good Giles, a role I can also relate too. > I'm not into COM/Windows much, but the basic example is a neat way to > illustrate threading... I'll have to remember to steal it, maybe for the > classes I teach to our 8th graders. ;) > > Yeah, me either until recently. Good example of a host environment wrapping an alien "egg" (in this case a Python COM object) and continuing to run its own process, even while triggering running code in this other language. I'm beholden to the Medusa metaphor of asynchronous event handling. A thread is a lot like a Python generator in that it time shares through next iterations. Twisted is what became of her, outside of Zope. > Speaking of 8th graders, these days I'm also teaching online Python courses > for middle school kids through Northwestern's Gifted Learrning Links program > - an intro to Python using Hello World! and (starting in January) an > intermediate Python class, which will do more with OOP concepts and GUI's. > The link is here (the intermediate course isn't up yet, but should be soon) > - > http://www.ctd.northwestern.edu/gll/courses/enrichment/winter2011/#Technology > > This is all good. I've been back in touch with the VPython principal, Bruce Sherwood, to compare notes. He used to get guff from Arthur on this list, yet they found a symbiotic pattern around Numpy. For those more recently joining us: Arthur was our friend in the NYC financial sector who jumped onto Python + VPython in a big way, to develop his Pygeo projective geometry toolkit. I'd hoped to see him at a GWU / Pycon, one of Steve Holden's events, but that's the year my wife needed me home pronto (I was already in DC for a Bucky Fuller symposium, also at GWU). As it was, we had a good dinner with David Lansky and his kids, in New York City itself. Some kind of ethnic pancake place, upper east side. Anyway, just reminiscing about some of our players. The Python community is pretty stellar, although I'm also blown away by Perl's. I just haven't met that many Ruby people yet. I should probably go to some Rubicons, if that's what they're called. One of my favorite Java programmers is Gerald de Jong, who pretty much invented the field of Elastic Interval Geometry. Here's one of his Youtubes. http://www.youtube.com/watch?v=-6I3utbJ1M8 See springie.com by Tim Tyler for another excellent example of an EIG application. These days Gerald is the solo programmer on a multi-user game called Tetragotchi. He's amazing. http://www.youtube.com/watch?v=xis6QxneccM (someone filming beta tetragotchi) Kirby PS: I need to stick a Queue object on the head of my jellyfish (Medusa COM object). As FoxPro calls in, yelling "route me a truck", I'll queue the request, not unlike an httprequest. Indeed, some might ask "why not use XML-RPC"? Well, you'd still have the same dynamic of needing to return a "job ticket" right away, then have the caller come back for the dry cleaning another time. So asynchronous thinking would be involved. > Cheers, > Vern > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From calcpage at aol.com Tue Dec 14 01:08:59 2010 From: calcpage at aol.com (Calcpage) Date: Mon, 13 Dec 2010 19:08:59 -0500 Subject: [Edu-sig] Python in the news... In-Reply-To: References: Message-ID: <7DF36E3D-00A9-4BBB-BEC9-7CA8990B4BA1@aol.com> Hello Kirby et al, OK, you guys should be very proud of me. I've been dabbling on the outskirts of your fine python community until recently. I entered your world via a back door of sorts. I was looking for a new curriculum for my intro CompSci students and found Gary Litvin's new text "Mathematics for the Digital Age" which details a course in Discrete Mathematics with an emphasis on Pythonic Math. I was using SAGE with these students all year until now. Unfortunately, I've met with a lot of lag and downtime using the various online SAGE servers recently. So, I finally broke down and installed a FTP/SFTP server just for this class using Ubuntu Linux and I installed Python and IDLE. We've been writing python scripts for 2 weeks now and we're not looking back! Enjoy, A. Jorge Garcia Applied Math & CS Baldwin SHS & Nassau CC http://shadowfaxrant.blogspot.com http://www.youtube.com/calcpage2009 Sent from my iPod On Dec 13, 2010, at 5:36 PM, kirby urner wrote: > On Sun, Dec 12, 2010 at 11:24 AM, Vern Ceder wrote: > Thanks for both versions, Kirby! I'll take the applause wherever/ > however I can get it. ;) > > > That's cool. You've been a good Giles, a role I can also relate too. > > I'm not into COM/Windows much, but the basic example is a neat way > to illustrate threading... I'll have to remember to steal it, maybe > for the classes I teach to our 8th graders. ;) > > > Yeah, me either until recently. Good example of a host environment > wrapping an alien "egg" (in this case a Python COM object) and > continuing to run its own process, even while triggering running > code in this other language. > > I'm beholden to the Medusa metaphor of asynchronous event handling. > A thread is a lot like a Python generator in that it time shares > through next iterations. Twisted is what became of her, outside of > Zope. > > > Speaking of 8th graders, these days I'm also teaching online Python > courses for middle school kids through Northwestern's Gifted > Learrning Links program - an intro to Python using Hello World! and > (starting in January) an intermediate Python class, which will do > more with OOP concepts and GUI's. The link is here (the > intermediate course isn't up yet, but should be soon) - http://www.ctd.northwestern.edu/gll/courses/enrichment/winter2011/#Technology > > > This is all good. I've been back in touch with the VPython > principal, Bruce Sherwood, to compare notes. He used to get guff > from Arthur on this list, yet they found a symbiotic pattern around > Numpy. > > For those more recently joining us: Arthur was our friend in the > NYC financial sector who jumped onto Python + VPython in a big way, > to develop his Pygeo projective geometry toolkit. > > I'd hoped to see him at a GWU / Pycon, one of Steve Holden's events, > but that's the year my wife needed me home pronto (I was already in > DC for a Bucky Fuller symposium, also at GWU). > > As it was, we had a good dinner with David Lansky and his kids, in > New York City itself. Some kind of ethnic pancake place, upper east > side. > > Anyway, just reminiscing about some of our players. The Python > community is pretty stellar, although I'm also blown away by Perl's. > > I just haven't met that many Ruby people yet. I should probably go > to some Rubicons, if that's what they're called. > > One of my favorite Java programmers is Gerald de Jong, who pretty > much invented the field of Elastic Interval Geometry. Here's one of > his Youtubes. > > http://www.youtube.com/watch?v=-6I3utbJ1M8 > > See springie.com by Tim Tyler for another excellent example of an > EIG application. > > These days Gerald is the solo programmer on a multi-user game called > Tetragotchi. He's amazing. > > http://www.youtube.com/watch?v=xis6QxneccM (someone filming beta > tetragotchi) > > Kirby > > > PS: I need to stick a Queue object on the head of my jellyfish > (Medusa COM object). As FoxPro calls in, yelling "route me a > truck", I'll queue the request, not unlike an httprequest. Indeed, > some might ask "why not use XML-RPC"? Well, you'd still have the > same dynamic of needing to return a "job ticket" right away, then > have the caller come back for the dry cleaning another time. So > asynchronous thinking would be involved. > > > > Cheers, > Vern > > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig -------------- next part -------------- An HTML attachment was scrubbed... URL: From vceder at gmail.com Tue Dec 14 01:24:05 2010 From: vceder at gmail.com (Vern Ceder) Date: Mon, 13 Dec 2010 19:24:05 -0500 Subject: [Edu-sig] Python in the news... In-Reply-To: <7DF36E3D-00A9-4BBB-BEC9-7CA8990B4BA1@aol.com> References: <7DF36E3D-00A9-4BBB-BEC9-7CA8990B4BA1@aol.com> Message-ID: Darned right, we're proud of you! Python and Linux - way to go! ;) Cheers, Vern On Mon, Dec 13, 2010 at 7:08 PM, Calcpage wrote: > Hello Kirby et al, > > OK, you guys should be very proud of me. I've been dabbling on the > outskirts of your fine python community until recently. I entered your > world via a back door of sorts. I was looking for a new curriculum for my > intro CompSci students and found Gary Litvin's new text "Mathematics for the > Digital Age" which details a course in Discrete Mathematics with an emphasis > on Pythonic Math. I was using SAGE with these students all year until now. > Unfortunately, I've met with a lot of lag and downtime using the various > online SAGE servers recently. So, I finally broke down and installed a > FTP/SFTP server just for this class using Ubuntu Linux and I installed > Python and IDLE. We've been writing python scripts for 2 weeks now and we're > not looking back! > > Enjoy, > A. Jorge Garcia > Applied Math & CS > Baldwin SHS & Nassau CC > http://shadowfaxrant.blogspot.com > http://www.youtube.com/calcpage2009 > Sent from my iPod > > On Dec 13, 2010, at 5:36 PM, kirby urner wrote: > > On Sun, Dec 12, 2010 at 11:24 AM, Vern Ceder < > vceder at gmail.com> wrote: > >> Thanks for both versions, Kirby! I'll take the applause wherever/however I >> can get it. ;) >> >> > That's cool. You've been a good Giles, a role I can also relate too. > > >> I'm not into COM/Windows much, but the basic example is a neat way to >> illustrate threading... I'll have to remember to steal it, maybe for the >> classes I teach to our 8th graders. ;) >> >> > Yeah, me either until recently. Good example of a host environment > wrapping an alien "egg" (in this case a Python COM object) and continuing to > run its own process, even while triggering running code in this other > language. > > I'm beholden to the Medusa metaphor of asynchronous event handling. A > thread is a lot like a Python generator in that it time shares through next > iterations. Twisted is what became of her, outside of Zope. > > > >> Speaking of 8th graders, these days I'm also teaching online Python >> courses for middle school kids through Northwestern's Gifted Learrning Links >> program - an intro to Python using Hello World! and (starting in January) an >> intermediate Python class, which will do more with OOP concepts and GUI's. >> The link is here (the intermediate course isn't up yet, but should be soon) >> - >> http://www.ctd.northwestern.edu/gll/courses/enrichment/winter2011/#Technology >> >> > This is all good. I've been back in touch with the VPython principal, > Bruce Sherwood, to compare notes. He used to get guff from Arthur on this > list, yet they found a symbiotic pattern around Numpy. > > For those more recently joining us: Arthur was our friend in the NYC > financial sector who jumped onto Python + VPython in a big way, to develop > his Pygeo projective geometry toolkit. > > I'd hoped to see him at a GWU / Pycon, one of Steve Holden's events, but > that's the year my wife needed me home pronto (I was already in DC for a > Bucky Fuller symposium, also at GWU). > > As it was, we had a good dinner with David Lansky and his kids, in New York > City itself. Some kind of ethnic pancake place, upper east side. > > Anyway, just reminiscing about some of our players. The Python community > is pretty stellar, although I'm also blown away by Perl's. > > I just haven't met that many Ruby people yet. I should probably go to some > Rubicons, if that's what they're called. > > One of my favorite Java programmers is Gerald de Jong, who pretty much > invented the field of Elastic Interval Geometry. Here's one of his > Youtubes. > > > http://www.youtube.com/watch?v=-6I3utbJ1M8 > > See springie.com by Tim Tyler for another excellent > example of an EIG application. > > These days Gerald is the solo programmer on a multi-user game called > Tetragotchi. He's amazing. > > > http://www.youtube.com/watch?v=xis6QxneccM (someone filming beta > tetragotchi) > > Kirby > > > PS: I need to stick a Queue object on the head of my jellyfish (Medusa COM > object). As FoxPro calls in, yelling "route me a truck", I'll queue the > request, not unlike an httprequest. Indeed, some might ask "why not use > XML-RPC"? Well, you'd still have the same dynamic of needing to return a > "job ticket" right away, then have the caller come back for the dry cleaning > another time. So asynchronous thinking would be involved. > > > > >> Cheers, >> Vern >> >> > > > _______________________________________________ > Edu-sig mailing list > Edu-sig at python.org > http://mail.python.org/mailman/listinfo/edu-sig > > -- Vern Ceder vceder at gmail.com, vceder at dogsinmotion.com The Quick Python Book, 2nd Ed - http://bit.ly/bRsWDW -------------- next part -------------- An HTML attachment was scrubbed... URL: From kirby.urner at gmail.com Sun Dec 19 21:53:05 2010 From: kirby.urner at gmail.com (kirby urner) Date: Sun, 19 Dec 2010 12:53:05 -0800 Subject: [Edu-sig] cool stuff out there... Message-ID: Wow, a link just posted to math-thinking-l: http://www.youtube.com/watch?v=heKK95DAKms How is it Python-relevant? Watch it and see. In other news: a free open source CAS you might want to share about. http://www.mathpiper.org/ (yes, Java not Python -- nice to know what's out there -- compare with SAGE). Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: From mark.engelberg at gmail.com Mon Dec 20 22:12:27 2010 From: mark.engelberg at gmail.com (Mark Engelberg) Date: Mon, 20 Dec 2010 13:12:27 -0800 Subject: [Edu-sig] cool stuff out there... In-Reply-To: References: Message-ID: Thanks for the link to MathPiper. I hadn't seen that yet. I'm curious how this compare to Sage and/or Geogebra. Anyone tried it out yet? I see it's in beta; is it fairly stable? From kirby.urner at gmail.com Mon Dec 20 22:17:57 2010 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 20 Dec 2010 13:17:57 -0800 Subject: [Edu-sig] cool stuff out there... In-Reply-To: References: Message-ID: Here's a thread FYI. http://groups.google.com/group/mathfuture/browse_thread/thread/e1afd5907813e789?hl=en It's being used with Geogebra, as a kind of plug-in, looks like. No I haven't tested it myself (yet). Kirby On Mon, Dec 20, 2010 at 1:12 PM, Mark Engelberg wrote: > Thanks for the link to MathPiper. I hadn't seen that yet. > > I'm curious how this compare to Sage and/or Geogebra. Anyone tried it > out yet? I see it's in beta; is it fairly stable? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From calcpage at aol.com Tue Dec 21 03:09:20 2010 From: calcpage at aol.com (A. Jorge Garcia) Date: Mon, 20 Dec 2010 21:09:20 -0500 Subject: [Edu-sig] cool stuff out there... In-Reply-To: References: Message-ID: <8CD6ECB33C850C8-4D4-2007F@webmail-m083.sysops.aol.com> As I recall, mathpiper branched off from SAGE 2 or 3 years ago. Both projects are based on python, no? Regards, A. Jorge Garcia Applied Math and CompSci http://shadowfaxrant.blogspot.com http://www.youtube.com/calcpage2009 From kirby.urner at gmail.com Tue Dec 21 03:13:00 2010 From: kirby.urner at gmail.com (kirby urner) Date: Mon, 20 Dec 2010 18:13:00 -0800 Subject: [Edu-sig] cool stuff out there... In-Reply-To: <8CD6ECB33C850C8-4D4-2007F@webmail-m083.sysops.aol.com> References: <8CD6ECB33C850C8-4D4-2007F@webmail-m083.sysops.aol.com> Message-ID: On Mon, Dec 20, 2010 at 6:09 PM, A. Jorge Garcia wrote: > > As I recall, mathpiper branched off from SAGE 2 or 3 years ago. ?Both projects are based on python, no? > > Regards, > A. Jorge Garcia > Applied Math and CompSci > http://shadowfaxrant.blogspot.com > http://www.youtube.com/calcpage2009 > >From the advanced FAQ: What Is MathPiper? MathPiper is an interpreted Computer Algebra System which has the following capabilities: Pattern matching. Term rewriting. Output in text, 2D text, LaTeX, and OpenMath output. Lisp-like macros. MathPiper has an m-expression syntax and it is implemented on a Java-based Lisp interpreter.? It was forked from?JYacas?in 2008 and has undergone continuous development since that time. From calcpage at aol.com Tue Dec 21 03:18:49 2010 From: calcpage at aol.com (A. Jorge Garcia) Date: Mon, 20 Dec 2010 21:18:49 -0500 Subject: [Edu-sig] cool stuff out there... In-Reply-To: References: Message-ID: <8CD6ECC8A04D0CE-4D4-20244@webmail-m083.sysops.aol.com> I stand corrected! I recall there was some talk about mathpiper and SAGE collaborating back in 2008.... HTH, A. Jorge Garcia Applied Math and CompSci http://shadowfaxrant.blogspot.com http://www.youtube.com/calcpage2009 From kirby.urner at gmail.com Fri Dec 31 22:58:26 2010 From: kirby.urner at gmail.com (kirby urner) Date: Fri, 31 Dec 2010 13:58:26 -0800 Subject: [Edu-sig] End of 2010... Happy \N Message-ID: Code Blit: The string module has translate and maketrans, through multiple versions. In per 3.x, an optional argument listed "letters to delete". The first argument was a kind of mapping, of 256 symbols to itself, except with some letters changed, what we would call a "permutation" in group theory (not promising a bijectional one-to-one mapping, no way, more likely surjective, do we agree?). http://www.youtube.com/watch?v=xKNX8BUWR0g Here we are in 2.6, where the bytes type is not yet operative. IDLE 2.6.5 >>> b'a' 'a' >>> type(b'a') Now let's replay that action in 3.1: >>> b'a' b'a' >>> type(b'a') Here's my idea of a punctuation filter in 3.x, where the delete characters clause is now a delete bytes clause in the byte type superobject. import string def filterpunc(thestr): return thestr.encode('utf-8').translate(bytes.maketrans(b'',b''), string.punctuation.encode('utf-8')).decode('utf-8') See: http://diveintopython3.org/strings.html http://www.devx.com/opensource/Article/42659/1763 if curious. This'd be used to strip string.punctuation characters out of any string. Other solutions possible, including with regexps. Suggestions for Features (SFFs -- not as prestigious or important as PEPs but sometimes the genetic precursor of a PEP). Save Session in IDLE or other PyShell: This is probably already out there, in IPython or one of those. It's so cool to be able to interactively bind names to working code in memory, but when you resume your session later, all that has gone away. In some other shell environments, you have the option to hibernate and resume, Smalltalk's being the most famous. Would it come with a source code snapshot version that encapsulates all the definitions as runnable code? The latest version of f, all the latest object values? That's another way to "pickle", to just write out a module that recreates what was there, when run. Python in Mathland: A link to a recent summary that mentions Python quite a bit: http://groups.google.com/group/mathfuture/browse_thread/thread/3d642708c2f2a80?hl=en Kirby -------------- next part -------------- An HTML attachment was scrubbed... URL: