Re: generator/coroutine terminology

2015-03-14 Thread Rustom Mody
On Sunday, March 15, 2015 at 1:45:37 AM UTC+5:30, Ian wrote: > Now which should be considered definitive, the language reference or > the PEP? This question is not rhetorical; I don't know the answer. > Regardless of the answer though, the PEP at least illuminates the > design intent of the termino

SQLObject 2.1.2 and 1.7.5

2015-03-14 Thread Oleg Broytman
Hello! I'm pleased to announce versions 2.1.2 and 1.7.5, minor feature releases of of SQLObject. What's new in SQLObject === * Use fdb adapter for Firebird. Contributor for this release is Neil Muller. For a more complete list, please see the news: http://sqlobject.org/New

Re: generator/coroutine terminology

2015-03-14 Thread Chris Angelico
On Sun, Mar 15, 2015 at 11:48 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Sun, Mar 15, 2015 at 11:15 AM, Marko Rauhamaa wrote: >>> What features do generator iterators provide on top of generic >>> iterators? >> >> You can send values into them, throw exceptions into them, and close >> t

Re: Pexpect idea - but can I handle curses?

2015-03-14 Thread Skip Montanaro
>> Will I be in over my head trying to tweak the output? Hmmm... maybe if I tell top TERM=dumb? > > You may need to tell it TERM=dumb, though it might also refuse to run. It does run w/ TERM=dumb, so hopefully I won't have to resort to defining my own terminal definition. (Now, *that* takes me bac

Re: Pexpect idea - but can I handle curses?

2015-03-14 Thread Skip Montanaro
> That might have to do with > , specifically > . Thanks, but not really helpful. I'm well aware of Eric Raymond's contributions to the open source world. I'm also aware aware that my ques

Re: generator/coroutine terminology

2015-03-14 Thread Marko Rauhamaa
Chris Angelico : > On Sun, Mar 15, 2015 at 11:15 AM, Marko Rauhamaa wrote: >> What features do generator iterators provide on top of generic >> iterators? > > You can send values into them, throw exceptions into them, and close > them (which is a special case of the latter). Hm. I wonder why the

Re: generator/coroutine terminology

2015-03-14 Thread Chris Angelico
On Sun, Mar 15, 2015 at 11:15 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Sun, Mar 15, 2015 at 9:15 AM, Marko Rauhamaa wrote: >>> Is it necessary/useful for a Python application programmer to be >>> conscious of the different types of iterator? What mistaken usage >>> could arise if the

Re: generator/coroutine terminology

2015-03-14 Thread Marko Rauhamaa
Chris Angelico : > On Sun, Mar 15, 2015 at 9:15 AM, Marko Rauhamaa wrote: >> Is it necessary/useful for a Python application programmer to be >> conscious of the different types of iterator? What mistaken usage >> could arise if the application just treated all iterators as, well, >> iterators? >

Re: The idle gui

2015-03-14 Thread Chris Angelico
On Sun, Mar 15, 2015 at 12:04 AM, Dave Angel wrote: > I wasn't actually trying to pick on the OP this time, but to make a joke. > Idle could be taken two ways (if it weren't for the capitalization), or even > three (My Chevy won't idle.). Beware the Idles of March? ChrisA -- https://mail.pytho

Re: Micropython?

2015-03-14 Thread Chris Angelico
On Sat, Mar 14, 2015 at 5:43 PM, Paul Rubin wrote: > http://www.micropython.org/ > > Has anyone used this? Know anything about it? I don't remember seeing > any mention of it here. I remember there was a stripped down Python > some years back that didn't work very well, but I think this is > di

Re: Module/lib for controlling a terminal program using redrawing?

2015-03-14 Thread Jason Heeris
Yes, Paul Rubin had it right: I hadn't thought of the term "screen scraper," but that might help my searching. On 15 March 2015 at 05:50, Terry Reedy wrote: > > Perhaps you can use the guts of a terminal emulation program, removing the part that displays the interpreted stream (a 24 x 80 array) o

Re: generator/coroutine terminology

2015-03-14 Thread Chris Angelico
On Sun, Mar 15, 2015 at 9:15 AM, Marko Rauhamaa wrote: > Oscar Benjamin : > >> A generator is a special type of iterator that results from generator >> functions and generator expressions. > > Is it necessary/useful for a Python application programmer to be > conscious of the different types of it

Re: Odd ValueError using float

2015-03-14 Thread Chris Angelico
On Sun, Mar 15, 2015 at 9:09 AM, Cameron Simpson wrote: > On 14Mar2015 08:28, Emile van Sebille wrote: >> >> It ran almost to completion before generating the error again -- >> >> (Pdb) decval >> '4' >> (Pdb) type(decval) >> >> (Pdb) len(decval) >> 1 >> (Pdb) int(decval) >> *** ValueError: inval

Re: generator/coroutine terminology

2015-03-14 Thread Marko Rauhamaa
Oscar Benjamin : > A generator is a special type of iterator that results from generator > functions and generator expressions. Is it necessary/useful for a Python application programmer to be conscious of the different types of iterator? What mistaken usage could arise if the application just tr

Re: Odd ValueError using float

2015-03-14 Thread Cameron Simpson
On 14Mar2015 08:28, Emile van Sebille wrote: It ran almost to completion before generating the error again -- (Pdb) decval '4' (Pdb) type(decval) (Pdb) len(decval) 1 (Pdb) int(decval) *** ValueError: invalid literal for int() with base 10: '41.703' So there's still something amiss

Re: generator/coroutine terminology

2015-03-14 Thread Oscar Benjamin
On 12 March 2015 at 16:52, Rustom Mody wrote: > > On Thursday, March 12, 2015 at 9:58:07 PM UTC+5:30, Steven D'Aprano wrote: >> Rustom Mody wrote: >> >> > >> > Say I have a simple yielding function: >> > >> > def foo(x): >> >yield x+1 >> >yield x+2 >> > >> > And I have >> > >> > g = foo(2)

Re: Pexpect idea - but can I handle curses?

2015-03-14 Thread Cameron Simpson
On 13Mar2015 10:17, Skip Montanaro wrote: I have this tweak I'd like to make to the top command (Linux only is fine). [...] However... I have a feeling I might be fairly seriously challenged trying to work with top's raw output, as it probably does something more sophisticated than clear the scr

Re: Micropython?

2015-03-14 Thread jkn
On Saturday, 14 March 2015 06:43:18 UTC, Paul Rubin wrote: > http://www.micropython.org/ > > Has anyone used this? Know anything about it? I don't remember seeing > any mention of it here. I remember there was a stripped down Python > some years back that didn't work very well, but I think thi

Re: generator/coroutine terminology

2015-03-14 Thread Mark Lawrence
On 14/03/2015 20:14, Ian Kelly wrote: Now which should be considered definitive, the language reference or the PEP? This question is not rhetorical; I don't know the answer. Regardless of the answer though, the PEP at least illuminates the design intent of the terminology. The language refere

Re: generator/coroutine terminology

2015-03-14 Thread Ian Kelly
On Sat, Mar 14, 2015 at 1:54 AM, Marko Rauhamaa wrote: > Steven D'Aprano : > >> Marko Rauhamaa wrote: >> >>> Your 'factory' is a: >>> >>> generator >>> A function which returns an iterator. >>> https://docs.python.org/3/glossary.html> >> >> That glossary entry is misleading, or at

Re: Odd ValueError using float

2015-03-14 Thread emile
On 03/14/2015 11:24 AM, Peter Otten wrote: emile wrote: On 03/14/2015 09:08 AM, Peter Otten wrote: Why are you checking int(decval) because it sure smells like int should work: (Pdb) "3" That's a normal string comparison when decval is a string. This and the ValueError is expected Pyth

Re: Pexpect idea - but can I handle curses?

2015-03-14 Thread Thomas 'PointedEars' Lahn
Skip Montanaro wrote: > Let's just let this thread die, shall we? So far, nobody seems interested > in attempting to answer my original question. That might have to do with , specifically

Re: The idle gui

2015-03-14 Thread Dave Angel
On 03/14/2015 05:57 AM, Chris Angelico wrote: On Sat, Mar 14, 2015 at 12:35 PM, Dave Angel wrote: Not if you don't take it to him. If you just call him on the phone, and say "Jimmy doesn't work" he doesn't even know what make and model the vehicle is. Or whether it's even a car. Maybe "it" i

Re: Module/lib for controlling a terminal program using redrawing?

2015-03-14 Thread Terry Reedy
On 3/14/2015 6:50 AM, Jason Heeris wrote: I am trying to automate the use of some old, in-house terminal-based programs that use screen redrawing for their interface. This includes single line redrawing (eg. using '\r' and overwriting), complete screen clearing, and fine-grained cursor movement a

Re: The idle gui

2015-03-14 Thread Terry Reedy
On 3/13/2015 4:58 PM, lmzent...@gmail.com wrote: My python program was running for over six weeks. This is not clear. Do you mean that you wrote a program in python and that it ran continously, day and night, for 6 weeks? Or that you successfully used python on and off for 6 weeks? In eith

Re: téléchaegement

2015-03-14 Thread Kev Dwyer
peronin jean jacques wrote: > Bonjour > > Je rencontre des problèmes d’ouverture de la console python . J’ai donc > tout désinstallé. Je vous demande donc qu’elle version je dois installer à > partir > de votre site . J’utilise Windows 8-1 sur PC portable. > > Merci . Cordialement. Essayez pyt

Re: Odd ValueError using float

2015-03-14 Thread Peter Otten
emile wrote: > On 03/14/2015 09:08 AM, Peter Otten wrote: >> emile wrote: >> >>> On 03/13/2015 08:09 PM, Chris Angelico wrote: On Sat, Mar 14, 2015 at 1:33 PM, Paul Rubin wrote: > emile writes: >> *** NameError: name 'val' is not defined >> (Pdb) l >> 139 try: >

téléchaegement

2015-03-14 Thread peronin jean jacques
Bonjour Je rencontre des problèmes d’ouverture de la console python . J’ai donc tout désinstallé. Je vous demande donc qu’elle version je dois installer à partir de votre site . J’utilise Windows 8-1 sur PC portable. Merci . Cordialement. -- https://mail.python.org/mailman/listinfo/python-list

Re: Module/lib for controlling a terminal program using redrawing?

2015-03-14 Thread Paul Rubin
Dave Angel writes: >> Is there a module/library that can help me with this? > https://docs.python.org/3/howto/curses.html That's the opposite of what the OP wanted. Curses generates the escape codes and so on to draw your desired stuff on the terminal. The OP wants a screen scraper, something t

Re: generator/coroutine terminology

2015-03-14 Thread Rustom Mody
On Saturday, March 14, 2015 at 10:22:51 PM UTC+5:30, Chris Angelico wrote: > On Sun, Mar 15, 2015 at 3:33 AM, Rustom Mody wrote: > > As best as I can see python makes no distinction between such a foo and > > the more usual function/methods that have no returns. > > You can I can talk about these a

Re: Odd ValueError using float

2015-03-14 Thread emile
On 03/14/2015 08:52 AM, Chris Angelico wrote: On Sun, Mar 15, 2015 at 2:28 AM, emile wrote: It ran almost to completion before generating the error again -- (Pdb) decval '4' (Pdb) type(decval) (Pdb) len(decval) 1 (Pdb) int(decval) *** ValueError: invalid literal for int() with base 10: '41.70

Re: generator/coroutine terminology

2015-03-14 Thread Dave Angel
On 03/14/2015 12:51 PM, Chris Angelico wrote: On Sun, Mar 15, 2015 at 3:33 AM, Rustom Mody wrote: As best as I can see python makes no distinction between such a foo and the more usual function/methods that have no returns. You can I can talk about these and distinguish them Python has no clue

Re: Odd ValueError using float

2015-03-14 Thread emile
On 03/14/2015 09:08 AM, Peter Otten wrote: emile wrote: On 03/13/2015 08:09 PM, Chris Angelico wrote: On Sat, Mar 14, 2015 at 1:33 PM, Paul Rubin wrote: emile writes: *** NameError: name 'val' is not defined (Pdb) l 139 try: 140 val = round(float(decval),1) 141

Re: generator/coroutine terminology

2015-03-14 Thread Mark Lawrence
On 14/03/2015 16:33, Rustom Mody wrote: On Saturday, March 14, 2015 at 9:45:10 PM UTC+5:30, Chris Angelico wrote: On Sun, Mar 15, 2015 at 2:59 AM, Rustom Mody wrote: Causing all sorts of unnecessary confusions: An int-function returns int and a char*-functions returns char*. Does a void-functio

Re: generator/coroutine terminology

2015-03-14 Thread Chris Angelico
On Sun, Mar 15, 2015 at 3:33 AM, Rustom Mody wrote: > As best as I can see python makes no distinction between such a foo and > the more usual function/methods that have no returns. > You can I can talk about these and distinguish them > Python has no clue about it. But what support is actually n

Re: generator/coroutine terminology

2015-03-14 Thread Rustom Mody
On Saturday, March 14, 2015 at 9:45:10 PM UTC+5:30, Chris Angelico wrote: > On Sun, Mar 15, 2015 at 2:59 AM, Rustom Mody wrote: > > Causing all sorts of unnecessary confusions: > > An int-function returns int and a char*-functions returns char*. > > Does a void-function return void?? > > No a void

Re: generator/coroutine terminology

2015-03-14 Thread Chris Angelico
On Sun, Mar 15, 2015 at 2:59 AM, Rustom Mody wrote: > Causing all sorts of unnecessary confusions: > An int-function returns int and a char*-functions returns char*. > Does a void-function return void?? > No a void function doesn't return anything! > Ah So a void function does a longjmp? > > All o

Re: Odd ValueError using float

2015-03-14 Thread Peter Otten
emile wrote: > On 03/13/2015 08:09 PM, Chris Angelico wrote: >> On Sat, Mar 14, 2015 at 1:33 PM, Paul Rubin >> wrote: >>> emile writes: *** NameError: name 'val' is not defined (Pdb) l 139 try: 140 val = round(float(decval),1) 141 except:

Re: generator/coroutine terminology

2015-03-14 Thread Rustom Mody
On Saturday, March 14, 2015 at 8:59:22 PM UTC+5:30, Rustom Mody wrote: > On Saturday, March 14, 2015 at 11:34:27 AM UTC+5:30, Steven D'Aprano wrote: > > > > A generator (function) may be a function which returns an iterator,... > > I find "generator-function" misleading in the same way that "pine

Re: generator/coroutine terminology

2015-03-14 Thread Chris Angelico
On Sun, Mar 15, 2015 at 2:29 AM, Rustom Mody wrote: > However a "generator function" is a weird sort of function (at best). > Not regarding it as a function is IMO more reasonable. But it *is* a function. You call it, possibly with positional and/or keyword arguments, and you get back a returned

Re: Odd ValueError using float

2015-03-14 Thread Chris Angelico
On Sun, Mar 15, 2015 at 2:28 AM, emile wrote: > It ran almost to completion before generating the error again -- > > (Pdb) decval > '4' > (Pdb) type(decval) > > (Pdb) len(decval) > 1 > (Pdb) int(decval) > *** ValueError: invalid literal for int() with base 10: '41.703' > > So there's

Re: generator/coroutine terminology

2015-03-14 Thread Rustom Mody
On Saturday, March 14, 2015 at 11:34:27 AM UTC+5:30, Steven D'Aprano wrote: > > A generator (function) may be a function which returns an iterator,... I find "generator-function" misleading in the same way that "pineapple" misleadingly suggests "apple that grows on pines" A builtin function is

Re: Odd ValueError using float

2015-03-14 Thread emile
On 03/13/2015 08:09 PM, Chris Angelico wrote: On Sat, Mar 14, 2015 at 1:33 PM, Paul Rubin wrote: emile writes: *** NameError: name 'val' is not defined (Pdb) l 139 try: 140 val = round(float(decval),1) 141 except: 142 import pdb; pdb.set_trace() If 'f

Re: The idle gui

2015-03-14 Thread Rustom Mody
On Saturday, March 14, 2015 at 3:28:11 PM UTC+5:30, Chris Angelico wrote: > On Sat, Mar 14, 2015 at 12:35 PM, Dave Angel wrote: > > Not if you don't take it to him. If you just call him on the phone, and say > > "Jimmy doesn't work" he doesn't even know what make and model the vehicle > > is. Or

Re: Module/lib for controlling a terminal program using redrawing?

2015-03-14 Thread Dave Angel
On 03/14/2015 06:50 AM, Jason Heeris wrote: I am trying to automate the use of some old, in-house terminal-based programs that use screen redrawing for their interface. This includes single line redrawing (eg. using '\r' and overwriting), complete screen clearing, and fine-grained cursor movement

Module/lib for controlling a terminal program using redrawing?

2015-03-14 Thread Jason Heeris
I am trying to automate the use of some old, in-house terminal-based programs that use screen redrawing for their interface. This includes single line redrawing (eg. using '\r' and overwriting), complete screen clearing, and fine-grained cursor movement and overwriting (probably not all in the same

Re: The idle gui

2015-03-14 Thread Chris Angelico
On Sat, Mar 14, 2015 at 12:35 PM, Dave Angel wrote: > Not if you don't take it to him. If you just call him on the phone, and say > "Jimmy doesn't work" he doesn't even know what make and model the vehicle > is. Or whether it's even a car. Maybe "it" is a son who refuses to get a > job. In the

Re: The idle gui

2015-03-14 Thread Dave Angel
On 03/13/2015 09:24 PM, Steven D'Aprano wrote: sohcahto...@gmail.com wrote: We need more information than just "It doesn't work". You wouldn't go to a car mechanic and say "It makes a funny noise", would you? No. Actually, most likely yes.It's remarkably hard to describe noises, and often

Re: Python 2 to 3 conversion - embrace the pain

2015-03-14 Thread Mark Lawrence
On 13/03/2015 21:08, John Nagle wrote: I'm approaching the end of converting a large system from Python 2 to Python 3. Here's why you don't want to do this. One reason why you should https://speakerdeck.com/pyconslides/python-3-dot-3-trust-me-its-better-than-python-2-dot-7-by-dr-brett-can

Re: generator/coroutine terminology

2015-03-14 Thread Marko Rauhamaa
Mark Lawrence : > On 14/03/2015 07:54, Marko Rauhamaa wrote: >> I am an actual Python programmer (I develop Python programs) and my >> definitive source for Python is the documentation. If there is an >> error in the documentation, I would very much like it to be >> corrected. > > Five minutes wor

Re: Python 2 to 3 conversion - embrace the pain

2015-03-14 Thread Marko Rauhamaa
John Nagle : > I'm approaching the end of converting a large system from Python 2 > to Python 3. Here's why you don't want to do this. A nice report, thanks. Shows that the slowness of Python 3 adoption is not only social inertia. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: generator/coroutine terminology

2015-03-14 Thread Mark Lawrence
On 14/03/2015 07:54, Marko Rauhamaa wrote: Steven D'Aprano : Marko Rauhamaa wrote: Your 'factory' is a: generator A function which returns an iterator. https://docs.python.org/3/glossary.html> That glossary entry is misleading, or at least incomplete, and it fails to mat

Re: generator/coroutine terminology

2015-03-14 Thread Marko Rauhamaa
Steven D'Aprano : > Marko Rauhamaa wrote: > >> Your 'factory' is a: >> >> generator >> A function which returns an iterator. >> https://docs.python.org/3/glossary.html> > > That glossary entry is misleading, or at least incomplete, and it > fails to match the way "generator" is us