Re: Python 3.6 Logging time is not listed

2018-08-20 Thread dieter
Keep Secret writes: > On Monday, 13 August 2018 19:42:57 UTC+2, Léo El Amri wrote: >> On 13/08/2018 19:23, MRAB wrote: >> > Here you're configuring the logger, setting the name of the logfile and >> > the logging level, but not specifying the format, so it uses the default >> > format: >> > >> >

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-20 Thread dieter
Νίκος writes: > ... > The weird thing is that in my vps command line my hello app is in state of > listening > > [root@superhost public_html]# python3 app.py > Bottle v0.12.13 server starting up (using WSGIRefServer())... > Listening on http://localhost:8080/ > Hit Ctrl-C to quit. > > So, i wond

Re: Pylint false positives

2018-08-20 Thread Dan Sommers
On Mon, 20 Aug 2018 22:55:26 +0300, Marko Rauhamaa wrote: > Dan Sommers : > >> On Mon, 20 Aug 2018 14:39:38 +, Steven D'Aprano wrote: >>> I have often wished Python had proper namespaces, so I didn't have to >>> abuse classes as containers in this way :-( >>> >>> (Not that I do this using "i

Re: Pylint false positives

2018-08-20 Thread Steven D'Aprano
On Mon, 20 Aug 2018 22:55:26 +0300, Marko Rauhamaa wrote: > Dan Sommers : > >> On Mon, 20 Aug 2018 14:39:38 +, Steven D'Aprano wrote: >>> I have often wished Python had proper namespaces, so I didn't have to >>> abuse classes as containers in this way :-( >>> >>> (Not that I do this using "i

Re: Pylint false positives

2018-08-20 Thread Gregory Ewing
Marko Rauhamaa wrote: Lexically, there is special access: class C: def __init__(self, some, arg): c = self class D: def method(self): access(c) access(some) access(arg) That's only because t

Re: Pylint false positives

2018-08-20 Thread Marko Rauhamaa
Dan Sommers : > On Mon, 20 Aug 2018 14:39:38 +, Steven D'Aprano wrote: >> I have often wished Python had proper namespaces, so I didn't have to >> abuse classes as containers in this way :-( >> >> (Not that I do this using "inner classes", but I do often want to use >> a class as a container

Re: Pylint false positives

2018-08-20 Thread Marko Rauhamaa
Steven D'Aprano : > On Mon, 20 Aug 2018 11:40:16 +0300, Marko Rauhamaa wrote: > >>class C: >>def __init__(self, some, arg): >>c = self >>class D: >>def method(self): >>access(c) >>access(some) >>

Re: Idle

2018-08-20 Thread Steven D'Aprano
On Mon, 20 Aug 2018 14:46:32 +0400, NAB NAJEEB wrote: > Hi am a beginner can u tell me where can I write my codes I already > tried pycharm and atom.. both are not worked successfully always shows > error...pls guide me... What errors do they show? -- Steven D'Aprano "Ever since I learned abo

Re: Pylint false positives

2018-08-20 Thread Chris Angelico
On Tue, Aug 21, 2018 at 2:12 AM, Dan Sommers wrote: > On Mon, 20 Aug 2018 14:39:38 +, Steven D'Aprano wrote: > >> If a class' methods don't use self, it probably shouldn't be a class. > > Agreed. > >> I have often wished Python had proper namespaces, so I didn't have to >> abuse classes as con

Re: New books by O’Reilly

2018-08-20 Thread Bev in TX
Thanks for mentioning this — it’s hilarious! I’ve seen all of them through the years. > >> On Sun, 19 Aug 2018, 09:00 Larry Martell, > > wrote: >>> >>> https://imgur.com/gallery/tW1lwEl >>> -- Bev in TX -- https://mail.p

Re: Writing bytes to stdout reverses the bytes

2018-08-20 Thread Thomas Jollans
On 2018-08-20 17:07, Akkana Peck wrote: >> Thomas Jollans : >>> Wonderful. Now why don't we all forget about hexdump and use xxd? ;-) > > Marko Rauhamaa writes: >> Fedora: >> >>$ xxd >>bash: xxd: command not found >>$ hd >>bash: hd: command not found >>$ od -Ax -tx1z -v <<>

Re: Idle

2018-08-20 Thread Abdur-Rahmaan Janhangeer
can you please explain in more details? thank you ! like is the error with a snippet or a system level error ? Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Mauritius -- https://mail.python.org/mailman/listinfo/python-list

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-20 Thread Chris Warrick
On Mon, 20 Aug 2018 at 18:15, Νίκος wrote: > > Τη Δευτέρα, 20 Αυγούστου 2018 - 9:49:00 π.μ. UTC+3, ο χρήστης Miki Tebeka > έγραψε: > > If you're trying to access the machine from another machine, you need to > > change the host to '0.0.0.0'. 'localhost' is the internal interface. > > > > On Sund

Re: Pylint false positives

2018-08-20 Thread Dan Sommers
On Mon, 20 Aug 2018 14:39:38 +, Steven D'Aprano wrote: > If a class' methods don't use self, it probably shouldn't be a class. Agreed. > I have often wished Python had proper namespaces, so I didn't have to > abuse classes as containers in this way :-( > > (Not that I do this using "inner c

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-20 Thread Νίκος
Τη Δευτέρα, 20 Αυγούστου 2018 - 9:49:00 π.μ. UTC+3, ο χρήστης Miki Tebeka έγραψε: > If you're trying to access the machine from another machine, you need to > change the host to '0.0.0.0'. 'localhost' is the internal interface. > > On Sunday, August 19, 2018 at 10:36:25 PM UTC+3, Νίκος wrote: >

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-20 Thread Νίκος
Τη Δευτέρα, 20 Αυγούστου 2018 - 7:59:06 π.μ. UTC+3, ο χρήστης dieter έγραψε: > Νίκος writes: > > i just installed bottle and flask web frameworks in my CentOS environment > > but i canno get it working even with the simpleste xample. The coonection > > is refused always. > > "connection refused

Idle

2018-08-20 Thread NAB NAJEEB
Hi am a beginner can u tell me where can I write my codes I already tried pycharm and atom.. both are not worked successfully always shows error...pls guide me... -- https://mail.python.org/mailman/listinfo/python-list

Re: New books by O’Reilly

2018-08-20 Thread Larry Martell
On Mon, Aug 20, 2018 at 10:06 AM, Abdur-Rahmaan Janhangeer wrote: > some accompanying explanations appreciated with the link. That would ruin the joke. > > yours, > > Abdur-Rahmaan Janhangeer > https://github.com/Abdur-rahmaanJ > Mauritius > > On Sun, 19 Aug 2018, 09:00 Larry Martell, wrote: >>

Re: Writing bytes to stdout reverses the bytes

2018-08-20 Thread Akkana Peck
> Thomas Jollans : > > Wonderful. Now why don't we all forget about hexdump and use xxd? ;-) Marko Rauhamaa writes: > Fedora: > >$ xxd >bash: xxd: command not found >$ hd >bash: hd: command not found >$ od -Ax -tx1z -v <<00 68 65 6c 6c 6f 0a

Re: Pylint false positives

2018-08-20 Thread Steven D'Aprano
On Mon, 20 Aug 2018 11:40:16 +0300, Marko Rauhamaa wrote: >class C: >def __init__(self, some, arg): >c = self >class D: >def method(self): >access(c) >access(some) >access(arg) > > IOW,

Re: Pylint false positives

2018-08-20 Thread Steven D'Aprano
On Mon, 20 Aug 2018 15:58:57 +0300, Marko Rauhamaa wrote: [...] >> The point is that creating a class object every time you want a closure >> is pointlessly wasteful. There is *no benefit whatsoever* in doing >> that. If you think there is, then it's probably because you're trying >> to write Java

Re: Writing bytes to stdout reverses the bytes

2018-08-20 Thread Grant Edwards
On 2018-08-20, Chris Angelico wrote: > On Mon, Aug 20, 2018 at 12:01 PM, Grant Edwards >> What do you mean "run it as hd"? >> [... Calling via 'hd' alias makes no difference ...] > Your system is different from mine, then. No doubt. :) > rosuav@sikorsky:~$ ls -l $(which hd) > lrwxrwxrwx 1 root

Re: New books by O’Reilly

2018-08-20 Thread Abdur-Rahmaan Janhangeer
some accompanying explanations appreciated with the link. yours, Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ Mauritius On Sun, 19 Aug 2018, 09:00 Larry Martell, wrote: > https://imgur.com/gallery/tW1lwEl > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://m

Re: Writing bytes to stdout reverses the bytes

2018-08-20 Thread Marko Rauhamaa
Thomas Jollans : > On 2018-08-20 04:22, Chris Angelico wrote: >> On Mon, Aug 20, 2018 at 12:01 PM, Grant Edwards >> wrote: >>> On 2018-08-20, Ben Bacarisse wrote: It is if you run it as hd. >>> What do you mean "run it as hd"? >>> I don't have an "hd" in my path. >> Your system is different

Re: Writing bytes to stdout reverses the bytes

2018-08-20 Thread Thomas Jollans
On 2018-08-20 04:22, Chris Angelico wrote: > On Mon, Aug 20, 2018 at 12:01 PM, Grant Edwards > wrote: >> On 2018-08-20, Ben Bacarisse wrote: >>> It is if you run it as hd. >> >> What do you mean "run it as hd"? >> >> I don't have an "hd" in my path. > > Your system is different from mine, then.

Re: Pylint false positives

2018-08-20 Thread Marko Rauhamaa
Gregory Ewing : > Marko Rauhamaa wrote: >> Some of these chores are heavier, some of them are lighter. But where >> I have used Python, performance hasn't been a bottleneck. It it were, >> I'd choose different approaches of implementation. > > The point is that creating a class object every time yo

Re: Python 3.6 Logging time is not listed

2018-08-20 Thread Keep Secret
On Monday, 13 August 2018 19:42:57 UTC+2, Léo El Amri wrote: > On 13/08/2018 19:23, MRAB wrote: > > Here you're configuring the logger, setting the name of the logfile and > > the logging level, but not specifying the format, so it uses the default > > format: > > > >> logging.basicConfig(filenam

Re: Pylint false positives

2018-08-20 Thread Gregory Ewing
Marko Rauhamaa wrote: Some of these chores are heavier, some of them are lighter. But where I have used Python, performance hasn't been a bottleneck. It it were, I'd choose different approaches of implementation. The point is that creating a class object every time you want a closure is pointle

Re: Pylint false positives

2018-08-20 Thread Chris Angelico
On Mon, Aug 20, 2018 at 7:05 PM, Gregory Ewing wrote: > Marko Rauhamaa wrote: >> >> Chris Angelico : >> >>> 3) Every invocation of method() has to execute the class body, which >>> takes time. >> >> >> That's what happens with every method invocation in Python regardless. > > > No, it doesn't! Inv

Re: Pylint false positives

2018-08-20 Thread Gregory Ewing
Marko Rauhamaa wrote: Chris Angelico : 3) Every invocation of method() has to execute the class body, which takes time. That's what happens with every method invocation in Python regardless. No, it doesn't! Invoking a method involves creating a bound method object, which is very small and l

Re: Pylint false positives

2018-08-20 Thread Marko Rauhamaa
Gregory Ewing : > Marko Rauhamaa wrote: >> At least some of the methods of inner classes are closures (or there >> would be no point to an inner class). > > In Python there is no such thing as an "inner class" in the Java > sense. You can nest class statements, but that just gives you > a class th

Re: Pylint false positives

2018-08-20 Thread Gregory Ewing
Marko Rauhamaa wrote: At least some of the methods of inner classes are closures (or there would be no point to an inner class). In Python there is no such thing as an "inner class" in the Java sense. You can nest class statements, but that just gives you a class that happens to be an attribute