Re: Suggestions on programming in Python an email simple client

2018-02-15 Thread Michael F. Stemper
On 2018-02-15 16:30, Maroso Marco wrote: Il giorno martedì 13 febbraio 2018 21:06:19 UTC+1, Maroso Marco ha scritto: Hi, what i'm trying to do is develop my own email client, but a simple one. I just want it to connect to a specific email account and read the subject line of messages coming f

Re: Suggestions on programming in Python an email simple client

2018-02-15 Thread Maroso Marco
Il giorno martedì 13 febbraio 2018 21:06:19 UTC+1, Maroso Marco ha scritto: > Hi, > > what i'm trying to do is develop my own email client, but a simple one. > > I just want it to connect to a specific email account and read the subject > line of messages coming from a certain email address. >

Re: Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread MRAB
On 2018-02-15 11:25, Chris Warrick wrote: On 15 February 2018 at 12:07, Sum J wrote: Below is my code. Here I want to read the "ip address" from s s= ''' Power On Enabled = On State: connected Radio Module: Unknown noise: -097 signalStrength: -046 ip address: 192.168.

Re: Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Sum J
Thanks Chris :) Its working now. Regards, Sumit On Thu, Feb 15, 2018 at 4:55 PM, Chris Warrick wrote: > On 15 February 2018 at 12:07, Sum J wrote: > > Below is my code. Here I want to read the "ip address" from s > > > > > > s= ''' > > Power On Enabled = On > > State: connected > >

Re: Python GIL vs CAS

2018-02-15 Thread Chris Angelico
On Fri, Feb 16, 2018 at 3:27 AM, Ned Batchelder wrote: > On 2/15/18 9:35 AM, Chris Angelico wrote: >> >> On Thu, Feb 15, 2018 at 2:40 PM, Oleg Korsak >> wrote: >>> >>> Hi. While hearing about GIL every time... is there any real reason why >>> CAS >>> doesn't help to solve this problem? >>> >>> ht

Re: What F strings should have been

2018-02-15 Thread Ian Kelly
On Wed, Feb 14, 2018 at 2:24 PM, D'Arcy Cain wrote: > A recent post by Terry Jan Reedy got me thinking about formatting. I > like the new(ish) format method for strings and I see some value in F > strings but it only works well with locals. Anything more starts > getting messier than format() an

Re: Python GIL vs CAS

2018-02-15 Thread Ned Batchelder
On 2/15/18 9:35 AM, Chris Angelico wrote: On Thu, Feb 15, 2018 at 2:40 PM, Oleg Korsak wrote: Hi. While hearing about GIL every time... is there any real reason why CAS doesn't help to solve this problem? https://en.wikipedia.org/wiki/Compare-and-swap Because the GIL is not a problem. It's a

How to benchmark a HTTP connection with requests module?

2018-02-15 Thread Etienne Robillard
Hi, Is it possible to emulate a range of concurrent connections to a http server with the requests module? import os import requests from test_support import unittest class HTTPBenchmarkTestCase(unittest.TestCase):     url = 'http://localhost/benchmark/'     def setUp(self):     pass

Re: "Programs" folder not found.

2018-02-15 Thread Andre Müller
Look in %localappdata%\Programs\Python Enerel Amgalan via Python-list schrieb am Do., 15. Feb. 2018 um 14:05 Uhr: > > Hello! So I downloaded “Python” program in C:>Users>(my > name)>AppData>Local>Programs>Python.And then in “Local” folder I can’t find > “Programs” folder,but it says it downloade

Re: Python GIL vs CAS

2018-02-15 Thread Chris Angelico
On Thu, Feb 15, 2018 at 2:40 PM, Oleg Korsak wrote: > Hi. While hearing about GIL every time... is there any real reason why CAS > doesn't help to solve this problem? > > https://en.wikipedia.org/wiki/Compare-and-swap Because the GIL is not a problem. It's a feature. Before you ask about solution

Re: Regex on a Dictionary

2018-02-15 Thread Andre Müller
Hello, this question also came up there: https://python-forum.io/Thread-Working-with-Dict-Object Greetings Andre -- https://mail.python.org/mailman/listinfo/python-list

Python GIL vs CAS

2018-02-15 Thread Oleg Korsak
Hi. While hearing about GIL every time... is there any real reason why CAS doesn't help to solve this problem? https://en.wikipedia.org/wiki/Compare-and-swap -- https://mail.python.org/mailman/listinfo/python-list

"Programs" folder not found.

2018-02-15 Thread Enerel Amgalan via Python-list
Hello! So I downloaded “Python” program in C:>Users>(my name)>AppData>Local>Programs>Python.And then in “Local” folder I can’t find “Programs” folder,but it says it downloaded in “Programs”.So can you help me. -- https://mail.python.org/mailman/listinfo/python-list

Re: Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Chris Warrick
On 15 February 2018 at 12:07, Sum J wrote: > Below is my code. Here I want to read the "ip address" from s > > > s= ''' > Power On Enabled = On > State: connected > Radio Module: Unknown > noise: -097 > signalStrength: -046 > ip address: 192.168.75.147 > subnet mask: 2

Re: Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Prahallad Achar
IPv4 address configured by DHCP It doesn't find key and value for above string. Solution.. Use one complete string per line On 15 Feb 2018 4:41 pm, "Sum J" wrote: Below is my code. Here I want to read the "ip address" from s s= ''' Power On Enabled = On State: connected Radio M

Getting "ValueError: need more than 1 value to unpack" while trying to read a value from dictionary in python

2018-02-15 Thread Sum J
Below is my code. Here I want to read the "ip address" from s s= ''' Power On Enabled = On State: connected Radio Module: Unknown noise: -097 signalStrength: -046 ip address: 192.168.75.147 subnet mask: 255.255.255.0 IPv4 address configured by DHCP Mac Addr: a

Re: What F strings should have been

2018-02-15 Thread D'Arcy Cain
On 02/15/18 02:56, Peter Otten wrote: >> class FSTR(str): >> def __call__(self, *args): >> return self.format(*args) >> >> And here is how it could be used. >> >> s = FSTR("ABC {1} {0} {2[x]}") > > This can be simplified to > > s = "ABC {1} {0} {2[x]}".format Hmm. Hadn't thought of that.

Re: Old format with %

2018-02-15 Thread Andre Müller
It can be escaped: "test %d %%" % 7 Terry Reedy schrieb am Mi., 14. Feb. 2018 um 20:53 Uhr: > On 2/14/2018 7:54 AM, ast wrote: > > Le 14/02/2018 à 13:46, ast a écrit : > >> Hello > >> > >> It seems that caracter % can't be escaped > >> > >> >>>"test %d %" % 7 > >> ValueError: incomplete format

Re: What F strings should have been

2018-02-15 Thread Peter Otten
D'Arcy Cain wrote: > A recent post by Terry Jan Reedy got me thinking about formatting. I > like the new(ish) format method for strings and I see some value in F > strings but it only works well with locals. Anything more starts > getting messier than format() and it is supposed to be cleaner.