Re: Hello.

2016-01-19 Thread Felix Almeida
Check your PATH environment variable. On 16/01/16 04:41 PM, Hmood Js wrote: cmd won't recognize python at all I've checked several times , and I don't understand what's wrong Sent from Mail for Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Re: Is this an attribute?

2016-01-19 Thread Steven D'Aprano
On Wed, 20 Jan 2016 07:19 am, Robert wrote: > Hi, > > When I read a code snippet below, I find I don't know what > 'self.framelogprob' is on the child class. [...] > On Python web, it says that things after dot, such as a class name, are > attributes. From this definition, 'framelogprob' is an at

Re: Why generators take long time?

2016-01-19 Thread Steven D'Aprano
On Tue, 19 Jan 2016 09:24 pm, Oscar Benjamin wrote: > On 19 Jan 2016 10:16, "Steven D'Aprano" wrote: >> >> [steve@ando ~]$ python -m timeit -s "from collections import deque" >> -s "it = iter([i for i in xrange(1000)])" "deque(it, maxlen=0)" >> 100 loops, best of 3: 0.913 usec per loop >>

Re: "x == None" vs "x is None"

2016-01-19 Thread fernando junior
> I have seen at several places "x == None" and "x is None" within > if-statements. > What is the difference? > Which term should I prefer and why? > > > -- > Ullrich Horlacher Server und Virtualisierung > Rechenzentrum IZUS/TIK E-Mail: horlac...@tik.uni-stuttgart.de > Uni

Re: Is this an attribute?

2016-01-19 Thread Robert
On Tuesday, January 19, 2016 at 3:52:12 PM UTC-5, Peter Otten wrote: > Robert wrote: > > > Hi, > > > > When I read a code snippet below, I find I don't know what > > 'self.framelogprob' is on the child class. > > > > > > > > // parent class > > class _BaseHMM(BaseEstimator): > > def __

Re: Is this an attribute?

2016-01-19 Thread Robert
On Tuesday, January 19, 2016 at 3:52:12 PM UTC-5, Peter Otten wrote: > Robert wrote: > > > Hi, > > > > When I read a code snippet below, I find I don't know what > > 'self.framelogprob' is on the child class. > > > > > > > > // parent class > > class _BaseHMM(BaseEstimator): > > def __

Re: Is this an attribute?

2016-01-19 Thread Peter Otten
Robert wrote: > Hi, > > When I read a code snippet below, I find I don't know what > 'self.framelogprob' is on the child class. > > > > // parent class > class _BaseHMM(BaseEstimator): > def __init__(self, n_components=1, > startprob_prior=1.0, transmat_prior=1.0, >

Re: Why generators take long time?

2016-01-19 Thread Jason Swails
On Tue, Jan 19, 2016 at 3:19 PM, Jason Swails wrote: > > I use generator expressions when > > - I *might* want to > ​I forgot to finish my thought here. I use generator expressions when I don't want to worry about memory, there's a decent chance of short-circuiting​, or I just want to do some s

Is this an attribute?

2016-01-19 Thread Robert
Hi, When I read a code snippet below, I find I don't know what 'self.framelogprob' is on the child class. // parent class class _BaseHMM(BaseEstimator): def __init__(self, n_components=1, startprob_prior=1.0, transmat_prior=1.0, algorithm="viterbi", ran

Re: Why generators take long time?

2016-01-19 Thread Jason Swails
On Tue, Jan 19, 2016 at 2:27 AM, Arshpreet Singh wrote: > > I was playing with Generators and found that using Generators time is bit > more than list-comprehensions or I am doing it wrong? > > > Function with List comprehensions: > > def sum_text(number_range): > return sum([i*i for i in xra

Re: Why generators take long time?

2016-01-19 Thread Arshpreet Singh
On Tuesday, 19 January 2016 15:42:16 UTC+5:30, Steven D'Aprano wrote: > [steve@ando ~]$ python -m timeit -s "from collections import deque" > -s "it = iter([i for i in xrange(1000)])" "deque(it, maxlen=0)" > 100 loops, best of 3: 0.913 usec per loop > > > [steve@ando ~]$ python -m tim

Re: Error handling with @parallel decorator

2016-01-19 Thread Ankur Agrawal
Thanks a lot Steven for your reply. I got the issue, it was my own FabricException class, when I started using Exception then I could catch the exception successfully and then I got the type of exception as well by using your suggested type(err). Your code snippet did help me to find the issue soon

Re: Use of Python logo

2016-01-19 Thread Dominik Wronski
Hi, on Python Software Foundation website you can find trademark usage policy https://www.python.org/psf/trademarks/ It’s said there: "Use of unaltered PSF-provided logos on websites, brochures, and product packaging. The "intertwined snakes" graphic alon

RE: web scraping help / better way to do it ?

2016-01-19 Thread Matt
> -Original Message- > From: Python-list [mailto:python-list- > bounces+matt=centralkaos@python.org] On Behalf Of Peter Otten > Sent: Tuesday, 19 January 2016 9:30 PM > To: python-list@python.org > Subject: Re: web scraping help / better way to do it ? > > Matt wrote: > > > Beginner

Re: web scraping help / better way to do it ?

2016-01-19 Thread Peter Otten
Matt wrote: > Beginner python user (3.5) and trying to scrape this page and get the > ladder > - www.afl.com.au/ladder . Its dynamic content so I used lynx -dump to > get > a txt file and parsing that. > > Here is the code > > # import lynx -dump txt file > f = open('c:/temp/afl2.txt','r').r

Re: Why generators take long time?

2016-01-19 Thread Oscar Benjamin
On 19 Jan 2016 10:16, "Steven D'Aprano" wrote: > > [steve@ando ~]$ python -m timeit -s "from collections import deque" > -s "it = iter([i for i in xrange(1000)])" "deque(it, maxlen=0)" > 100 loops, best of 3: 0.913 usec per loop > > > [steve@ando ~]$ python -m timeit -s "from collections i

bgpic doesn't show background image for turtle

2016-01-19 Thread Jean Richelle
Hello, I'm trying to have a background image for the turtle graphics. bgpic("filename.gif") works correctly in terminal mode but I'm getting an error when it is in a python program : File "VisuProg3.0.564.py", line 2206, in afficheLabyrinthe bgpic("L1.gif") File "", line 8, in bgpic File

Re: Why generators take long time?

2016-01-19 Thread Steven D'Aprano
On Tue, 19 Jan 2016 06:27 pm, Arshpreet Singh wrote: > > I was playing with Generators and found that using Generators time is bit > more than list-comprehensions or I am doing it wrong? Generators may have slightly more overhead than iterating over a list. They save memory, not time. On my mac

Re: Use of Python logo

2016-01-19 Thread Jussi Piitulainen
Carolina Nunez writes: > We at Chetu as Python developers would like to include the Python logo > on our website, please advise if we can do so. See here: . That's the entry titled "Python Logo" in the Community tab at the top of the python.org front page,

web scraping help / better way to do it ?

2016-01-19 Thread Matt
Beginner python user (3.5) and trying to scrape this page and get the ladder - www.afl.com.au/ladder . Its dynamic content so I used lynx -dump to get a txt file and parsing that. Here is the code # import lynx -dump txt file f = open('c:/temp/afl2.txt','r').read() # Put import txt file int

Use of Python logo

2016-01-19 Thread Carolina Nunez
Hi, We at Chetu as Python developers would like to include the Python logo on our website, please advise if we can do so. Thanks & regards, Carolina Nunez Web & Trade Show Marketing Manager Phone: (954) 342-5676 Ext. 144 [UpdatedLogo] [Inc5000_medallion_Email Signature] [cid:image005.png@01

Fwd: Delivery Status Notification (Failure)

2016-01-19 Thread Erik Vandamme
Forwarded conversation Subject: Python Path Wondows 10 From: *Erik Vandamme* Date: Tue, Jan 19, 2016 at 7:01 PM To: python_l...@python.org I've installed python 3.5.1 form the org But pygi-iao-3.18 can not find a path to it?? I can not find it myself, maybe eleveate

Re: Why generators take long time?

2016-01-19 Thread Arshpreet Singh
On Tuesday, 19 January 2016 12:58:28 UTC+5:30, Arshpreet Singh wrote: > I was playing with Generators and found that using Generators time is bit > more than list-comprehensions or I am doing it wrong? > > > Function with List comprehensions: > > def sum_text(number_range): > return sum([i