Re: [Tutor] new to python

2017-07-24 Thread Mats Wichmann
On 07/24/2017 04:32 PM, N6Ghost wrote: > update code: > f = open("C:\coderoot\python3\level1\inputfile.txt", 'r') > for line in f: > for line in f: > print(line.rstripe()) > > f.close() > > > C:\coderoot\python3\level1>python secondscript.py > Traceback (most recent call las

Re: [Tutor] new to python

2017-07-24 Thread N6Ghost
On 7/23/2017 1:03 AM, Alan Gauld via Tutor wrote: On 23/07/17 07:26, N6Ghost wrote: f = open("C:\coderoot\python3\level1\inputfile.txt", 'r') for line in file: Note that you have no variable called 'file'. So this line doesn't make sense. for line in f: print(line.rstripe()

Re: [Tutor] Tutor Digest, Vol 161, Issue 36

2017-07-24 Thread Borisco Bizaro
Please what is the best way to study python programming well. On Jul 24, 2017 17:00, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, s

[Tutor] Fwd: Re: basic decorator question

2017-07-24 Thread Alan Gauld
Bah, Forgot to ReplyAll... Forwarded Message On 24/07/17 15:33, bruce wrote: > But, I'm sooo confuzed! My real question though, can a decorator have > multiple internal functions? Yes and classes too if you want. A decorator is just a standard function in all respects. The

Re: [Tutor] basic decorator question

2017-07-24 Thread Peter Otten
bruce wrote: > Hi. > > I've seen sites discuss decorators, as functions that "wrap" and > return functions. > > But, I'm sooo confuzed! My real question though, can a decorator have > multiple internal functions? All the examples I've seen so far have a > single internal function. > > And, if a

Re: [Tutor] basic decorator question

2017-07-24 Thread Steven D'Aprano
Hi Bruce, On Mon, Jul 24, 2017 at 10:33:25AM -0400, bruce wrote: > Hi. > > I've seen sites discuss decorators, as functions that "wrap" and > return functions. > > But, I'm sooo confuzed! My real question though, can a decorator have > multiple internal functions? All the examples I've seen so f

Re: [Tutor] basic decorator question

2017-07-24 Thread Mats Wichmann
On 07/24/2017 08:33 AM, bruce wrote: > Hi. > > I've seen sites discuss decorators, as functions that "wrap" and > return functions. > > But, I'm sooo confuzed! My real question though, can a decorator have > multiple internal functions? All the examples I've seen so far have a > single internal f

[Tutor] basic decorator question

2017-07-24 Thread bruce
Hi. I've seen sites discuss decorators, as functions that "wrap" and return functions. But, I'm sooo confuzed! My real question though, can a decorator have multiple internal functions? All the examples I've seen so far have a single internal function. And, if a decorator can have multiple inter

Re: [Tutor] Python3 Help

2017-07-24 Thread Alan Gauld via Tutor
On 24/07/17 01:58, Alan Gauld via Tutor wrote: > $ which python3 > >> -bash: $: command not found > > The $ is the OS prompt you are not supposed to type it in. While on the subject you might also see something like # Which can mean one of two things 1) It's a comment and you should n

Re: [Tutor] Python3 Help

2017-07-24 Thread Brandon Anderson
Success! Thank you, Danny! Mission accomplished. -Brandon Sent from my iPhone On Jul 23, 2017, at 5:44 PM, Danny Yoo wrote: >> 2. I’m trying to locate the directory path to where Python3 is located on >> my system, but when I enter >>the following command: >>$ type -a pytho

Re: [Tutor] Quick Pythonic Style Tips

2017-07-24 Thread Abdur-Rahmaan Janhangeer
nice, just wanted some "styling" guide rather than technical guides you know doing things the python style rather than the python way Abdur-Rahmaan Janhangeer, Mauritius abdurrahmaanjanhangeer.wordpress.com On 24 Jul 2017 05:09, "Steven D'Aprano" wrote: > On Sun, Jul 23, 2017 at 07:02:09PM +04