Instead of deciding between Python or Lisp for a programming intro course...What about an intro course that uses *BOTH*? Good idea?

2015-05-10 Thread Chris Seberino
Instead of learning only Scheme or only Python for a one semester intro course, what about learning BOTH? Maybe that could somehow get the benefits of both? I'm thinking that for the VERY beginning, Scheme is the fastest language to get beginners up and running writing code due to the extremely m

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-04 Thread Chris Seberino
Thanks.. I think your 10% Python idea is the way to go. And you are right that most of Python is not needed in an intro course. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Chris Seberino
On Friday, January 3, 2014 11:10:07 AM UTC-6, Devin Jeanpierre wrote: > A lecturer of mine back in university did this (implemented a subset > > of Python in Racket). My understanding is that this is primarily > > interesting to show that Racket is not as crazily different as it > > looks from

Re: Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Chris Seberino
Exceptions, modules, OOP, etc. would be tricky to implement in Scheme but at least the basics like for loops, while loops, assignment etc. would seem doable and very instructive for students.they would thereafter, for all time, have a mental image of what the Python interpreter is doing.

Is Python really "Lisp without parentheses"? So would it be easy to *implement* a lot of Python in Scheme/Lisp?

2014-01-03 Thread Chris Seberino
I've heard it said, by no less a guru than Peter Norvig, that Python is a lot like Lisp without the parentheses at least for the basics of Python. For pedagogical reasons, I'm wondering if it would be easy to implement a big subset of Python in Scheme. The basics of Scheme or Lisp are ama

logging module -> Miss messages if don't flush constantly? How set to flush constantly?

2010-08-21 Thread Chris Seberino
It looks like I can miss some logging messages if I don't flush after every oneis that true? This is an issue when program crashes so that logger didn't get a chance to print everything. Is there some way to set logging to constantly flush? -- http://mail.python.org/mailman/listinfo/python-l

Re: Possible to make subprocess.Popen jobs run serially rather than in parallel?

2010-06-16 Thread Chris Seberino
On Jun 16, 11:27 am, Stephen Hansen wrote: > On 6/16/10 7:04 AM, Chris Seberino wrote: > > > On Jun 15, 2:03 pm, Stephen Hansen wrote: > > >> Just call "process.wait()" after you call process = subprocess.Popen(...) > > > I may have not been clear.

Re: Possible to make subprocess.Popen jobs run serially rather than in parallel?

2010-06-16 Thread Chris Seberino
On Jun 15, 2:03 pm, Stephen Hansen wrote: > Just call "process.wait()" after you call process = subprocess.Popen(...) I may have not been clear. I *don't* want web app to block on Popen.wait. I *do* want the Popen process to run in the background which web app still runs doing other things.

Possible to make subprocess.Popen jobs run serially rather than in parallel?

2010-06-15 Thread Chris Seberino
Possible to make subprocess.Popen jobs run serially rather than in parallel? In other words, if a computer is low on memory and doesn't mind waiting.can Popen be configured to submit to a queue and run jobs *ONE AT TIME*?? That might be useful and avoid crashes and disk swapping. cs -- http

Re: newbie subprocess.Popen performance issues/questions

2010-06-15 Thread Chris Seberino
On Jun 15, 2:44 am, News123 wrote: > ChrisSeberinowrote: > > I tried to use subprocess.Popen to make my web app do a bunch of stuff > > in separate processes today.  It appeared like only the first one > > finished and/or the rest of the forked processes crashed. > First thing to do would be to s

newbie subprocess.Popen performance issues/questions

2010-06-14 Thread Chris Seberino
I tried to use subprocess.Popen to make my web app do a bunch of stuff in separate processes today. It appeared like only the first one finished and/or the rest of the forked processes crashed. I only have around 300Mb. Is it possible that my subprocess.Popen code was swapping to disk so much th

Re: How do subprocess.Popen("ls | grep foo", shell=True) with shell=False?

2010-06-10 Thread Chris Seberino
On Jun 10, 6:52 am, Nobody wrote: > Without the p1.stdout.close(), if the reader (grep) terminates before > consuming all of its input, the writer (ls) won't terminate so long as > Python retains the descriptor corresponding to p1.stdout. In this > situation, the p1.wait() will deadlock. > > The c

How do subprocess.Popen("ls | grep foo", shell=True) with shell=False?

2010-06-09 Thread Chris Seberino
How do subprocess.Popen("ls | grep foo", shell=True) with shell=False? Does complex commands with "|" in them mandate shell=True? cs -- http://mail.python.org/mailman/listinfo/python-list

Re: re.sub question (regular expressions)

2009-10-20 Thread Chris Seberino
On Oct 16, 9:51 am, MRAB wrote: > What do you mean "blow up"? It worked for me in Python v2.6.2. My bad. False alarm. This was one of those cases where a bug in another area appears like a bug in a different area. Thank for the help. cs -- http://mail.python.org/mailman/listinfo/python-list

re.sub question (regular expressions)

2009-10-16 Thread Chris Seberino
What does this line do?... input_ = re.sub("([a-zA-Z]+)", '"\\1"', input_) Does it remove parentheses from words? e.g. (foo) -> foo ??? I'd like to replace [a-zA-Z] with \w but \w makes it blow up. In other words, re.sub("(\w+)", '"\\1"', input_) blows up. Why? cs -- http://mail.python.org/m

Where regexs listed for Python language's tokenizer/lexer?

2009-09-11 Thread Chris Seberino
Where regexs listed for Python language's tokenizer/lexer? If I'm not mistaken, the grammar is not sufficient to specify the language you also need to specify the regexs that define the tokens right?..where is that? chris -- http://mail.python.org/mailman/listinfo/python-list

Where find regexs needed to build lexical analyzer for Python source code?

2009-09-11 Thread Chris Seberino
I'd like to build a lexer aka lexical analyzer aka tokenizer for Python source code as a learning exercise. Where can I find the regexs that define the tokens of Python source? (I am aware of tokenizer.py but I was hoping there was a web page w/ a list somewhere.) cs -- http://mail.python.org/ma

How *build* new elements and *replace* elements with xml.dom.minidom ?

2009-06-10 Thread Chris Seberino
How build new elements to replace existing ones using xml.dom.minidom? Specifically, I have an HTML table of numbers. I want to replace those numbers with hyperlinks to create a table of hyperlinks. So I need to build hyperlinks (a elements) with href attribute and replace the text elements (num