> > Since this is my first question to the list, is it appropriate to reply
> > with a "thanks, that solved it" or is that considered unnecessary?
>
> Its not necessary but its not frowned on either. It is most useful where
> numerous different options are being suggested since it indicates to
> f
On 01/06/12 00:18, Dave wrote:
Thanks. I like the integer-based option.
Since this is my first question to the list, is it appropriate to reply
with a "thanks, that solved it" or is that considered unnecessary?
Its not necessary but its not frowned on either. It is most useful where
numerous
Thanks. I like the integer-based option.
Since this is my first question to the list, is it appropriate to reply
with a "thanks, that solved it" or is that considered unnecessary?
On Thu, May 31, 2012 at 6:30 PM, Emile van Sebille wrote:
> On 5/31/2012 3:21 PM Dave said...
>
> Hi. What is the
On 5/31/2012 3:21 PM Dave said...
Hi. What is the right way to have an iPython script check to see if the
user is currently root?
Googling for "python check if user is root" yields the answer:
import os, sys
# if not root...kick out
if not os.geteuid()==0:
sys.exit("\nOnly root can run t
On Thu, 31 May 2012 18:21:22 -0400
Dave wrote:
> Hi. What is the right way to have an iPython script check to see if
> the user is currently root?
>
> Here's how I do it in bash scripts:
>
>
> ## CHECK USERNAME PRIVILEGE
>
>
> if [ $(i
On 31/05/12 23:21, Dave wrote:
Hi. What is the right way to have an iPython script check to see if the
user is currently root?
I don;t know anything much about ipython but so far as IO know its just
a shell on standard python so:
os.getuid()
should work.
In general if you are trying to repl
Hi. What is the right way to have an iPython script check to see if the
user is currently root?
Here's how I do it in bash scripts:
## CHECK USERNAME PRIVILEGE
if [ $(id -u) != "0" ];then
echo "This script must be run as root."