Re: [Tutor] feedback on simple python code

2017-02-27 Thread Danny Yoo
Hi Ryan, Let's take a look... Overloading the "write" method to take in different types of arguments looks a bit suspicious. You have a superclass that defines a write method, and you have two subclasses that implement that method. However, your first implementation, LogFile.write, appears to

Re: [Tutor] Help with this question

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 22:00, Johnny Hh wrote: > write a python function called find_most_freq() that returns the element of > a given list that occurs the most frequently. If there are ties, take the > number found first. OK, You've shown us the exercise, now show us your attempt at a solution. Here is a

Re: [Tutor] Learning Objectives?

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 14:57, leam hall wrote: >> I'm not aware of such a list, and I'm not sure it's of much value. >> Better to just learn what you need and use it. ... > When I was coming up as a Linux guy I took the old SAGE guidelines and > studied each "level" in turn. It was useful for making me a

[Tutor] feedback on simple python code

2017-02-27 Thread Ryan Smith
Hi all, New python student here. I have been using O¹reilly¹s "Python Beyond the Basics: Object Oriented Programming video series". In one of the assignments we are to write a simple inheritance hierarchy of three classes that write to text files. I have actually written the code for the

Re: [Tutor] Problem with Spyder IDE in Anaconda3

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 20:52, Stephen P. Molnar wrote: > To the best of my knowledge I am not running any anti-virus software. > This has always been a Linux computer and there has been no need. There are threats to Linux just fewer of them, plus you could be used as a host to pass on damaged files so you

[Tutor] Help with this question

2017-02-27 Thread Johnny Hh
write a python function called find_most_freq() that returns the element of a given list that occurs the most frequently. If there are ties, take the number found first. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] Learning Objectives?

2017-02-27 Thread Mats Wichmann
On 02/27/2017 07:57 AM, leam hall wrote: > When I was coming up as a Linux guy I took the old SAGE guidelines and > studied each "level" in turn. It was useful for making me a well-rounded > admin and helped me put off some higher end stuff I wasn't really ready > for. > > Things like Testing

Re: [Tutor] Problem with Spyder IDE in Anaconda3

2017-02-27 Thread Stephen P. Molnar
On 02/27/2017 02:29 PM, Marc Tompkins wrote: On Mon, Feb 27, 2017 at 10:46 AM, Stephen P. Molnar > wrote: I had sent the following message to Anaconda Support: I have just installed anaconda3-4.3.0 and upgraded Spyder to v-3.1.3.

Re: [Tutor] Problem with Spyder IDE in Anaconda3

2017-02-27 Thread Marc Tompkins
On Mon, Feb 27, 2017 at 12:52 PM, Stephen P. Molnar wrote: > On 02/27/2017 02:29 PM, Marc Tompkins wrote: > >> On Mon, Feb 27, 2017 at 10:46 AM, Stephen P. Molnar >> > wrote: >> >> I had sent the following message

Re: [Tutor] Problem with Spyder IDE in Anaconda3

2017-02-27 Thread Marc Tompkins
On Mon, Feb 27, 2017 at 10:46 AM, Stephen P. Molnar wrote: > I had sent the following message to Anaconda Support: > > I have just installed anaconda3-4.3.0 and upgraded Spyder to v-3.1.3. > > When I open Spyder and run a python script that has run perfectly in a >

[Tutor] Problem with Spyder IDE in Anaconda3

2017-02-27 Thread Stephen P. Molnar
I had sent the following message to Anaconda Support: I have just installed anaconda3-4.3.0 and upgraded Spyder to v-3.1.3. When I open Spyder and run a python script that has run perfectly in a previous version of Spyder I get the results that I expect,but with 'Kernel died, restarting' and

Re: [Tutor] Learning Objectives?

2017-02-27 Thread leam hall
On Mon, Feb 27, 2017 at 9:28 AM, Alan Gauld via Tutor wrote: > On 27/02/17 10:44, Leam Hall wrote: > > Is there a list of Python skill progression, like "Intermediates should > > know and Advanced should know ?" Trying to map out > > a well rounded study list. > > I'm not

Re: [Tutor] Learning Objectives?

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 10:44, Leam Hall wrote: > Is there a list of Python skill progression, like "Intermediates should > know and Advanced should know ?" Trying to map out > a well rounded study list. I'm not aware of such a list, and I'm not sure it's of much value. Better to just learn what you need

Re: [Tutor] [Python 2.7] HELP: Serving HTTP on 0.0.0.0 port 80 not proceeding

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 11:22, Allan Tanaka wrote: > - And did you see chart.html in that listing? > Yes it's there > > - How did you "proceed"? > Did you click the link in the directorty listing > or did you type it in by hand? > I click the link in directory listing OK, It looks like the server side is

Re: [Tutor] [Python 2.7] HELP: Serving HTTP on 0.0.0.0 port 80 not proceeding

2017-02-27 Thread Allan Tanaka via Tutor
- And did you see chart.html in that listing? Yes it's there - How did you "proceed"? Did you click the link in the directorty listing or did you type it in by hand? I click the link in directory listing have you checked that chart.htm is not empty and that the html is valid? As i click the

Re: [Tutor] [Python 2.7] HELP: Serving HTTP on 0.0.0.0 port 80 not proceeding

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 10:40, Allan Tanaka via Tutor wrote: > After typing python -m SimpleHTTPServer 8000 in CMD > then i proceed to my google chrome and type http://allan-pc:8000/ OK, But to be safe I'd probably stick to 0.0.0.0 rather than your PC name - it eliminates routing errors from the equation.

Re: [Tutor] [Python 2.7] HELP: Serving HTTP on 0.0.0.0 port 80 not proceeding

2017-02-27 Thread Allan Tanaka via Tutor
Yes chart.html is listed but when clicked it, the page doesn't show anything. Just blank.In command prompt, the message after i clicked chart.html is like this:Serving HTTP on 0.0.0.0 port 8000192.168.100.6 - - [27/Feb/2017 17.36.53] "GET / HTTP/1.1" 200 - On Monday, 27 February 2017,

[Tutor] Learning Objectives?

2017-02-27 Thread Leam Hall
Is there a list of Python skill progression, like "Intermediates should know and Advanced should know ?" Trying to map out a well rounded study list. Thanks! Leam ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription

Re: [Tutor] [Python 2.7] HELP: Serving HTTP on 0.0.0.0 port 80 not proceeding

2017-02-27 Thread Allan Tanaka via Tutor
After typing python -m SimpleHTTPServer 8000 in CMD then i proceed to my google chrome and type http://allan-pc:8000/ That's where Directory listing for/ Then i proceed to http://allan-pc:8000/chart.html No chart image whatsoever...Blank webpageIn command prompt, the message after i type python

Re: [Tutor] [Python 2.7] HELP: Serving HTTP on 0.0.0.0 port 80 not proceeding

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 10:24, Alan Gauld via Tutor wrote: > On 27/02/17 10:13, Allan Tanaka via Tutor wrote: >> I have changed the syntax to be python -m SimpleHTTPServer 8000 >> to match my ml python script. Still it doesn't work? A couple of other things to check: 1) does check.html exist and have the

Re: [Tutor] Checkbuttons Variables PY_VAR

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 03:06, Pooja Bhalode wrote: > for i in range(len(checkboxVars)): > if checkboxVars[i].get() == 1: >print checkboxVars[i] >selectedparam.append(checkboxVars[i]) As a point of Pythonic style this would be better written (and easier to read) as for var in

Re: [Tutor] [Python 2.7] HELP: Serving HTTP on 0.0.0.0 port 80 not proceeding

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 10:13, Allan Tanaka via Tutor wrote: > I have changed the syntax to be python -m SimpleHTTPServer 8000 > to match my ml python script. Still it doesn't work? Define "doesn't work"? What happens? Do you see an error message - if so which one? What happens if you use the base url?

Re: [Tutor] UDP client

2017-02-27 Thread Phil
On 26/02/17 19:41, Peter Otten wrote: Try buf.decode("utf-8") Thank you once again Peter. -- Regards, Phil ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] [Python 2.7] HELP: Serving HTTP on 0.0.0.0 port 80 not proceeding

2017-02-27 Thread Allan Tanaka via Tutor
I have changed the syntax to be python -m SimpleHTTPServer 8000 to match my  ml python script.Still it doesn't work? Scracthing my head...See attached file for screenshoots On Monday, 27 February 2017, 16:54, Alan Gauld via Tutor wrote: On 27/02/17 02:44, Allan

Re: [Tutor] Checkbuttons Variables PY_VAR

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 03:06, Pooja Bhalode wrote: > The following code creates a list of checkboxes It would really help uif you posted in plain text. The HTML/RTF is getting very hard to read with no indentation. > ones that user wants, I am trying to add the selected variables to another > list so that

Re: [Tutor] [Python 2.7] HELP: Serving HTTP on 0.0.0.0 port 80 not proceeding

2017-02-27 Thread Alan Gauld via Tutor
On 27/02/17 02:44, Allan Tanaka via Tutor wrote: > I try to access it with http://0.0.0.0:8000/chart.html via Google Chrome, > On 18/02/17 04:46, Allan Tanaka via Tutor wrote: >> Not completely sure why it doesn't open the chart on the web browser >> when i type this in the windows command

[Tutor] Checkbuttons Variables PY_VAR

2017-02-27 Thread Pooja Bhalode
Hi, The following code creates a list of checkboxes (each associated with different variables) for the user to select from, after having selected the ones that user wants, I am trying to add the selected variables to another list so that the selected variables can be accessed later in the code.

Re: [Tutor] [Python 2.7] HELP: Serving HTTP on 0.0.0.0 port 80 not proceeding

2017-02-27 Thread Allan Tanaka via Tutor
I try to access it with http://0.0.0.0:8000/chart.html via Google Chrome, FireFox, and Opera.I don't think the python code is the problem right, or? On Saturday, 18 February 2017, 16:36, Alan Gauld via Tutor wrote: Please don't repeat post. We saw it the first time.