From dyoo@hkn.eecs.berkeley.edu Tue Jan 1 23:42:57 2002 From: dyoo@hkn.eecs.berkeley.edu (Danny Yoo) Date: Tue, 1 Jan 2002 15:42:57 -0800 (PST) Subject: [Edu-sig] pyscheme Message-ID: Hi everyone, I've been tinkering with Scheme and Python for a while now, and I've cooked up a translation of the interpreter from the textbook "The Structure and Interpretation of Computer Programs" into Python: http://hkn.eecs.berkeley.edu/~dyoo/python/pyscheme/ If anyone wants to use the code, please feel free. I hope this helps! From schoen@loyalty.org Wed Jan 2 03:17:24 2002 From: schoen@loyalty.org (Seth David Schoen) Date: Tue, 1 Jan 2002 19:17:24 -0800 Subject: [Edu-sig] pyscheme In-Reply-To: References: Message-ID: <20020102031724.GS26619@zork.net> Danny Yoo writes: > Hi everyone, > > I've been tinkering with Scheme and Python for a while now, and I've > cooked up a translation of the interpreter from the textbook "The > Structure and Interpretation of Computer Programs" into Python: > > http://hkn.eecs.berkeley.edu/~dyoo/python/pyscheme/ > > > If anyone wants to use the code, please feel free. I hope this helps! That's impressive. I fed it the quine ((lambda (x) (list x (list (quote quote) x))) (quote (lambda (x) (list x (list (quote quote) x))))) and was impressed that I got back "the same" expression. Unfortunately, the notation is different, using Python lists and Python quotation instead of Scheme lists and Scheme quotation. The result, since the interpreter won't accept Python lists as input, is that you can't _actually_ write a program in a simple way which prints itself out character-for-character. What would it take to make output from your interpreter appear in Scheme-style instead of Python-style? -- Seth David Schoen | Reading is a right, not a feature! http://www.loyalty.org/~schoen/ | -- Kathryn Myronuk http://vitanuova.loyalty.org/ | From dyoo@hkn.eecs.berkeley.edu Wed Jan 2 09:43:42 2002 From: dyoo@hkn.eecs.berkeley.edu (Danny Yoo) Date: Wed, 2 Jan 2002 01:43:42 -0800 (PST) Subject: [Edu-sig] pyscheme In-Reply-To: <20020102031724.GS26619@zork.net> Message-ID: > > I've been tinkering with Scheme and Python for a while now, and I've > > cooked up a translation of the interpreter from the textbook "The > > Structure and Interpretation of Computer Programs" into Python: > > > That's impressive. > > I fed it the quine > > ((lambda (x) (list x (list (quote quote) x))) (quote (lambda (x) (list > x (list (quote quote) x))))) > > and was impressed that I got back "the same" expression. > Unfortunately, the notation is different, using Python lists and > Python quotation instead of Scheme lists and Scheme quotation. The > result, since the interpreter won't accept Python lists as input, is > that you can't _actually_ write a program in a simple way which prints > itself out character-for-character. Ah! Ok, here's a function that translates Python structures into scheme-looking strings: ### def expressionToString(expr): if not isList(expr): return str(expr) if isCompoundProcedure(expr): return expressionToString([Symbol('compound-procedure'), procedureParameters(expr), procedureBody(expr)]) return '(' + string.join(map(expressionToString, expr), ' ') + ')' ### This function also summarises compound procedures so thtat only their parameters and body will show, and does the work that USER-PRINT did in the original metacircular evaluator. I'll sandwich expressionToString() between output to the user, and that should allow quine-expressions to work properly. With the modifications, the self-quining code now does this: ### [PyScheme] >>> ((lambda (x) (list x (list (quote quote) x))) (quote (lambda (x) (list x (list (quote quote) x))))) ((LAMBDA (X) (LIST X (LIST (QUOTE QUOTE) X))) (QUOTE (LAMBDA (X) (LIST X (LIST (QUOTE QUOTE) X)))) ### The updated code is at: http://hkn.eecs.berkeley.edu/~dyoo/python/pyscheme/pyscheme-0.6.tar.gz Thanks for the suggestion! From mats@laplaza.org Wed Jan 2 16:20:33 2002 From: mats@laplaza.org (Mats Wichmann) Date: Wed, 02 Jan 2002 09:20:33 -0700 Subject: [Edu-sig] New Books + goodies In-Reply-To: <004901c188b0$b1651d20$6501a8c0@vaio> References: <20011217221902.96369.qmail@web13406.mail.yahoo.com> <000001c1882e$93a323e0$6501a8c0@vaio> Message-ID: <5.1.0.14.1.20020102091748.01f74cf0@204.151.72.2> At 01:14 PM 12/19/2001 -0500, Jason Cunliffe wrote: >Season's greetings everyone! > >I saw a couple of pretty interesting looking new Python books in Barnes & >Noble yesterday: > >Python Programming Patterns >by Thomas W. Christopher > >Web Programming in Python: Techniques for Integrating Linux, Apache and >MySQL >by George K. Thiruvathukal, Thomas W. Christopher, John P. Shafaee also: Python Web Programming by Steve Holden (a frequent c.l.python poster) is due from New Riders on Jan 15. From dyoo@hkn.eecs.berkeley.edu Wed Jan 2 21:19:43 2002 From: dyoo@hkn.eecs.berkeley.edu (Danny Yoo) Date: Wed, 2 Jan 2002 13:19:43 -0800 (PST) Subject: [Edu-sig] "One Day of IDLE Toying" web guide available (fwd) Message-ID: Hi everyone, (I've forgotten if I've announced this on edu-sig yet, so if this is a repeat message, please forgive my mistake!) I've written a small introductory guide to IDLE that may help new students. It's a graphical guide and limited to showing the ropes with IDLE, and should help those who are just beginning to learn programming. http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html From dyoo@hkn.eecs.berkeley.edu Thu Jan 3 01:43:40 2002 From: dyoo@hkn.eecs.berkeley.edu (Danny Yoo) Date: Wed, 2 Jan 2002 17:43:40 -0800 (PST) Subject: [Edu-sig] Re: http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html (fwd) Message-ID: On Wed, 2 Jan 2002, Dr. David J. Ritchie, Sr. wrote: > In http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html > > I am afraid I could not find the syntax error that your example claims > was there. There should be a missing quote in the picture http://hkn.eecs.berkeley.edu/~dyoo/python /idle_intro/entering_in_new_window.jpeg where it says: print "Here are the ten numbers from 0 to 9 ^^^ What other common errors do people do when then first start fiddling with IDLE? From schoen@loyalty.org Thu Jan 3 05:23:08 2002 From: schoen@loyalty.org (Seth David Schoen) Date: Wed, 2 Jan 2002 21:23:08 -0800 Subject: [Edu-sig] pyscheme In-Reply-To: References: <20020102031724.GS26619@zork.net> Message-ID: <20020103052308.GH3898@zork.net> My next concern (sorry to non-Scheme folks) is that -- as your BUGS section explicitly notes -- your "cons" doesn't work with atoms. Yikes! Using Python lists to represent Scheme lists is very clever, and saves lots of memory, but this restriction on cons seems like a big change to Scheme. I think I have come up with an elegant solution which allows you to create pairs which aren't Scheme lists, while retaining the use of Python lists as the underlying representation of the result of cons operations which _do_ create Scheme lists (for efficiency). This is to detect whether the second argument to cons is a list (which you do), but, instead of raising an error if it's not, represent such Scheme pairs as Python tuples (of length 2). This requires trivial modifications to cons and cdr (and a change to the error-checking in car), but it appears to have no other effects. The bonus is that you automatically get pair output which looks like (FOO, BAR) where Scheme would print (FOO . BAR) to indicate a non-list pair. By contrast, the corresponding Scheme list -- which can be created with (cons 'foo (cons 'bar '())), even after my proposed modification -- is still displayed, in proper Scheme style, as (FOO BAR) I will send you my updated scheme.py so you can look at this. -- Seth David Schoen | Reading is a right, not a feature! http://www.loyalty.org/~schoen/ | -- Kathryn Myronuk http://vitanuova.loyalty.org/ | From Jason Cunliffe" Message-ID: <000301c1946f$87c686a0$6501a8c0@vaio> > I've written a small introductory guide to IDLE that may help new > students. It's a graphical guide and limited to showing the ropes with > IDLE, and should help those who are just beginning to learn programming. > > http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html Yes. Good idea to have a basic introduction like this including sequential screenshots. One thing which immediately hung me up when I started Python is where one can and should saves files to and what happens when Python cannot find them, and how to fix that. I think it woudl be really good if you can also cover that aspect, including the normal alternate to IDLE's 'run' which is Python's essential import statement. It is almost impossible to get going with Python without import, or for that matter editing the python PATH, and changing directories. These things are very confusing for beginners imo. They belong in your tutorial. As soon as someone tries to use a package or even a simple module like a beginner's hello_world.py file they may have written, they are likely to find it will not load unless these issues are addressed. thanks and keep up the good work! ./Jason From ping@lfw.org Thu Jan 3 17:17:03 2002 From: ping@lfw.org (Ka-Ping Yee) Date: Thu, 3 Jan 2002 11:17:03 -0600 (CST) Subject: [Edu-sig] pydoc.org updated Message-ID: I would like to apologize for allowing pydoc.org to fall behind Python development for the past few months. At last count, it only gave documentation for Python 2.1b1 and 1.5.2. Today, pydoc.org has been updated to provide all the pydoc-generated documentation pages for Python 1.5.2, 1.6, 2.1, and 2.2 final. The search feature lets you search the names of all the modules, packages, functions, classes, and methods, and the text of all their docstrings. I hope it can be a useful resource for you. Any thoughts you have on making it better would be very welcome, of course. -- ?!ng From sandysj@asme.org Fri Jan 4 21:56:01 2002 From: sandysj@asme.org (Jeff Sandys) Date: Fri, 4 Jan 2002 13:56:01 -0800 (PST) Subject: [Edu-sig] Where are the girl programmers? Message-ID: <20020104215601.13050.qmail@web12802.mail.yahoo.com> I have been trying to get and keep a broad range of middle school students in the after school programming club that I supervise. Some girls show up to the first sesson but by the second session only the "geek boys" return. Some of the suggestions from some female programmers that I work with are: * Girls want a woman instructor. (I wish) * Girls want to solve problems not program. (give problems) * Girls think in terms of objects not functions. (focus on object oriented programming) * Girls like to socialize. (use pairs programming) I want to avoid stereotypes, but some differences may be genetic or an archtype that won't change in the short term. Like sports, it needs a special effort to start getting more women involved in programming. What are your thoughts on getting and keeping more middle school girls involved in programming? (responses from women are especially appreciated!) Thanks, Jeff Sandys __________________________________________________ Do You Yahoo!? Send your FREE holiday greetings online! http://greetings.yahoo.com From djrassoc01@mindspring.com Sat Jan 5 05:02:58 2002 From: djrassoc01@mindspring.com (Dr. David J. Ritchie, Sr.) Date: Fri, 04 Jan 2002 23:02:58 -0600 Subject: [Edu-sig] Where are the girl programmers? References: <20020104215601.13050.qmail@web12802.mail.yahoo.com> Message-ID: <3C368902.2B78337B@mindspring.com> Dear Jeff, et. al., Interesting questions. Here are my experiences... Jeff Sandys wrote: > I have been trying to get and keep a broad range of > middle school students in the after school programming > club that I supervise. Some girls show up to the first > sesson but by the second session only the "geek boys" > return. I have had some success in keeping girls involved in the Middle School computer clubs that I have done. It hasn't been overwhelming but they have had a presence. Generally, I have had about 30% girls ( 4 out of 12). In one Mars Space camp I did we had more than half girls. > Some of the suggestions from some female > programmers that I work with are: > > * Girls want a woman instructor. (I wish) In all cases, my partner (an instructional aide or a teacher) has been a woman. Actually, I think it is very advisable to have a woman partner - certified teacher or instructor - these days--particularly when one is a volunteer as I am and not a certified teacher--and particularly when it is an after-school activity. During the sign up period, the teacher / instructor has been very instrumental in encouraging particular students who would appear to be interested but perhaps a bit reticient -- even to the point of encouraging one to get a friend to also come to the Computer Club sessions. > > * Girls want to solve problems not program. (give problems) My tack has been neither. The focus has been to treat programming as a "language art". The goal for the several club sessions has been to end up with each student writing an interactive adventure story where adventure really means any story that the student wants to write that involves scenes, experiences, and choices where the choices than dictate the next scenes, experiences and choices to be had. This is similar to the game "Adventure" that came out a long time ago or similar to the "Choose Your Own Adventure" books that are available. > > * Girls think in terms of objects not functions. > (focus on object oriented programming) I have not done that. My previous several club sessions have been using Perl and the approach has been fairly procedural. This Fall I am doing something very similar but in Python where I have tried to embrace the object oriented approach. I don't think the girls have taken to it any more (or any less) than the boys. > > * Girls like to socialize. (use pairs programming) It has been helpful to have the girls partner with someone of their own choosing. It's also occurred with the boys as well. It's been important to remember (for me) that a club is supposed to be more of a social experience overall and (for me) to not be too heavy duty goal oriented. Fortunately, my partner teacher/instructional-aides have tended to know more of where the kids are coming from and push things in a more balanced direction. > > > I want to avoid stereotypes, but some differences may > be genetic or an archtype that won't change in the > short term. Like sports, it needs a special effort > to start getting more women involved in programming. I don't think this is the case--at least in my experience. As an instructor in this area, I do have to make sure I am sensitive to >all< students' requests for help. The guys tend to yammer at me and will dominate my entire time. The girls will ask less forcefully. I have learned that I have to notice when a guy is making too much use of my time and make sure that I get around to the each girl and give her her share of attention. Again, my partners have helped. We talk about each individual and how they are doing after each session and try to adapt the next session's time to whatever we see as necessary for their development. > > > What are your thoughts on getting and keeping more > middle school girls involved in programming? You can see more of my experiences on my web site (address given below) where my Perl computer club efforts since 1997 are written up. --D. -- Dr. David J. Ritchie, Sr. djrassoc01@mindspring.com http://home.mindspring.com/~djrassoc01/ From urnerk@qwest.net Fri Jan 11 06:35:40 2002 From: urnerk@qwest.net (Kirby Urner) Date: Thu, 10 Jan 2002 22:35:40 -0800 Subject: [Edu-sig] Basic number theory w/ Python Message-ID: <4.2.0.58.20020110221617.015c4740@pop3.norton.antivirus> A result of number theory is any positive integer is the sum of the totients of its factors. What does that mean? The totient of n is the number of positives less than n, including 1, and which are relatively prime to n, i.e. have no factors in common with n other than 1. So, for example, 28 has no factors in common, other than 1, with the following positive numbers < 28: [1, 3, 5, 9, 11, 13, 15, 17, 19, 23, 25, 27] The number of such numbers is the totient of n, and is simply the length of this list, i.e. 12. So totient(28)==12. Defining totient(n) is easy (for small n) if we have a way to assure gcd(i,n)==1, 0>> factors(28) [1, 2, 4, 7, 14, 28] >>> map(totient,factors(28)) [1, 1, 2, 6, 6, 12] >>> 1+1+2+6+6+12 28 Here are some functions to check this out for low (small) positive integers: from operator import add def gcd(a,b): "greatest common divisor of a,b" while b: a, b = b, a%b return a def factors(n): "return list of factors of n" return [i for i in range(1,n+1) if n%i==0] def sumtots(n): "sum the totients of n's factors" return reduce(add,[totient(i) for i in factors(n)]) Usage: >>> sumtots(28) 28 >>> sumtots(100) 100 >>> sumtots(120383) 120383 Kirby [1] my recollection is this simple Pythonic form of Euclid's Algorithm was first presented by Guido himself -- is this correct? From Jason Cunliffe" >From time to time here I have championed Flash5 as a great intro to Object Oriented Programming. Flash5 offers a unique hands-on paradigm combining interactive visualization accesible through ActionScript, its built-in language [almost = Javascript]. There is a brilliant on-line tutorial by Robin Debreuil, one of Flash5's oop gurus and avid participant of the thriving Flashcoders mailing list: http://www.debreuil.com/docs/ch01_Intro.htm I recommend it on several counts: - For those of you intested to know more about Flash5 oop, but wishing to avoid $45 color glossy designer coffe-table Flash progamming books. - For anyone interested in OOP tutorials - For students working with Python but wondering how to apply skills and ideas developing there in other [non-python] contexts. {What's the BIGGER pattern?} - ... ./Jason ______________________________________________ Jason Cunliffe [NOMADICS: Director art+design] tel/fax: +1 718 422-1078 jasonic@nomadics.org N 43:00.000' W 074:31.875' ALT:1144 ft 84 Henry Street #3C Brooklyn NY 11201 USA From urnerk@qwest.net Wed Jan 16 06:45:37 2002 From: urnerk@qwest.net (Kirby Urner) Date: Tue, 15 Jan 2002 22:45:37 -0800 Subject: [Edu-sig] Great OOP tutorial [OT] In-Reply-To: <000801c19d42$3c79c460$6501a8c0@jasonic> Message-ID: <4.2.0.58.20020115223657.019de350@pop3.norton.antivirus> Thanks Jason. I've been exploring Flash 5 recently and the tutorial was useful, although I'm somewhat surprised it doesn't also use Flash movies to teach OO. Some of my very early forays: http://www.inetarena.com/~pdx4d/ocn/flash/reciprocal.html http://www.inetarena.com/~pdx4d/ocn/flash/group.html http://www.inetarena.com/~pdx4d/ocn/flash/sumtotients.html The link to Python at this point is simply that the Flash exhibits graphically support what elsewhere I'm using Python to explore (e.g. sum of totients of factors of n = n is explored in numfun.py etc.). In any case, I agree with you that Flash potentially provides a useful into to OO with immediate feedback/ applications. The downside is it's far from free (unlike Python) and the OO model is somewhat more complicated I think (Python's is actually more sophisticated, but conceals enough to make the basics easier -- or maybe I'm just biased, being new to the Flash paradigm). The hardest parts of the tutorial are the special add-on functions the author has to introduce to make the Flash language itself a little easier to use i.e. he's using the language to complete the language (admittedly, lots of successful languages do this). Kirby From Jason Cunliffe" Message-ID: <005501c19e98$e4893760$6501a8c0@jasonic> physics engine http://www.xs4all.nl/~stuartmx/physicsEngine/ From Jason Cunliffe" Hi Kirby Thanks for your comments. "Kirby Urner" wrote > http://www.debreuil.com/docs/ch01_Intro.htm .. > Thanks Jason. I've been exploring Flash 5 recently and > the tutorial was useful, although I'm somewhat surprised > it doesn't also use Flash movies to teach OO. Yes I agree. There are other some tutorials out there that do some. http://www.moock.org/ http://www.moock.org/webdesign/flash/ http://www.moock.org/asdg/codedepot/ It would be very nice to see a good intro to OOP suitable for Python done in Flash graphics for example. Robin Debreuil's goal was really how do to use OOP to roll your own Flash. Robin Debreuil & co are the people who are increasingly by passing Flash's normal design interface. They are busy virtualizing the entire thing in code. It a bloody process, but I hpe the longer term results will go way beyond Macromedia empire and FLash as we know it.. Thye've come along way in the past year. 2002 is going to be very intense as they same people build and fuse event models, engines and socket servers of their own to override the default model as far as they can go. http://chattyfig.figleaf.com/flashcoders-wiki/http://chattyfig.figleaf.com/~ bhall/code/xmlnitro.as http://chattyfig.figleaf.com/ack/eventengine.php http://www.moock.org/unity/ http://www.natzke.com/ The deeper it goes, the more impressive is the effort, and the gerater the need/shame that Python is not there instead/also. It is facinating to see how Flash has developed and a vibrant openSource alter-ego. That seesm to be the real meme these days. .. meanwhile the player gets pushed onto more commercial devices: http://www.flashenabled.com/mobile/ which further motivates the alter-ego. A interesting case in point is the Sharp Zaurus, a linux based PDA [with micro keyboard]. http://developer.sharpsec.com/ It's a bold experiment to see how the openSource community can rise to the occasion. Trolltech have announced a comptetion as their QT windowing system runs on it. Qt has Python wrappers btw. http://www.thekompany.com/projects/pykde/ PDAs are cool I think ecause while still overpriced vanity gizmos, they are now teetering on the verge of greater embeded yechnolgy, and hopefully true usefullness ;-) At this juncture they reverse the trend for massively icnrasing RAM and isk pace which has egniifled softawer design. PDAs truly reward great software engineering: minimalism, footprint, portability, reusability, etc. And GUIs are the big test. There has been much topical debate on Flashcoders and elswewhere recently about compexity of OOP vs. real need vs. real use. Why OOP? Why build these big abstract constructs? Sometimes they seem to to take people further and furterh away from what hey aer really [originally] trying to do. they becom grails/goals + means in themselves. The answer seems to be that GUIs are where they are needed - the payoff. PythonCard - an contracting abtraction on top of an expanding abstraction. wxPython is massively generalized and meta-verbose. PythonCard steps up to bat and tries to make it more useful again by offering focus and simpification by understanding better the context in which these things are actually used. > Some of my very early forays: > http://www.inetarena.com/~pdx4d/ocn/flash/reciprocal.html > http://www.inetarena.com/~pdx4d/ocn/flash/group.html > http://www.inetarena.com/~pdx4d/ocn/flash/sumtotients.html Very nice. There was great space PBS series on TV years ago that used dynamic typography and presentation of equations like that. It covered Netwon's laws of motion etc. > In any case, I agree with you that Flash potentially > provides a useful into to OO with immediate feedback/ > applications. The downside is it's far from free (unlike > Python) and the OO model is somewhat more complicated > I think (Python's is actually more sophisticated, but > conceals enough to make the basics easier -- or maybe > I'm just biased, being new to the Flash paradigm). Absolutely. I wish--wish there were a fgeat opensource Flash-like tool. Which could use scripting langauge of choice [Python, PHP, Javascript, REBOL ..]I think there will be. But I fear not very soon.. One can presently generate Flash SWF by raw scripting using MING [PHP, Python apis] http://opaque.net/ming/ And make-swf is a new one for REBOL :) http://sweb.cz/oliva.david/swf/ ASV is a famous tool for viewing Actionscript inside SF's for which one does not have the source .FLA http://www.buraks.com/asv/9.html flasm is a command line assembler/disassembler of flash actionscript bytecode: http://flasm.sourceforge.net/ > The hardest parts of the tutorial are the special add-on > functions the author has to introduce to make the Flash > language itself a little easier to use i.e. he's using > the language to complete the language (admittedly, lots > of successful languages do this). Yes true. I read that Robin is trying to improve those sections. There is forum about it and others have encouraged clarification there. I think it is partly a problem of explaining these things, partly that Actionscript has many flaws and is very young. Many have criticized Macromedia's programmers for not being open, rigorous or lucid enough. Others say it is mainly they are isolated by Macromedia marketing wonks brand of techno-politics. These critiques are naturally further strong arguments for why openSource, Python etc. ./Jason ______________________________________________ Jason Cunliffe [NOMADICS: Director art+design] tel/fax: +1 718 422-1078 jasonic@nomadics.org N 43:00.000' W 074:31.875' ALT:1144 ft 84 Henry Street #3C Brooklyn NY 11201 USA From bembry@bembry.org Wed Jan 16 16:05:41 2002 From: bembry@bembry.org (Bryce Embry) Date: Wed, 16 Jan 2002 10:05:41 -0600 Subject: [Edu-sig] High School Programming Competition Message-ID: <5.1.0.14.0.20020116095739.00ac3770@www.bembry.org> Howdy, Middle Tennessee State University has been holding a high school programming competition for the last 20 years. I've been in contact with the director of the competition and they are going to include Python as a programming language choice this year. If you are in the area, teaching Python to high school students, and want to get involved, check out http://www.mtsu.edu/~csdept/HighSchool/. They currently do not have Python listed on the web site, but will add it as soon as they get a Python team signed up (I hope to get our school signed up in the next week or so). Enjoy, ----------------------------------------------------------------------------------------- Bryce Embry --- Geek of All Trades, Master of None --- Margolin Hebrew Academy --- 390 South White Station --- Memphis, TN 38117 --- (901) 682-2409 From bchang@artic.edu Wed Jan 16 19:10:41 2002 From: bchang@artic.edu (bchang@artic.edu) Date: Wed, 16 Jan 2002 13:10:41 -0600 (CST) Subject: [Edu-sig] Re: Edu-sig digest, Vol 1 #457 - 4 msgs In-Reply-To: References: Message-ID: <1011208241.3c45d0310cd1b@webmail.artic.edu> > Absolutely. I wish--wish there were a fgeat opensource Flash-like tool. > Which could use scripting langauge of choice [Python, PHP, Javascript, > REBOL > ..]I think there will be. But I fear not very soon.. One of my students recently introduced me to SVG (Scalable Vector Graphics), which is an open-format XML-based language that does pretty much everything flash does. it's W3C supported and also uses ECMAScript, but it seems you should be able to hook other scripting languages up to it. as a director & flash programmer i am indeed continuously infuriated by the closed-door approach macromedia uses - maybe this will be a viable alternative. --ben chang bchang@artic.edu art & technology studies school of the art institute of chicago From glingl@aon.at Tue Jan 22 20:45:43 2002 From: glingl@aon.at (Gregor Lingl) Date: Tue, 22 Jan 2002 21:45:43 +0100 Subject: [Edu-sig] New problem with -Qnew and IDLE? Message-ID: <001c01c1a385$c31e3840$1664a8c0@mega> This is a multi-part message in MIME format. ------=_NextPart_000_0019_01C1A38E.24B01E90 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Has anybody an explanation vor this: I started IDLE with the -Qnew switch. (I have a copy of the IDLE-Icon with this switch on my desktop) Then I did the following in IDLE's Python-Shell-Window: >>>def ggt(a,b): while b: ##### WHEN NOW I HIT ENTER, ##### THE RESULT WAS: >>> Exception in Tkinter callback Traceback (most recent call last): File "C:\Python22\lib\lib-tk\Tkinter.py", line 1292, in __call__ return apply(self.func, args) File "C:\Python22\Tools\idle\PyShell.py", line 588, in enter_callback self.auto.auto_indent(event) File "C:\Python22\Tools\idle\AutoIndent.py", line 301, in = newline_and_indent_event self.smart_indent_event(event) File "C:\Python22\Tools\idle\AutoIndent.py", line 208, in = smart_indent_event self.reindent_to(effective + self.indentwidth) File "C:\Python22\Tools\idle\AutoIndent.py", line 455, in reindent_to text.insert("insert", self._make_blanks(column)) File "C:\Python22\Tools\idle\AutoIndent.py", line 442, in _make_blanks return '\t' * ntabs + ' ' * nspaces TypeError: unsupported operand type(s) for *: 'str' and 'float' def ggt(a,b): while b: So the cryptic Error - backtrace appeard after the >>> - Prompt=20 and BEFORE the two lines I just had typed in. Moreover, I only could return to the >>> - prompt=20 by hitting ^C (Keybord-Interrupt) This strange behaviour doesn't appear in ordinarily started IDLE. It also does not appear when starting Python (with or without -Qnew) from the MS-DOS prompt. I feel more and more, that there is some strange instability in IDLE connected with the -Qnew switch . Gregor P.S.: I'm interested in these problems, because in my opinion it is an important, if not crucial point to have a not only simple but also stable and reliable programming environment, when working with=20 highschool students, who are just beginning to learn to program. ------=_NextPart_000_0019_01C1A38E.24B01E90 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Has anybody an explanation vor this:
 
I started IDLE with the -Qnew switch.
(I have a copy of the IDLE-Icon with this switch on = my=20 desktop)
Then I did the following in IDLE's=20 Python-Shell-Window:
 
>>>def=20 ggt(a,b):
       while b:
 ##### WHEN NOW I HIT ENTER,
          &nbs= p;     =20 ##### THE RESULT WAS:
 
>>> Exception in Tkinter = callback
Traceback (most=20 recent call last):
  File "C:\Python22\lib\lib-tk\Tkinter.py", = line=20 1292, in __call__
    return apply(self.func, = args)
 =20 File "C:\Python22\Tools\idle\PyShell.py", line 588, in=20 enter_callback
    = self.auto.auto_indent(event)
  File=20 "C:\Python22\Tools\idle\AutoIndent.py", line 301, in=20 newline_and_indent_event
   =20 self.smart_indent_event(event)
  File=20 "C:\Python22\Tools\idle\AutoIndent.py", line 208, in=20 smart_indent_event
    self.reindent_to(effective +=20 self.indentwidth)
  File "C:\Python22\Tools\idle\AutoIndent.py", = line=20 455, in reindent_to
    text.insert("insert",=20 self._make_blanks(column))
  File=20 "C:\Python22\Tools\idle\AutoIndent.py", line 442, in=20 _make_blanks
    return '\t' * ntabs + ' ' *=20 nspaces
TypeError: unsupported operand type(s) for *: 'str' and=20 'float'
def ggt(a,b):
     while = b:
 
So the cryptic Error - backtrace appeard after = the=20 >>> - Prompt
and BEFORE the two lines I just had typed = in.
 
Moreover, I only could return to the >>> - = prompt=20
by hitting ^C (Keybord-Interrupt)
 
This strange behaviour doesn't appear in ordinarily = started=20 IDLE.
It also does not appear when starting Python (with = or without=20 -Qnew)
from the MS-DOS prompt.
 
I feel more and more, that there is some strange = instability=20 in IDLE
connected with the -Qnew = switch=20 .
 
Gregor
 
P.S.: I'm interested in these problems, because in = my opinion=20 it is
an important, if not crucial point to have a not = only simple=20 but also
stable and reliable programming=20 environment, when working with
highschool students, who are just beginning to learn = to=20 program.
 
------=_NextPart_000_0019_01C1A38E.24B01E90-- From elguavas@users.sourceforge.net Wed Jan 23 00:41:54 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: 23 Jan 2002 11:41:54 +1100 Subject: [Edu-sig] Re: [Idle-dev] New problem with -Qnew and IDLE? In-Reply-To: <001c01c1a385$c31e3840$1664a8c0@mega> References: <001c01c1a385$c31e3840$1664a8c0@mega> Message-ID: <1011746515.3171.2.camel@oberon> On Wed, 2002-01-23 at 07:45, Gregor Lingl wrote: > I started IDLE with the -Qnew switch. To my knowledge, idle has never had a -Qnew switch. -- Stephen M. Gava IDLEfork ( http://idlefork.sourceforge.net ) " just like IDLE, only crunchy " From guido@python.org Wed Jan 23 02:11:38 2002 From: guido@python.org (Guido van Rossum) Date: Tue, 22 Jan 2002 21:11:38 -0500 Subject: [Edu-sig] Re: [Idle-dev] New problem with -Qnew and IDLE? In-Reply-To: Your message of "23 Jan 2002 11:41:54 +1100." <1011746515.3171.2.camel@oberon> References: <001c01c1a385$c31e3840$1664a8c0@mega> <1011746515.3171.2.camel@oberon> Message-ID: <200201230211.VAA00964@pcp742651pcs.reston01.va.comcast.net> > On Wed, 2002-01-23 at 07:45, Gregor Lingl wrote: > > I started IDLE with the -Qnew switch. Stephen > To my knowledge, idle has never had a -Qnew switch. But Python 2.2 does. I can reproduce Gregor's problem. Gregor, can you submit a sourceforge bug report for it? --Guido van Rossum (home page: http://www.python.org/~guido/) From elguavas@users.sourceforge.net Wed Jan 23 01:23:44 2002 From: elguavas@users.sourceforge.net (Stephen M. Gava) Date: 23 Jan 2002 12:23:44 +1100 Subject: [Edu-sig] Re: [Idle-dev] New problem with -Qnew and IDLE? In-Reply-To: <200201230211.VAA00964@pcp742651pcs.reston01.va.comcast.net> References: <001c01c1a385$c31e3840$1664a8c0@mega> <1011746515.3171.2.camel@oberon> <200201230211.VAA00964@pcp742651pcs.reston01.va.comcast.net> Message-ID: <1011749024.3381.7.camel@oberon> Guido van Rossum wrote: > > On Wed, 2002-01-23 at 07:45, Gregor Lingl wrote: > > > I started IDLE with the -Qnew switch. > > Stephen > > To my knowledge, idle has never had a -Qnew switch. > > But Python 2.2 does. > > I can reproduce Gregor's problem. Gregor, can you submit a > sourceforge bug report for it? Ah, the new division business in 2.2. Looks like it's choking AutoIndent.py's whitespace calculations. Ok, I submitted a bug (# 507298) in idlefork's tracker for this. -- Stephen M. Gava IDLEfork ( http://idlefork.sourceforge.net ) " just like IDLE, only crunchy " From tim.one@home.com Wed Jan 23 05:15:09 2002 From: tim.one@home.com (Tim Peters) Date: Wed, 23 Jan 2002 00:15:09 -0500 Subject: [Edu-sig] RE: [Tutor] New problem with -Qnew and IDLE? In-Reply-To: <001c01c1a385$c31e3840$1664a8c0@mega> Message-ID: [Gregor Lingl] > Has anybody an explanation vor this: Better, I checked in a fix , so it should work in 2.2.1 (when it's released). > I started IDLE with the -Qnew switch. > (I have a copy of the IDLE-Icon with this switch on my desktop) > Then I did the following in IDLE's Python-Shell-Window: > > >>> def ggt(a,b): > while b: ##### WHEN NOW I HIT ENTER, > ##### THE RESULT WAS: > > >>> Exception in Tkinter callback > ... > File "C:\Python22\Tools\idle\AutoIndent.py", line 442, in _make_blanks > return '\t' * ntabs + ' ' * nspaces > TypeError: unsupported operand type(s) for *: 'str' and 'float' > def ggt(a,b): > while b: IDLE is trying to figure out how to auto-indent the next line. At one point it does effective = (effective / tabwidth + 1) * tabwidth That doesn't work as intended under -Qnew, so I changed it to effective = (int(effective / tabwidth) + 1) * tabwidth (you can change that line similarly in your copy of AutoIndent.py, of course). > ... > I feel more and more, that there is some strange instability in IDLE > connected with the -Qnew switch . Not really strange. We had 2.2 alpha and beta releases for half a year, and AFAICT nobody even *tried* -Qnew until after 2.2 final was released (did you?). The only thing I personally tried under the combo of IDLE and -Qnew was a one-liner to make sure 3/2 returned 1.5; I'm afraid that's all I had time for. > P.S.: I'm interested in these problems, because in my opinion it is > an important, if not crucial point to have a not only simple but also > stable and reliable programming environment, when working with > highschool students, who are just beginning to learn to program. You should read the PEP for its warnings about using -Qnew. At this stage it's for pioneers; if you can't tolerate some early glitches, I advise that you simply leave it alone. Else you can be very helpful by using it and reporting what goes wrong. That you're the first person to report this bug means you're the first person to try typing a "def" into an IDLE shell under -Qnew! We need *somebody* brave enough to try that . From Jason Cunliffe" Math Creativity new book due out http://www.levitated.net/exhibit/exhibitFlashmath.html ./Jason PS. a reminder to check out 'dbn' if you don't know it: http://dbn.media.mit.edu/ ______________________________________________ Jason Cunliffe [NOMADICS: Director art+design] tel/fax: +1 718 422-1078 jasonic@nomadics.org N 43:00.000' W 074:31.875' ALT:1144 ft 84 Henry Street #3C Brooklyn NY 11201 USA From ajs@ix.netcom.com Sun Jan 27 15:05:55 2002 From: ajs@ix.netcom.com (Arthur Siegel) Date: Sun, 27 Jan 2002 10:05:55 -0500 Subject: [Edu-sig] re: leviated new book Message-ID: <000d01c1a744$1f7d3ac0$a9e1fea9@carol> My (non-Python) plug is for "Fractals Visualization and J" by Clifford A. Reiter. This is a second edition of a book of math visualization explorations using the J language - which is a terse but interesting mathematically (executable symbolic math) oriented language that has apparently been around some time. Despite the book's name, it covers areas well beyond fractals. Site is http://ww2.lafayette.edu/~reiterc/j/ I expect it to stimulate some ideas for extending PyGeo, my geometric visualization tool created in and scriptable with P(ython). Art >Math Creativity new book due out >http://www.levitated.net/exhibit/exhibitFlashmath.html >./Jason >PS. >a reminder to check out 'dbn' if you don't know it: >http://dbn.media.mit.edu/ From Jason Cunliffe" http://it.mycareer.com.au/news/2001/06/05/FFX9ZT7UENC.html 2002-01-15 Fairfax IT: Trinity drinks deeply at learning's open source ["Trinity College at Melbourne University threw open its doors to open source in December 2000. The Windows network was replaced with Linux, and the Python programming language was adopted for teaching and operations."] From dyoo@hkn.eecs.berkeley.edu Thu Jan 31 01:18:16 2002 From: dyoo@hkn.eecs.berkeley.edu (Danny Yoo) Date: Wed, 30 Jan 2002 17:18:16 -0800 (PST) Subject: [Edu-sig] A Portuguese translations of "One Day of IDLE Toying" now up Message-ID: Hi everyone, Fernando Manas Ferreira has contributed the Portuguese translation to the "One Day of IDLE Toying" tutorial. I'm very floored and happy about this. Fernando's translation has been linked to the main site here: http://hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/index.html Thank you again for your help!