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 replace bash with python look at the os, shutil, glob, os.path modules as a first port of call. hth -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor