Re: Basic python question

2019-10-02 Thread Jagga Soorma
Thanks again Aldwin. This seems to work, guess it is the set that is flipping the numbers: x,y = (output.split()) Much appreciated! On Wed, Oct 2, 2019 at 9:19 PM Aldwin Pollefeyt wrote: > > Seems to work also: > > >>> [x,y] = output.split() > > On Thu, Oct 3, 2019 at 12:17 PM Aldwin Pollefeyt

Re: Basic python question

2019-10-02 Thread Aldwin Pollefeyt
Seems to work also: >>> [x,y] = output.split() On Thu, Oct 3, 2019 at 12:17 PM Aldwin Pollefeyt wrote: > Oh, sorry .. please try this: > > >>> x,y = tuple(output.split()) > > On Thu, Oct 3, 2019 at 12:11 PM Jagga Soorma wrote: > >> Thanks Aldwin that helps but it looks like it is reversing the

Re: Basic python question

2019-10-02 Thread Aldwin Pollefeyt
Oh, sorry .. please try this: >>> x,y = tuple(output.split()) On Thu, Oct 3, 2019 at 12:11 PM Jagga Soorma wrote: > Thanks Aldwin that helps but it looks like it is reversing the numbers > for some reason: > > the df command returns the following: > 7 2 > > I used your example and did: > x,y =

Re: Basic python question

2019-10-02 Thread Jagga Soorma
Thanks Aldwin that helps but it looks like it is reversing the numbers for some reason: the df command returns the following: 7 2 I used your example and did: x,y = set(output.split()) My assumption would be that x should be 7 and y should be 2. However, when I print x and y it seems to be rev

Re: Basic python question

2019-10-02 Thread Aldwin Pollefeyt
You could use: >>> x, y = set(output.split()) On Thu, Oct 3, 2019 at 11:44 AM Jagga Soorma wrote: > Hello, > > I am new to python and trying to do some basic things with python. I > am writing a script that runs a df command and I need parts of that > output saved in 2 different variables. Is

Basic python question

2019-10-02 Thread Jagga Soorma
Hello, I am new to python and trying to do some basic things with python. I am writing a script that runs a df command and I need parts of that output saved in 2 different variables. Is this something that can be done? I can do this by running multiple df commands but would prefer to make only

Re: ipython in different loctions.

2019-10-02 Thread Hongyi Zhao
On Thu, 03 Oct 2019 10:19:23 +1000, Cameron Simpson wrote: > bash -x ~/.pyenv/shims/ipython3 > > and see what its final command does. Tried as follows: - werner@localhost:~$ bash -x ~/.pyenv/shims/ipython3 + set -e + '[' -n '' ']' + program=ipython3 + [[ ipython3 = \p\y\t\h\o\

Re: ipython in different loctions.

2019-10-02 Thread Cameron Simpson
On 02Oct2019 07:37, Hongyi Zhao wrote: I noticed that the ipython on my Debian box located in the following locations: werner@localhost:~$ ls .local/bin/ipython* .local/bin/ipython .local/bin/ipython3 werner@localhost:~$ ls .pyenv/shims/ipython* .pyenv/shims/ipython .pyenv/shims/ipython3 I

Re: pathlib

2019-10-02 Thread DL Neil via Python-list
On 3/10/19 12:42 AM, Dan Sommers wrote: On 10/2/19 4:14 AM, DL Neil via Python-list wrote: In the case that sparked this enquiry, and in most others, there is no need for a path that doesn't actually lead somewhere. The paths that are used, identify files, open them, rename them, create directo

Re: pathlib

2019-10-02 Thread DL Neil via Python-list
On 3/10/19 3:07 AM, Rhodri James wrote: On 02/10/2019 09:14, DL Neil via Python-list wrote: That said, it is one of the ways that a path can be shown to transition from some 'pure' state to become 'concrete'. However, A.N.Other has suggested that I might be mis-applying the word "concrete", s

Re: pathlib

2019-10-02 Thread DL Neil via Python-list
On 3/10/19 6:25 AM, Barry Scott wrote: On 2 Oct 2019, at 09:14, DL Neil via Python-list mailto:python-list@python.org>> wrote: On 2/10/19 12:52 AM, Rhodri James wrote: On 01/10/2019 06:03, DL Neil via Python-list wrote: On 30/09/19 9:28 PM, Barry Scott wrote: On 30 Sep 2019, at 05:40, DL Neil

Re: pathlib

2019-10-02 Thread Barry Scott
> On 2 Oct 2019, at 09:14, DL Neil via Python-list > wrote: > > On 2/10/19 12:52 AM, Rhodri James wrote: >> On 01/10/2019 06:03, DL Neil via Python-list wrote: >>> On 30/09/19 9:28 PM, Barry Scott wrote: > On 30 Sep 2019, at 05:40, DL Neil via Python-list > wrote: > > Shoul

Re: pymysql.err.InterfaceError after some hours of usage

2019-10-02 Thread Νίκος Βέργος
Τη Τετάρτη, 2 Οκτωβρίου 2019 - 7:11:52 μ.μ. UTC+3, ο χρήστης Inada Naoki έγραψε: > 2019年10月3日(木) 0:56 Νίκος Βέργος : > > > Τη Τετάρτη, 2 Οκτωβρίου 2019 - 8:26:38 π.μ. UTC+3, ο χρήστης Inada Naoki > > έγραψε: > > > MySQL connection can be closed automatically by various reasons. > > > For example,

Re: pymysql.err.InterfaceError after some hours of usage

2019-10-02 Thread Inada Naoki
2019年10月3日(木) 0:56 Νίκος Βέργος : > Τη Τετάρτη, 2 Οκτωβρίου 2019 - 8:26:38 π.μ. UTC+3, ο χρήστης Inada Naoki > έγραψε: > > MySQL connection can be closed automatically by various reasons. > > For example, `wait_timeout` is the most common but not only reason for > > closing the connection. > > > >

Re: pymysql.err.InterfaceError after some hours of usage

2019-10-02 Thread Νίκος Βέργος
Τη Τετάρτη, 2 Οκτωβρίου 2019 - 8:26:38 π.μ. UTC+3, ο χρήστης Inada Naoki έγραψε: > MySQL connection can be closed automatically by various reasons. > For example, `wait_timeout` is the most common but not only reason for > closing the connection. > > You should connect and close MySQL connection f

Re: pathlib

2019-10-02 Thread Rhodri James
On 02/10/2019 09:14, DL Neil via Python-list wrote: That said, it is one of the ways that a path can be shown to transition from some 'pure' state to become 'concrete'. However, A.N.Other has suggested that I might be mis-applying the word "concrete", so maybe not. On which topic, I went looki

Re: pathlib

2019-10-02 Thread Dan Sommers
On 10/2/19 4:14 AM, DL Neil via Python-list wrote: In the case that sparked this enquiry, and in most others, there is no need for a path that doesn't actually lead somewhere. The paths that are used, identify files, open them, rename them, create directories, etc. The idea of a path that just '

Re: Recursive method in class

2019-10-02 Thread ast
Le 02/10/2019 à 12:22, Richard Damon a écrit : On 10/2/19 1:12 AM, ast wrote: Le 01/10/2019 à 20:56, Timur Tabi a écrit : Could you please fix your email software so that it shows a legitimate email address in the From: line?  Your emails all show this: From: ast All of your emails are

Re: Recursive method in class

2019-10-02 Thread Chris Angelico
On Wed, Oct 2, 2019 at 9:01 PM David wrote: > > On Wed, 2 Oct 2019 at 15:15, ast wrote: > > Le 01/10/2019 à 20:56, Timur Tabi a écrit : > > > > Could you please fix your email software so that it shows a legitimate > > > email address in the From: line? > > > I choose: ast.donotans...@gmail.com >

Re: Recursive method in class

2019-10-02 Thread David
On Wed, 2 Oct 2019 at 15:15, ast wrote: > Le 01/10/2019 à 20:56, Timur Tabi a écrit : > > Could you please fix your email software so that it shows a legitimate > > email address in the From: line? > I choose: ast.donotans...@gmail.com Hi ast, Please look here to see how your email looks on gm

Re: Recursive method in class

2019-10-02 Thread Richard Damon
On 10/2/19 1:12 AM, ast wrote: > Le 01/10/2019 à 20:56, Timur Tabi a écrit : >> Could you please fix your email software so that it shows a legitimate >> email address in the From: line?  Your emails all show this: >> >> From: ast >> >> All of your emails are being caught in my spam filter be

Re: pathlib

2019-10-02 Thread DL Neil via Python-list
On 2/10/19 12:52 AM, Rhodri James wrote: On 01/10/2019 06:03, DL Neil via Python-list wrote: On 30/09/19 9:28 PM, Barry Scott wrote: On 30 Sep 2019, at 05:40, DL Neil via Python-list wrote: Should pathlib reflect changes it has made to the file-system? I think it should not. The term "co

ipython in different loctions.

2019-10-02 Thread Hongyi Zhao
Hi, I noticed that the ipython on my Debian box located in the following locations: werner@localhost:~$ ls .local/bin/ipython* .local/bin/ipython .local/bin/ipython3 werner@localhost:~$ ls .pyenv/shims/ipython* .pyenv/shims/ipython .pyenv/shims/ipython3 And, they are different: we

Re: python socket dns query will get the correct result while the dig will not.

2019-10-02 Thread Manfred Lotz
On Wed, 2 Oct 2019 04:27:14 + (UTC) Hongyi Zhao wrote: > Hi, > > See my following test: > > With ipython: > > In [1]: import > socket > > In [2]: socket.gethostbyname > ('www.vpngate.net') > Out[2