Ask Your Question

Revision history [back]

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