Re: variable scope of class objects

2015-10-19 Thread Nagy László Zsolt
> These two statements make me think you come from C++ or something > similar. > > In Python you can declare variables at class level, but this > declaration must NOT be interpreted in the same manner of a similar > declaration in C++: they remain at the abstract level of a class, and > they have

Re: variable scope of class objects

2015-10-19 Thread Luca Menegotto
Il 19/10/2015 20:39, JonRob ha scritto: I (think) I understand that in the below case, the word self could be replaced with "BME280" to explicitly call out a variable. But even still I don't know how explicit call out effects the scope of a variable. These two statements make me think you com

Re: variable scope of class objects

2015-10-19 Thread Nagy László Zsolt
> My questions are: > What is the scope of class variables? In Python, you bind values (objects) to names. It is conceptually different from "setting the value of a variable". In Python, scope applies to names, not variables. When you say "class variable", what do you mean? This may help: A nam

Re: variable scope of class objects

2015-10-19 Thread Nagy László Zsolt
> > #!/usr/bin/python > # -- developed using Python 2.7.3 > > class BME280: Not strictly related to the question, but you probably want to use so called "new style classes" when developing a new program for Python version 2. In other words, use: class BME280(object): instead of class BME280:

Re: variable scope of class objects

2015-10-19 Thread Terry Reedy
On 10/19/2015 7:19 PM, sohcahto...@gmail.com wrote: Class variables are accessible without creating an instance of a class. Also, changing the value of a class variable affects ALL instances of that class. This is because the variable belongs to the class itself, not any of the instances of

Re: variable scope of class objects

2015-10-19 Thread sohcahtoa82
On Monday, October 19, 2015 at 11:39:59 AM UTC-7, JonRob wrote: > Hi, > > I've having trouble understanding the self concept as it applies to > variables. I think I understand how it affects methods. > > I haven't been able to fully grasp the scope of class variables and > the effect of the "sel

Re: teacher need help!

2015-10-19 Thread Chris Angelico
On Tue, Oct 20, 2015 at 4:42 AM, jmp wrote: > import turtle > > print turtle.__file__ > > may help you find the offending file. > > jm In general, yes. Sadly, that technique doesn't work when the file attempts to import itself, and then errors out; your driver script will simply get an ImportErro

Re: How to log the output from the multiple telnet sessions to separate log file

2015-10-19 Thread manjunatha . mahalingappa
On Friday, October 16, 2015 at 11:11:58 PM UTC-7, dieter wrote: > manjunatha.mahalinga...@gmail.com writes: > > I'm very much new to python. > > I'm doing the automation for networking device testing , I will be opening > > the 4 telnet session, and doing some testing operations on each of those

Re: variable scope of class objects

2015-10-19 Thread Random832
jon...@mail.python.org writes: > > The below pseudo code is distilled from my 1st attempt at a functional > Python program on the RasPi. > > My questions are: > What is the scope of class variables? You must access them as members of the class or an instance of the class. > does the self. prefix

variable scope of class objects

2015-10-19 Thread JonRob
Hi, I've having trouble understanding the self concept as it applies to variables. I think I understand how it affects methods. I haven't been able to fully grasp the scope of class variables and the effect of the "self" to the scope of the variable. I (think) I understand that in the below ca

Re: teacher need help!

2015-10-19 Thread jmp
On 10/19/2015 03:42 PM, Storey, Geneva wrote: Our technician will be here this morning to take a look. I'll let you know what we find. Thanks again, Geneva Storey import turtle print turtle.__file__ may help you find the offending file. jm -- https://mail.python.org/mailman/listinfo/pyt

Re: Defamation

2015-10-19 Thread Tim Golden
On 19/10/2015 17:29, Laura Creighton wrote: In a message of Mon, 19 Oct 2015 08:36:37 -0600, Michael Torrie writes: On 10/19/2015 08:14 AM, Chris Angelico wrote: On Mon, Oct 19, 2015 at 7:31 AM, gaini2002--- via Python-list wrote: Please remove the page That page is just spam that someone

Re: Defamation

2015-10-19 Thread Chris Angelico
On Tue, Oct 20, 2015 at 3:28 AM, Laura Creighton wrote: >>Even if the page were to be removed, the same content has already been >>posted to myriad news servers the world over, many of which archive >>all posts. There's no way to remove it from everywhere. >> >>ChrisA > > Actually, this one was pa

Re: Defamation

2015-10-19 Thread Laura Creighton
In a message of Mon, 19 Oct 2015 08:36:37 -0600, Michael Torrie writes: >On 10/19/2015 08:14 AM, Chris Angelico wrote: >> On Mon, Oct 19, 2015 at 7:31 AM, gaini2002--- via Python-list >> wrote: >>> Please remove the page >> >> That page is just spam that someone sent to the newsgroup/mailing >> li

Re: Defamation

2015-10-19 Thread Laura Creighton
In a message of Tue, 20 Oct 2015 01:14:14 +1100, Chris Angelico writes: >On Mon, Oct 19, 2015 at 7:31 AM, gaini2002--- via Python-list > wrote: >> Please remove the page >> https://mail.python.org/pipermail/python-list/2014-September/678498.html > >That page is just spam that someone sent to the ne

Re: Defamation

2015-10-19 Thread Ralf Hildebrandt
* Ian Kelly : > Which is the same thing the OP was told the last time he posted a > removal request publicly to this list. I do note that the subject of > the previous request appears to have since been removed. > > I've taken the liberty of forwarding this request on to > python-list-owner, on t

Re: Defamation

2015-10-19 Thread Ian Kelly
On Mon, Oct 19, 2015 at 8:36 AM, Michael Torrie wrote: > On 10/19/2015 08:14 AM, Chris Angelico wrote: >> On Mon, Oct 19, 2015 at 7:31 AM, gaini2002--- via Python-list >> wrote: >>> Please remove the page >> >> That page is just spam that someone sent to the newsgroup/mailing >> list. You can ign

Re: Defamation

2015-10-19 Thread Michael Torrie
On 10/19/2015 08:14 AM, Chris Angelico wrote: > On Mon, Oct 19, 2015 at 7:31 AM, gaini2002--- via Python-list > wrote: >> Please remove the page > > That page is just spam that someone sent to the newsgroup/mailing > list. You can ignore it, same as the rest of us do. > > Even if the page were to

Re: Defamation

2015-10-19 Thread Chris Angelico
On Mon, Oct 19, 2015 at 7:31 AM, gaini2002--- via Python-list wrote: > Please remove the page > https://mail.python.org/pipermail/python-list/2014-September/678498.html That page is just spam that someone sent to the newsgroup/mailing list. You can ignore it, same as the rest of us do. Even if t

Re: teacher need help!

2015-10-19 Thread Storey, Geneva
Our technician will be here this morning to take a look. I'll let you know what we find. Thanks again, Geneva Storey Fulton High School Spanish, Mathematics Bulldog Academy From: Tim Golden Sent: Monday, October 19, 2015 3:39 AM To: Storey, Geneva C

Defamation

2015-10-19 Thread gaini2002--- via Python-list
Please remove the page https://mail.python.org/pipermail/python-list/2014-September/678498.html Thank You Gabriele Silvagni -- https://mail.python.org/mailman/listinfo/python-list

OS X Python: can I explicitly set MACOSX_DEPLOYMENT_TARGET for extensions?

2015-10-19 Thread Andrew Jaffe
I use the python.org framework build of Python under recent versions of OS X (i.e., 10.11 El Capitan). I need to build some extensions that rely on recent versions of compilers (e.g., C++-11 features). However the python.org python is built to work on older systems as well, for backward compati

Re: teacher need help!

2015-10-19 Thread Tim Golden
On 19/10/2015 02:32, Storey, Geneva wrote: > Same issue! See attached. > Thanks! Geneva -- please try to post text, not pictures. Just use the mouse to cut-and-paste the entirety of the text from that window into an email. Otherwise some of the people who are trying to help you can't actually see

Re: teacher need help!

2015-10-19 Thread Terry Reedy
On 10/18/2015 9:32 PM, Storey, Geneva wrote: Same issue! See attached. Can I suggest you find the turtle.py module in c:\windows\system32, move it to somewhere more suitable and try the code again? This seems strange. C:/Windows/System32 should only be writable by admin users, a

Re: teacher need help!

2015-10-19 Thread Storey, Geneva
Argh! I cannot find that file! I have deleted all files with Python or having the name turtle, and am in the process of reinstalling. Out of 13 computers, 10 are working perfectly and three give this error-so confused! I'll let you know how it goes. Geneva Sent from my iPhone On Oct 1