On Wed, Jul 06, 2016 at 03:35:16PM -0400, bruce wrote:
> Hi.
>
> Saw the decorator thread earlier.. didn't want to pollute it. I know,
> I could google!
>
> But, what are decorators, why are decorators? who decided you needed
> them!
Sometimes you find yourself writing many functions (or metho
>
> Have you checked that you have the requisite permissions? That the
> socket you are connecting to exists? If its a system call error the
> problem is most likely in your environment rather than your code.
>
That particular error is from Windows. One common cause for it is a
network firewall,
> As to who suggested them you'd need to go back through the
> PEPs to see who first suggested it, and then maybe more to see
> who's idea finally got accepted. I think it was in Python 2.5.
Hi Bruce,
Yes, it happened back around 2003:
https://www.python.org/dev/peps/pep-0318/
Decorators
On 06/07/16 19:34, Moses, Samuel wrote:
> Mine
>
> OS: Windows
> Windows version: 8.1
>
> Python 3.2
> Wing IDE: 15.1
Thanks for the extra info but it doesn't help much with
your problem since we still don't know what your code
does nor how your environment is set up.
BTW Can you connect to you
On 06/07/16 20:35, bruce wrote:
> Saw the decorator thread earlier.. didn't want to pollute it. I know, I
> could google!
>
> But, what are decorators, why are decorators? who decided you needed them!
decorators are things that modify functions in standard ways.
Specifically they are functions t
On Wed, Jul 6, 2016 at 4:56 PM, Alex Hall wrote:
>
>
> On Wed, Jul 6, 2016 at 3:35 PM, bruce wrote:
>
>> Hi.
>>
>> Saw the decorator thread earlier.. didn't want to pollute it. I know, I
>> could google!
>>
>> But, what are decorators, why are decorators? who decided you needed them!
>>
>
> I th
Mine
OS: Windows
Windows version: 8.1
Python 3.2
Wing IDE: 15.1
Sam
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor
On Wed, Jul 6, 2016 at 3:35 PM, bruce wrote:
> Hi.
>
> Saw the decorator thread earlier.. didn't want to pollute it. I know, I
> could google!
>
> But, what are decorators, why are decorators? who decided you needed them!
>
They're functions that modify the decorated function. If I make a functi
Hi.
Saw the decorator thread earlier.. didn't want to pollute it. I know, I
could google!
But, what are decorators, why are decorators? who decided you needed them!
Thanks!
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription o
On 06/07/16 18:27, Moses, Samuel wrote:
> I am getting an error. I tired to run the script in wing IDE.
>
Without the accompanying code we can only guess.
> I am getting this error,
>
> "Traceback (most recent call last):
> File "C:\Program Files (x86)\Wing IDE 5.1\bin\wingdb.py", line 822,
On 06/07/16 15:04, loh...@tuta.io wrote:
> script, filename = argv
> txt = open (filename)
>
> print "Here's your file %r: " % filename
> print txt.read()
>
> print "Type the filename again: "
> file_again = raw_input("> ")
>
> txt_again = open(file_again)
> print txt_again.read()
> why do I
On Wed, Jul 6, 2016 at 1:01 PM, Alex Hall wrote:
> Regarding this project: I've gone ahead and tried a variant of it. I
> wanted to log to an HTML file, since those are much easier to look at with
> a screen reader and so I could get used to the concepts involved. Here's
> what I've come up with
I am getting an error. I tired to run the script in wing IDE.
I am getting this error,
"Traceback (most recent call last):
File "C:\Program Files (x86)\Wing IDE 5.1\bin\wingdb.py", line 822, in
main
args['firststop'], err, netserver, pwfile_path)
File "C:\Program Files (x86)\Wing IDE 5.1
On Wed, Jul 6, 2016 at 10:59 AM wrote:
> why do I have to create a variable txt_again to assign it to the open
> function and them print the file?
> why is it that I can't only write something like open(file_again).read()?
>
Good insight. In fact you don't need to create the variable. The code `
Regarding this project: I've gone ahead and tried a variant of it. I wanted
to log to an HTML file, since those are much easier to look at with a
screen reader and so I could get used to the concepts involved. Here's what
I've come up with so far. I'll ask the question, then paste the code. I'm
get
Hey list,
Another day, another Python experiment. I'm wondering what methods I'd have
to implement in a custom subclass of logger.Handler.
Currently, the recurring jobs I have written log their events to a file
each time they run. That's fine, but it doesn't let me keep
easily-sorted/searched reco
first, sorry everyone for having attached the file instead of just typing it
here.
second, thanks a lot for the replies; even though I gave you no code it was
quite helpful!
the code was this:
from sys import argv
script, filename = argv
txt = open (filename)
print "Here's your file %r: " % fi
loh...@tuta.io wrote:
> hey everyone. this is my first time trying this -- actually, I've been
> studying python only for some days now, and I'm afraid my questions are
> going to be rally simple, but I can't seem to understand this piece of
> code and thus can't move on.
You seem to be talki
On 06/07/16 00:56, loh...@tuta.io wrote:
> hey everyone. this is my first time trying this
Welcome, but...
> you probably know the book,
Sorry, I don't and I suspect I'm not alone.
It's probably a fine book, but we don't all know it.
> so you know that zed always makes us write code
> so tha
On Tue, Jul 5, 2016 at 5:36 PM Michael Selik
wrote:
> On Sat, Jul 2, 2016 at 8:29 AM Alan Gauld via Tutor
> wrote:
>
>> There are arguably easier ways of doing this
>>
>
> I think you'll find that for-loops are preferable to while-loops. Here's
> an alternative implementation.
>
> https://gist.g
On Tue, Jul 5, 2016 at 8:24 PM wrote:
> I'm having trouble with most of the lines here.
>
It looks like you tried to attach a file. This mailing list does not allow
attachments. Instead, could you paste the code into your email?
> things that I don't understand:
> 1. the need to put script int
Thanks everyone, that all makes more sense. I think I was indeed thinking of
"is None", which is essentially the same as "== None" (I know there's a subtile
difference, but they do the same thing). Of course, "is None" fits with this
usage, as you're asking if the value is the literal None objec
22 matches
Mail list logo