Re: GOTCHA with list comprehension

2015-08-05 Thread Pavel S
It seems this is allowed by the grammar: list_display::= "[" [expression_list | list_comprehension] "]" list_comprehension ::= expression list_for list_for::= "for" target_list "in" old_expression_list [list_iter] old_expression_list ::= old_expression [("," old_expression

Re: GOTCHA with list comprehension

2015-08-05 Thread Chris Angelico
On Wed, Aug 5, 2015 at 4:48 PM, Pavel S wrote: > Hi, > > I recently found interesting GOTCHA while doing list comprehension in python > 2.6: > values = ( True, False, 1, 2, 3, None ) [ value for value in values if value if not None ] > [True, 1, 2, 3] > > I was wondering why this list c

Re: GOTCHA with list comprehension

2015-08-05 Thread Peter Otten
Pavel S wrote: > Hi, > > I recently found interesting GOTCHA while doing list comprehension in > python 2.6: > values = ( True, False, 1, 2, 3, None ) [ value for value in values if value if not None ] > [True, 1, 2, 3] > > I was wondering why this list comprehension returns incorrect

Re: GOTCHA with list comprehension

2015-08-05 Thread Pavel S
$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.5 (Santiago) $ python --version Python 2.6.6 > Incidentally, why Python 2.6? > > ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: GOTCHA with list comprehension

2015-08-05 Thread Chris Angelico
On Wed, Aug 5, 2015 at 5:03 PM, Pavel S wrote: > It seems this is allowed by the grammar: > > list_display::= "[" [expression_list | list_comprehension] "]" > list_comprehension ::= expression list_for > list_for::= "for" target_list "in" old_expression_list > [list_iter]

Re: GOTCHA with list comprehension

2015-08-05 Thread Chris Angelico
On Wed, Aug 5, 2015 at 5:10 PM, Pavel S wrote: > $ cat /etc/redhat-release > Red Hat Enterprise Linux Server release 6.5 (Santiago) > $ python --version > Python 2.6.6 > >> Incidentally, why Python 2.6? >> I guess that would be why :) That's probably actually a patched 2.6.6 - from what I unders

Re: GOTCHA with list comprehension

2015-08-05 Thread Pavel S
Hi Chris, yeah, I have to stick on the software which my employer provides to me (we're enterprise company). I'm not root on that system. I'm happy with 2.6 now, two years ago we were on older RHEL with python 2.4 and it was a real pain :) > > $ cat /etc/redhat-release > > Red Hat Enterprise Li

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Steven D'Aprano
On Wednesday 05 August 2015 05:59, Ben Finney wrote: > marco.naw...@colosso.nl writes: > >> Why not use Python files itself as configuration files? > > Because configuration data will be user-editable. (If it's not > user-editable, that is itself a poor design choice.) > > If you allow executab

Re: GOTCHA with list comprehension

2015-08-05 Thread Marko Rauhamaa
Chris Angelico : > You can chain 'for' and 'if' clauses as much as you like, and they > behave exactly the way you'd expect. How do you know what I'd expect? I wouldn't know what to expect myself. Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: GOTCHA with list comprehension

2015-08-05 Thread Chris Angelico
On Wed, Aug 5, 2015 at 7:01 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> You can chain 'for' and 'if' clauses as much as you like, and they >> behave exactly the way you'd expect. > > How do you know what I'd expect? > > I wouldn't know what to expect myself. A list comprehension can always

Problem in IDLE setup

2015-08-05 Thread Ahsan Chauhan
Respected Sir/Madam, I would like to bring it to your notice that IDLE's executable file is not working properly in Python3.5.0. So please look into this. Regards Ahsan Chauhan -- https://mail.python.org/mailman/listinfo/python-list

consumer/producer with asyncio

2015-08-05 Thread David Rios
Hello everyone, I'm trying to implement a producer/consumer using asyncio, but I have some doubts about the best way to do it. I already have a working implementation using threads, and want to port it to asyncio for fun, to learn and also to avoid some problems that I have using threads, namely t

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Chris Angelico
On Wed, Aug 5, 2015 at 6:32 PM, Steven D'Aprano wrote: > My own personal feeling is that using code as config is a little > disquieting. It's a bit of a code smell. Do you really need that much power > just to allow people to set some configuration settings? Using a Turing > Complete programming l

Re: Uninstall

2015-08-05 Thread Mark Lawrence
On 05/08/2015 02:51, Mario Figueiredo wrote: [chopped to pieces] On Tue, Aug 4, 2015 at 9:01 PM, Mark Lawrence mailto:breamore...@yahoo.co.uk>> wrote: On 04/08/2015 19:31, sohcahto...@gmail.com wrote: On Tuesday, August 4, 2015 at 7:29:29 AM UTC-7,

Re: Linux script to get most expensive processes

2015-08-05 Thread Thomas 'PointedEars' Lahn
Cecil Westerhof wrote: > Under Linux I like to get the most expensive processes. The two most > useful commands are: > ps -eo pid,user,pcpu,args --sort=-pcpu > and: > ps -eo pid,user,pcpu,args --sort=-vsize > > In my case I am only interested in the seven most expensive processes. > For t

Re: Uninstall

2015-08-05 Thread Thomas 'PointedEars' Lahn
Mark Lawrence wrote: > On 04/08/2015 19:31, sohcahto...@gmail.com wrote: >> I really fucking hate how pedantic some of the people on this mailing >> list are. >> >> milos wasn't wrong. You just chose to take his message too literally. I >> thought it was pretty clear that when milos said "can't"

Re: GOTCHA with list comprehension

2015-08-05 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Aug 5, 2015 at 7:01 PM, Marko Rauhamaa wrote: >> Chris Angelico : >> >>> You can chain 'for' and 'if' clauses as much as you like, and they >>> behave exactly the way you'd expect. >> >> How do you know what I'd expect? >> >> I wouldn't know what to expect myself. > [.

Re: Problem in IDLE setup

2015-08-05 Thread Mark Lawrence
On 04/08/2015 12:31, Ahsan Chauhan wrote: Respected Sir/Madam, I would like to bring it to your notice that IDLE's executable file is not working properly in Python3.5.0. So please look into this. Regards Ahsan Chauhan Please state exactly what you're tried to do, what you expected to happen,

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Tim Chase
On 2015-08-02 12:11, Cecil Westerhof wrote: > There are a lot of ways to store configuration information: > - conf file > - xml file > - database > - json file > - and possible a lot of other ways > > I want to write a Python program to display cleaned log files. I do > not think I need a lot of c

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Rustom Mody
On Wednesday, August 5, 2015 at 6:58:01 PM UTC+5:30, Tim Chase wrote: > On 2015-08-02 12:11, Cecil Westerhof wrote: > > There are a lot of ways to store configuration information: > > - conf file > > - xml file > > - database > > - json file > > - and possible a lot of other ways > > > > I want to

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Rustom Mody
On Sunday, August 2, 2015 at 3:44:51 PM UTC+5:30, Cecil Westerhof wrote: > There are a lot of ways to store configuration information: > - conf file > - xml file > - database > - json file > - and possible a lot of other ways One that I dont think has been mentioned: ast.literal_eval -- https://m

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Grant Edwards
On 2015-08-05, Michael Torrie wrote: > On 08/04/2015 01:59 PM, Ben Finney wrote: >> marco.naw...@colosso.nl writes: >> >>> Why not use Python files itself as configuration files? >> >> Because configuration data will be user-editable. (If it's not >> user-editable, that is itself a poor design c

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Steven D'Aprano
On Wed, 5 Aug 2015 11:46 pm, Rustom Mody wrote: > On Sunday, August 2, 2015 at 3:44:51 PM UTC+5:30, Cecil Westerhof wrote: >> There are a lot of ways to store configuration information: >> - conf file >> - xml file >> - database >> - json file >> - and possible a lot of other ways > > One that I

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Rustom Mody
On Wednesday, August 5, 2015 at 7:38:46 PM UTC+5:30, Steven D'Aprano wrote: > On Wed, 5 Aug 2015 11:46 pm, Rustom Mody wrote: > > > On Sunday, August 2, 2015 at 3:44:51 PM UTC+5:30, Cecil Westerhof wrote: > >> There are a lot of ways to store configuration information: > >> - conf file > >> - xml

Is this an example of tail recursion?

2015-08-05 Thread jennyfurtado2
I am trying to learn differences between tail recursion and non tail recursion. Is the following recursive code tail recursive? If it is not how to convert it to tail recursion? If it is how to convert it to non tail recursion? class CastleDefenseI: INFINITY = 9 def __init__(self):

Re: Is this an example of tail recursion?

2015-08-05 Thread Rustom Mody
On Wednesday, August 5, 2015 at 8:43:31 PM UTC+5:30, jennyf...@gmail.com wrote: > I am trying to learn differences between tail recursion and non tail > recursion. > > Is the following recursive code tail recursive? > If it is not how to convert it to tail recursion? > If it is how to convert it

Re: Is this an example of tail recursion?

2015-08-05 Thread jennyfurtado2
On Wednesday, August 5, 2015 at 9:21:33 AM UTC-6, Rustom Mody wrote: > On Wednesday, August 5, 2015 at 8:43:31 PM UTC+5:30, jennyf...@gmail.com > wrote: > > I am trying to learn differences between tail recursion and non tail > > recursion. > > > > Is the following recursive code tail recursive?

Re: Is this an example of tail recursion?

2015-08-05 Thread Chris Angelico
On Thu, Aug 6, 2015 at 1:13 AM, wrote: > I am trying to learn differences between tail recursion and non tail > recursion. Tail recursion is where you do exactly this: return some_function(...) Absolutely nothing is allowed to happen around or after that function, and that also means you

Re: Is this an example of tail recursion?

2015-08-05 Thread Chris Angelico
On Thu, Aug 6, 2015 at 1:37 AM, wrote: > Sorry I am missing a subtle point: Isnt 1+ self.soldiersVsDefenders... ending > up calling 1.__add__(self.soldiersVsDefenders...)? I think his point is that it is, in effect, doing that; but honestly, calling this a tail call into the int+int addition fu

Re: Is this an example of tail recursion?

2015-08-05 Thread jenny
On Wednesday, August 5, 2015 at 9:52:14 AM UTC-6, Chris Angelico wrote: > On Thu, Aug 6, 2015 at 1:13 AM, wrote: > > I am trying to learn differences between tail recursion and non tail > > recursion. > > Tail recursion is where you do exactly this: > > return some_function(...) > > Absol

Re: Is this an example of tail recursion?

2015-08-05 Thread Rustom Mody
On Wednesday, August 5, 2015 at 9:07:52 PM UTC+5:30, jennyf...@gmail.com wrote: > On Wednesday, August 5, 2015 at 9:21:33 AM UTC-6, Rustom Mody wrote: > > On Wednesday, August 5, 2015 at 8:43:31 PM UTC+5:30, jennyf...@gmail.com > > wrote: > > > I am trying to learn differences between tail recursi

Re: Is this an example of tail recursion?

2015-08-05 Thread jennyfurtado2
On Wednesday, August 5, 2015 at 10:10:22 AM UTC-6, Rustom Mody wrote: > On Wednesday, August 5, 2015 at 9:07:52 PM UTC+5:30, jennyf...@gmail.com > wrote: > > On Wednesday, August 5, 2015 at 9:21:33 AM UTC-6, Rustom Mody wrote: > > > On Wednesday, August 5, 2015 at 8:43:31 PM UTC+5:30, jennyf...@gm

Re: Is this an example of tail recursion?

2015-08-05 Thread Chris Angelico
On Thu, Aug 6, 2015 at 2:10 AM, Rustom Mody wrote: > 1 + x > does not *call* 1 .__add__(x) > It *is* that > [Barring corner cases of radd etc] > IOW I am desugaring the syntax into explicit method-calls so you can see > all the calls explicitly > Then it becomes evident -- visibly and in fact --th

How to trace the recursive path?

2015-08-05 Thread jennyfurtado2
Consider this code (shown in my previous post) class CastleDefenseI: INFINITY = 9 def __init__(self): self.dpw = 0 def soldiersVsDefenders(self,soldiers,defenders): # soldiers win if defenders <=0: return 0 # castle/defenders win

Re: Is this an example of tail recursion?

2015-08-05 Thread jennyfurtado2
On Wednesday, August 5, 2015 at 10:29:21 AM UTC-6, Chris Angelico wrote: > On Thu, Aug 6, 2015 at 2:10 AM, Rustom Mody wrote: > > 1 + x > > does not *call* 1 .__add__(x) > > It *is* that > > [Barring corner cases of radd etc] > > IOW I am desugaring the syntax into explicit method-calls so you can

Re: Is this an example of tail recursion?

2015-08-05 Thread Rustom Mody
On Wednesday, August 5, 2015 at 10:11:30 PM UTC+5:30, wrote: > On Wednesday, August 5, 2015 at 10:29:21 AM UTC-6, Chris Angelico wrote: > > On Thu, Aug 6, 2015 at 2:10 AM, Rustom Mody wrote: > > > 1 + x > > > does not *call* 1 .__add__(x) > > > It *is* that > > > [Barring corner cases of radd etc

Re: Is this an example of tail recursion?

2015-08-05 Thread Chris Angelico
On Thu, Aug 6, 2015 at 2:51 AM, Rustom Mody wrote: > And I continue to have no idea what Chris is talking about. > Here is C printf from ctypes import * cdll.LoadLibrary("libc.so.6") libc = CDLL("libc.so.6") libc.printf(b"%s", b"Hello") > 5 > Hello>>> > > As far as I can see pr

Installation Successful, but pythonw and idle doesn't function

2015-08-05 Thread Rick Smith
I was able to install various versions of Python (3.5.0b4 32bit being the most recent) multiple times (uninstalling in between) and they worked ("python --version" at the command line worked). However pythonw.exe did not and does not work. I was simply returned to the command prompt, without

QUEST: does HACKING make FOR loop quicker.

2015-08-05 Thread John Doe
Presumption 1. Lists are mutable sequences. 2. There is a subtlety when the sequence is being modified by the FOR loop (this can only occur for mutable sequences, i.e. lists) Preamble =

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Tim Chase
On 2015-08-05 06:37, Rustom Mody wrote: > > config = {} > > with open('config.ini') as f: > > for row in f: > > row = row.strip() > > if not row or row.startswith(('#', ';')): > > continue > > k, _, v = row.partition('=') > > config[k.strip().upper()] = v.lst

Looking for OpenStack Developer

2015-08-05 Thread Pranesh Srinivasan
Hi, Hope you are doing well !!! My name is Siva and I'm a recruiter at TheAppliedthought , a global staffing and IT consulting company. Please find the below job description which may suits any of your consultants who are available in market or who are looking for change, please send me latest u

Re: QUEST: does HACKING make FOR loop quicker.

2015-08-05 Thread Mark Lawrence
On 05/08/2015 21:00, John Doe wrote: Three strikes and you're out, good bye troll. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Marko Rauhamaa
Tim Chase : > There's a certain simplicity to simply having key/value pairs > separated by an "=" and then letting the application do whatever it > needs/wants with those key/value strings. That trap has lured in a lot of wildlife. What to do with lists? Is whitespace significant? Case in poin

Re: Installation Successful, but pythonw and idle doesn't function

2015-08-05 Thread Thomas 'PointedEars' Lahn
Rick Smith wrote: > However pythonw.exe did not and does not work. I was simply returned to > the command prompt, without ANY interaction or error. > >prompt>pythonw > >prompt> Works as designed. You are proceeding from a false assumption. pythonw.exe is not meant to provide an inter

Re: Installation Successful, but pythonw and idle doesn't function

2015-08-05 Thread Thomas 'PointedEars' Lahn
Thomas 'PointedEars' Lahn wrote: > > > (First hit for “pythonw” on Google with my account. I have never visited > that site before or can remember to have searched for “pythonw”.) JFTR: s/site/question/. I am rather active

Re: Uninstall

2015-08-05 Thread Emile van Sebille
On 8/4/2015 6:51 PM, Mario Figueiredo wrote: On Tue, Aug 4, 2015 at 9:01 PM, Mark Lawrence The simple solution is not to subscribe. Yes -- it's about gotten to that point. Or even better, tell you to fuck off. Now that's a first to my recollection. I must say I prefer the pedantry t

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Tim Chase
On 2015-08-06 00:47, Marko Rauhamaa wrote: > > There's a certain simplicity to simply having key/value pairs > > separated by an "=" and then letting the application do whatever > > it needs/wants with those key/value strings. > > That trap has lured in a lot of wildlife. > > What to do with li

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Chris Angelico
On Thu, Aug 6, 2015 at 9:43 AM, Tim Chase wrote: > Significant whitespace? Not usually simple (just stuck touching a > project where someone committed with tons of trailing whitespaces. > grumble), so strip 'em off as if they're an error condition. I've > never had a config-file where I wanted l

Re: Problem in IDLE setup

2015-08-05 Thread Terry Reedy
On 8/5/2015 9:08 AM, Mark Lawrence wrote: On 04/08/2015 12:31, Ahsan Chauhan wrote: Respected Sir/Madam, I would like to bring it to your notice that IDLE's executable file is not working properly in Python3.5.0. 3.5.0 has not been released. 3.5.0b4 is the most recent. Make sure that you are

Re: QUEST: does HACKING make FOR loop quicker.

2015-08-05 Thread Michael Torrie
On 08/05/2015 03:39 PM, Mark Lawrence wrote: > On 05/08/2015 21:00, John Doe wrote: > > Three strikes and you're out, good bye troll. While the original post is incomprehensible to me, I see only one post. What were the other two strikes? -- https://mail.python.org/mailman/listinfo/python-list

Re: QUEST: does HACKING make FOR loop quicker.

2015-08-05 Thread Joel Goldstick
On Wed, Aug 5, 2015 at 8:29 PM, Michael Torrie wrote: > On 08/05/2015 03:39 PM, Mark Lawrence wrote: >> On 05/08/2015 21:00, John Doe wrote: >> >> Three strikes and you're out, good bye troll. > > While the original post is incomprehensible to me, I see only one post. > What were the other two st

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Rustom Mody
On Thursday, August 6, 2015 at 2:31:52 AM UTC+5:30, Tim Chase wrote: > On 2015-08-05 06:37, Rustom Mody wrote: > > > config = {} > > > with open('config.ini') as f: > > > for row in f: > > > row = row.strip() > > > if not row or row.startswith(('#', ';')): > > > continue

Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Terry Reedy
There have been discussions, such as today on Idle-sig , about who uses Idle and who we should design it for. If you use Idle in any way, or know of or teach classes using Idle, please answer as many of the questions below as you are willing, and as are appropriate Private answers are welcome

Re: Most Pythonic way to store (small) configuration

2015-08-05 Thread Rustom Mody
On Thursday, August 6, 2015 at 6:32:03 AM UTC+5:30, Rustom Mody wrote: > By contrast here is a more friendly error message (had put a comma where a > colon > required) > Traceback (most recent call last): > File "", line 1, in > File "/usr/lib/python3.4/ast.py", line 46, in literal_eval >

Re: Installation Successful, but pythonw and idle doesn't function

2015-08-05 Thread Terry Reedy
On 8/5/2015 12:12 PM, Rick Smith wrote: I was able to install various versions of Python (3.5.0b4 32bit being the most recent) multiple times (uninstalling in between) and they worked ("python --version" at the command line worked). However pythonw.exe did not and does not work. I was simply re

Re: How to trace the recursive path?

2015-08-05 Thread Terry Reedy
trace --trackcalls Display the calling relationships exposed by running the program. will give you part of what you want, but only counts. I would just add print('xyx calledl') at the top of each function you want traced. -- Terry Jan Reedy -- https://mail.python.org/mailman/listinfo/python-

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Ben Finney
Terry Reedy writes: > Private answers are welcome. They will be deleted as soon as they are > tallied (without names). Are you also expecting questionnaire answers in this forum? I suspect it will become a free-ranging discussion; hopefully you're prepared to pick through and collect the respons

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Rustom Mody
On Thursday, August 6, 2015 at 6:36:56 AM UTC+5:30, Terry Reedy wrote: > There have been discussions, such as today on Idle-sig , about who uses > Idle and who we should design it for. If you use Idle in any way, or > know of or teach classes using Idle, please answer as many of the > questions

Re: Installation Successful, but pythonw and idle doesn't function

2015-08-05 Thread Terry Reedy
On 8/5/2015 6:09 PM, Thomas 'PointedEars' Lahn wrote: Rick Smith wrote: I also attempted to run "idle", with the following results: C: \Users\judy\AppData\Local\Programs\Python\Python35-32\Lib\idlelib>idle.py ** IDLE can't import Tkinter. Your Python may not be configured for Tk

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Paul Rubin
Terry Reedy writes: > There have been discussions, such as today on Idle-sig , about who > uses Idle and who we should design it for. I use it sometimes. I mostly use Emacs with Python-mode but find Idle is nice for quickly experimenting with something or probing an API. I know there are fanc

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Chris Angelico
On Thu, Aug 6, 2015 at 11:06 AM, Terry Reedy wrote: > There have been discussions, such as today on Idle-sig , about who uses Idle > and who we should design it for. If you use Idle in any way, or know of or > teach classes using Idle, please answer as many of the questions below as > you are wil

Re: Installation Successful, but pythonw and idle doesn't function

2015-08-05 Thread Zachary Ware
Hi Rick, On Wed, Aug 5, 2015 at 11:12 AM, Rick Smith wrote: > I was able to install various versions of Python (3.5.0b4 32bit being the > most recent) multiple times (uninstalling in between) and they worked > ("python --version" at the command line worked). > > However pythonw.exe did not and do

Re: Uninstall

2015-08-05 Thread Laura Creighton
In a message of Tue, 04 Aug 2015 11:37:47 +0900, Bill writes: >How do I uninstall Python from a Mac? > > >-- >https://mail.python.org/mailman/listinfo/python-list How did you get it in the first place? If you installed it yourself, then you have to retrace what steps you took to install it in or

Re: Linux script to get most expensive processes

2015-08-05 Thread Laura Creighton
If you are running this script with Python 2 write: if sys.platform.startswith('linux'): to handle the case where you get linux or linux2 (and a few other weird things some embedded systems give you ...) Right now I think every linux system returns linux for Python 3, so it is less of an issu

Re: QUEST: does HACKING make FOR loop quicker.

2015-08-05 Thread Mark Lawrence
On 06/08/2015 01:29, Michael Torrie wrote: On 08/05/2015 03:39 PM, Mark Lawrence wrote: On 05/08/2015 21:00, John Doe wrote: Three strikes and you're out, good bye troll. While the original post is incomprehensible to me, I see only one post. What were the other two strikes? Same questio

Re: GOTCHA with list comprehension

2015-08-05 Thread Laura Creighton
In a message of Wed, 05 Aug 2015 17:05:49 +1000, Chris Angelico writes: >Incidentally, why Python 2.6? Python 2.7 has been out for a pretty >long time now, and if you can't move to version 3.x, I would at least >recommend using 2.7. Since the release of 2.6.9 back before Frozen >came out, that bran

Re: GOTCHA with list comprehension

2015-08-05 Thread Chris Angelico
On Thu, Aug 6, 2015 at 2:39 PM, Laura Creighton wrote: > In a message of Wed, 05 Aug 2015 17:05:49 +1000, Chris Angelico writes: >>Incidentally, why Python 2.6? Python 2.7 has been out for a pretty >>long time now, and if you can't move to version 3.x, I would at least >>recommend using 2.7. Since

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Miki Tebeka
Greetings, > 0. Classes where Idle is used: > Where? At client site. Mostly big companies. > Level? >From beginner to advanced. > Idle users: > 1. Are you > grade school (1=12)? > undergraduate (Freshman-Senior)? > post-graduate (from whatever)? post-graduate > 2. Are you > beginner (1st class,

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Laura Creighton
In a message of Wed, 05 Aug 2015 21:06:31 -0400, Terry Reedy writes: >0. Classes where Idle is used: >Where -- my house or sometimes at the board game society >Level -- beginners and there are 8 children right now. >Idle users: > >1. Are you I am post graduate, but the kids are all grade school.

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Paul Rubin
Paul Rubin writes: > I use it sometimes. I mostly use Emacs with Python-mode but find Idle > is nice for quickly experimenting with something or probing an API. Added: I sometimes used Idle in places where Emacs isn't available, e.g. client machines running Windows. It's nice that Idle is there

how to simulate keydown and keyup events using win32api .

2015-08-05 Thread ppk . phanikumar
win32api.keybd_event(code,0,0,0) time.sleep(2) win32api.keybd_event(code,0,win32con.KEYEVENTF_KEYUP,0) the above code is simulating single click on button but not press Key Hold but i want to hold the until key up event is called eg: for key 'a' down it have to simulate key continous set until

Re: Who uses IDLE -- please answer if you ever do, know, or teach

2015-08-05 Thread Laura Creighton
Added: right now most children I know who want to program want to write games that run on their cell phones and tablets. So Idle integration with kivy would be very nice, if Idle developers are looking for new directions. Laura -- https://mail.python.org/mailman/listinfo/python-list

Re: QUEST: does HACKING make FOR loop quicker.

2015-08-05 Thread Steven D'Aprano
On Thursday 06 August 2015 10:29, Michael Torrie wrote: > On 08/05/2015 03:39 PM, Mark Lawrence wrote: >> On 05/08/2015 21:00, John Doe wrote: >> >> Three strikes and you're out, good bye troll. > > While the original post is incomprehensible to me, I see only one post. > What were the other tw