Re: [sage-support] Re: Sorting a list of variables

2019-04-22 Thread slelievre
Mon 2019-04-22 21:08:55 UTC, G. M.-S.: > > > It works with strings: > > sage: natsorted(a,key=*lambda* z:str(z)) > > [x8, x9, x10, x11] > ... which can be simplified to sage: natsorted(a, key=str) -- You received this message because you are subscribed to the Google Groups

Re: [sage-support] Re: Sorting a list of variables

2019-04-22 Thread G. M.-S.
It works with strings: sage: natsorted(a,key=*lambda* z:str(z)) [x8, x9, x10, x11] Thank you to all of you for your help. On Mon, 22 Apr 2019 at 22:56, G. M.-S. wrote: > > So I got the tarball and it got installed but complaining still about SSL > (why?): > > $ ./sage --pip install

Re: [sage-support] Re: Sorting a list of variables

2019-04-22 Thread G. M.-S.
So I got the tarball and it got installed but complaining still about SSL (why?): $ ./sage --pip install /src/natsort-6.0.0.tar.gz pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Processing /src/natsort-6.0.0.tar.gz Installing collected

Re: [sage-support] Re: Sorting a list of variables

2019-04-22 Thread slelievre
Mon 2019-04-22 19:23:32 UTC, John H Palmieri: > > Alternatively, you should be able to download > a tar.gz file from https://pypi.org/project/natsort/#files, and then do > > ./sage --pip install /path/to/natsort-6.0.0.tar.gz Thanks for the reminder! I often forget one can download the tarball

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-22 Thread Nils Bruin
On Monday, April 22, 2019 at 12:31:14 PM UTC-7, John H Palmieri wrote: > > If you're willing to use the Sage command-line interface rather than the > notebook, then you might try the "screen" program, which should already be > installed on linux or Mac OS X. > And for graphical interfaces,

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-22 Thread John H Palmieri
If you're willing to use the Sage command-line interface rather than the notebook, then you might try the "screen" program, which should already be installed on linux or Mac OS X. You might remotely log in to the machine running Sage and then do "screen sage". Then you type in whatever commands

Re: [sage-support] Re: Sorting a list of variables

2019-04-22 Thread John H Palmieri
On Monday, April 22, 2019 at 11:03:48 AM UTC-7, slelievre wrote: > > Having defined > > sage: x = SR.var('x', 20) > sage: a = [x[11], x[8], x[10], x[9]] > > sorting by repr or by str is disappointing: > > sage: sorted(a, key=repr) > [x10, x11, x8, x9] > > sage: sorted(a,

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-22 Thread Daniel Friedan
I'm sorry if I came off as snarky. I really am sad to be losing this functionality of the SageMath notebook. It has served me well in several substantial (for me) calculations over the last 12 years or so. Of course I understand that scarcity of support resources justifies switching

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-22 Thread Nils Bruin
On Monday, April 22, 2019 at 11:13:23 AM UTC-7, Daniel Friedan wrote: > > One of the advantages of SageMath over Mathematica is SageMath's ability > to run a remote notebook without continuous network connection. The > Mathematica remote kernel requires continuous connection. It's sad that >

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-22 Thread Daniel Friedan
One of the advantages of SageMath over Mathematica is SageMath's ability to run a remote notebook without continuous network connection. The Mathematica remote kernel requires continuous connection. It's sad that SageMath is regressing to the level of Mathematica in this respect. Writing

Re: [sage-support] Re: Sorting a list of variables

2019-04-22 Thread slelievre
Having defined sage: x = SR.var('x', 20) sage: a = [x[11], x[8], x[10], x[9]] sorting by repr or by str is disappointing: sage: sorted(a, key=repr) [x10, x11, x8, x9] sage: sorted(a, key=str) [x10, x11, x8, x9] As Dima suggests, one can ./sage --pip install

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-22 Thread Nils Bruin
On Monday, April 22, 2019 at 5:56:42 AM UTC-7, Daniel Friedan wrote: > > The kernel is still running. The problem is not the culling of idle > notebooks. > > When I close the browser tab and then reopen the notebook, the kernel is > still running but output is lost and output from ongoing

Re: [sage-support] Re: Sorting a list of variables

2019-04-22 Thread G. M.-S.
Thank you, Dima. This does not work for me. I get $ ./sage --pip install natsort pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. I think I have to install openssl first. I shall give it a try later. Guillermo On Mon, 22 Apr 2019 at

[sage-support] Re: reconnect to remote sagemath jupyter notebook?

2019-04-22 Thread Daniel Friedan
The kernel is still running. The problem is not the culling of idle notebooks. When I close the browser tab and then reopen the notebook, the kernel is still running but output is lost and output from ongoing calculations does not appear. When the ongoing calculations are finished, I can

Re: [sage-support] Re: Sorting a list of variables

2019-04-22 Thread Dima Pasechnik
On Sun, Apr 21, 2019 at 11:36 PM G. M.-S. wrote: > > > Thank you very much, Nils. > > As I have a list of variables, I changed it to > > sorted(L, key=lambda v: (str(v)[:1],int(str(v)[1:]))) > > Another question: How can I get natsort? > from natsort import natsorted > gives > ImportError: No