On 27/05/2016 02:51 μμ, Steven D'Aprano wrote:
> On Fri, 27 May 2016 10:24 pm, Pavlos Parissis wrote:
>
>> Hi,
>>
>> So, we have ConnectionRefusedError in Python3 but not in Python2.
>> Six module doesn't provide a wrapper about this.
>>
>> What
Hi,
So, we have ConnectionRefusedError in Python3 but not in Python2.
Six module doesn't provide a wrapper about this.
What is most efficient way to handle this situation in a try-catch block?
Cheers,
Pavlos
signature.asc
Description: OpenPGP digital signature
--
https://mail.python.org/mail
On 16/05/2016 12:59 πμ, Chris Angelico wrote:
> On Mon, May 16, 2016 at 8:32 AM, Pavlos Parissis
> wrote:
>>> Searching the CPython sources for that exception shows one hit:
>>> selectors.py, where it converts a file object to an integer file
>>> descriptor. (You
On 16/05/2016 12:08 πμ, Chris Angelico wrote:
> On Mon, May 16, 2016 at 1:49 AM, Pavlos Parissis
> wrote:
>> I use subprocess.check_output like this:
>>
>> cmd = [
>> '/sbin/ip',
>> 'address',
>> 'show'
Hi,
I get intermittent ValueErrors[1] from subprocess when I check if an IP
is assigned to loopback interface by running:
/sbin/ip address show dev lo to 10.52.12.2/32
I use subprocess.check_output like this:
cmd = [
'/sbin/ip',
'address',
'show',
'dev',
"{}".format(self.con
Hi,
I am trying to write UNIX socket client which sends 1 cmd
and saves the received data to a file.
Based on what I found on documentation I came up with::
import asyncio
class UnixProtocol(asyncio.Protocol):
def __init__(self, loop):
self.cmd = 'show stat\n'
self.loop = loop
On 15/12/2015 06:55 μμ, Ian Kelly wrote:
> On Tue, Dec 15, 2015 at 10:43 AM, Pavlos Parissis
> wrote:
>>> If you want your metrics container to act like a dict, then my
>>> suggestion would be to just use a dict, with pseudo-collections for
>>> the values as abo
On 15/12/2015 06:22 μμ, Ian Kelly wrote:
> On Tue, Dec 15, 2015 at 9:20 AM, Pavlos Parissis
> wrote:
>> On 15/12/2015 05:11 μμ, Ian Kelly wrote:
>>> On Tue, Dec 15, 2015 at 8:49 AM, Pavlos Parissis
>>> wrote:
>>>> Hi,
>>>>
>>>>
On 15/12/2015 05:18 μμ, Pavlos Parissis wrote:
> On 15/12/2015 05:08 μμ, Peter Otten wrote:
>> Pavlos Parissis wrote:
>>
>>> I need to store values for metrics and return the average for some
>>> and the sum for the rest. Thus, I thought I could extend
>>&
On 15/12/2015 05:11 μμ, Ian Kelly wrote:
> On Tue, Dec 15, 2015 at 8:49 AM, Pavlos Parissis
> wrote:
>> Hi,
>>
>> I need to store values for metrics and return the average for some
>> and the sum for the rest. Thus, I thought I could extend
>> collections.Cou
On 15/12/2015 05:08 μμ, Peter Otten wrote:
> Pavlos Parissis wrote:
>
>> I need to store values for metrics and return the average for some
>> and the sum for the rest. Thus, I thought I could extend
>> collections.Counter class by returning averages for some keys.
>
Hi,
I need to store values for metrics and return the average for some
and the sum for the rest. Thus, I thought I could extend
collections.Counter class by returning averages for some keys.
My class modifies the update() to increment a counter and the
__getitem__ to perform the calculation. But,
On 25/11/2015 11:07 πμ, Peter Otten wrote:
> Pavlos Parissis wrote:
>
>> Hi,
>>
>> Do you see any possible dangerous hidden bug in the below code(using
>> python2.7 and python3.4)?
>>
>> My goal is to avoid go through the metrics list twice. But, I don
Hi,
Do you see any possible dangerous hidden bug in the below code(using
python2.7 and python3.4)?
My goal is to avoid go through the metrics list twice. But, I don't
know if there will be a problem with doing in place replace of list
elements using 2 generators.
# metrics = ['', '0', '10']
14 matches
Mail list logo