Re: [Tutor] Do not understand code snippet from "26.8. test — Regression tests package for Python"

2017-04-18 Thread Martin A. Brown
Greetings, >Thank you very much Martin; you filled in a lot of details. I had an >overall understanding of what unittest does, but you have now enhanced >that understanding substantially. Happy to help! I'll introduce you to my little menagerie below! >I'm still iffy on how the mixin class ge

Re: [Tutor] Visual Studio Community 2017

2017-04-18 Thread Jos Kerc
Hi, you might want to look at things like Anaconda, Enthought, ... They come with lots of packages/libraries pre-installed and a complete programming environment. For small project, you could even look at Jupyter. I t allows you to have your program, data & results (IIRC even pics & vids) in somet

Re: [Tutor] Visual Studio Community 2017

2017-04-18 Thread Mats Wichmann
... naturally, far better than what I wrote, is: https://docs.microsoft.com/en-us/visualstudio/python/python-environments ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinf

Re: [Tutor] Visual Studio Community 2017

2017-04-18 Thread Mats Wichmann
On 04/18/2017 11:14 AM, Alan Gauld via Tutor wrote: > On 18/04/17 17:55, Rafael Knuth wrote: >> I wanted to start my first project using matplotlib (I have never >> worked with libraries before). > > Every time you do an import you are using a library. > eg > > import sys > import os > etc > >

Re: [Tutor] Visual Studio Community 2017

2017-04-18 Thread Alan Gauld via Tutor
On 18/04/17 17:55, Rafael Knuth wrote: > I wanted to start my first project using matplotlib (I have never > worked with libraries before). Every time you do an import you are using a library. eg import sys import os etc It's no big deal. > I am trying to get started with VS Community 2017, >

[Tutor] Visual Studio Community 2017

2017-04-18 Thread Rafael Knuth
I wanted to start my first project using matplotlib (I have never worked with libraries before). I am trying to get started with VS Community 2017, and I am having trouble performing the most basic tasks such as installing matplotlib. Anyone here using VS 2017? Or, can anyone recommend an alternati

Re: [Tutor] classproperty for Python 2.7 (read-only enough)

2017-04-18 Thread Mats Wichmann
On 04/18/2017 04:00 AM, Thomas Güttler wrote: > I would like to have read-only class properties in Python. > > I found this > http://stackoverflow.com/questions/128573/using-property-on-classmethods > But there are a lot of discussions of things which I don't understand. > > I want to be a user o

Re: [Tutor] classproperty for Python 2.7 (read-only enough)

2017-04-18 Thread Alan Gauld via Tutor
On 18/04/17 11:00, Thomas Güttler wrote: > I would like to have read-only class properties in Python. Is there a specific reason why? Do you think for example that users of the class will deliberately try to modify the attribute? Normally in Python we leave all attributes public and unprotected (p

Re: [Tutor] Tkinter and canvas question

2017-04-18 Thread Phil
On Mon, 17 Apr 2017 22:57:41 -0500 boB Stepp wrote: > I have yet to do much class writing with tkinter, but if I am > understanding things correctly, in your Sudoku class where you > instantiate a Canvas instance, you assign it to the name "the_canvas". > This will be local to the __init__ method

Re: [Tutor] classproperty for Python 2.7 (read-only enough)

2017-04-18 Thread Peter Otten
Thomas Güttler wrote: > I would like to have read-only class properties in Python. > > I found this > http://stackoverflow.com/questions/128573/using-property-on-classmethods > But there are a lot of discussions of things which I don't understand. > > I want to be a user of class properties, not

[Tutor] classproperty for Python 2.7 (read-only enough)

2017-04-18 Thread Thomas Güttler
I would like to have read-only class properties in Python. I found this http://stackoverflow.com/questions/128573/using-property-on-classmethods But there are a lot of discussions of things which I don't understand. I want to be a user of class properties, not an implementer of the details. I

Re: [Tutor] sqlite3 making a spurious duplicate?

2017-04-18 Thread Peter Otten
Marilyn Davis wrote: > #!/usr/bin/env python3 > """ > Hello Tutors, > > I can't figure out why the FillWithStars() function puts Canopus in the db > twice. > > What am I missing? > > Thank you for any help. > > Marilyn Davis > > p.s. That Reset(db_name) is in there so that you can run it over

Re: [Tutor] Tkinter and canvas question

2017-04-18 Thread Alan Gauld via Tutor
On 18/04/17 00:13, Phil wrote: > Thank you for reading this. > > How do I reference the_canvas from my solve() method? > class Sudoku(Frame): > def __init__(self, parent): > Frame.__init__(self, parent) > self.parent = parent > > parent.title("Sudoku solver") >

Re: [Tutor] bracket issue

2017-04-18 Thread Cameron Simpson
On 15Apr2017 14:05, Alan Gauld wrote: On 15/04/17 03:17, Palm Tree wrote: s="2*3+3(8-4(5+6+9))+2+3+3(4/4)" i want to find expression enclosed in brackets. i want outputs to be like: (8-4(5+6+9)) (5+6+9) (4/4) You probably could do it with some fancy regex but personally I'd investigate a