Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

get current username on the server side

I am writing a code that I will put on the server side of SAGE/notebook (i.e. in the SAGE_PATH, not locally in a sheet or attached to a sheet. I want this code to know the name of the user launching it, how can I have it?

get current username on the server side

I am writing a code that I will put on the server side of SAGE/notebook (i.e. in the SAGE_PATH, not locally in a sheet or attached to a sheet. sheet). I want this code to know the name of the user launching it, how can I have it?

get current username on the server side

I am writing a code that I will put on the server side of SAGE/notebook (i.e. in the SAGE_PATH, not locally in a sheet or attached to a sheet). I want this code to know the name of the user launching it, how can I have it?

following this forum, I found an ugly way to do it:

DATA.split('/home/sageservice/nbfiles.sagenb/home/')[0].split('sage_notebook.sagenb/home/')[1].split('/')[0]

tell me if you have better

get current username on the server side

I am writing a code that I will put on the server side of SAGE/notebook (i.e. in the SAGE_PATH, not locally in a sheet or attached to a sheet). I want this code to know the name of the user launching it, how can I have it?

following this forumhttp://https://groups.google.com/forum/?fromgroups=#!topic/sage-notebook/aBd1ATWFIKc , I found an ugly way to do it:

DATA.split('/home/sageservice/nbfiles.sagenb/home/')[0].split('sage_notebook.sagenb/home/')[1].split('/')[0]

tell me if you have better