2005年04月14日 星期四 09:09
试试用sudo On 4/13/05, Meaglith Ma <meaglith.ma at mypress.com.cn> wrote: > > 我在一个程序中执行一个命令,使用os.system()。 > 但是这个命令是root才有权限执行的,所以我想切换用户到root再执行怎么办 > 我在前面加了一个os.system('su root'),然后再执行os.system('my command')也不可以。 > 请教怎么来做呢? > > ---------------------------------------- > 欢迎访问我的Blog: > http://spaces.msn.com/members/meaglith/ > > ---------------------------------------- > .--. > |o_o | > |:_/ | > // \ \ > (| | ) > /'\_ _/`\ > \___)=(___/ > ---------------------------------------- > 沧海笑 滔滔两岸潮 浮沉随浪记今朝 > 苍天笑 纷纷世上潮 谁负谁胜天知晓 > 江山笑 烟两遥 涛浪淘尽红尘俗也知多少 > 竟惹寂寥 一襟晚照 > 苍生笑 不再寂寥 豪情仍在痴痴笑笑 > > _______________________________________________ > python-chinese list > python-chinese at lists.python.cn > http://python.cn/mailman/listinfo/python-chinese > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050414/5207bde0/attachment.html
2005年04月14日 星期四 10:29
请问 google 的邮件列表的地址是什么啊? 我要把邮箱指向改到这里 致 礼! albertlee hanzhupeng at 163.com 2005-04-14
2005年04月14日 星期四 10:50
Gerald Lee,您好!
在 Debug 编译中应该有, 自己编译一个 python_d.lib
在源代码 object.h 里,可以找到:
#ifdef Py_REF_DEBUG
long _Py_RefTotal;
#endif
------------------------------
#ifdef Py_REF_DEBUG
/* Log a fatal error; doesn't return. */
void
_Py_NegativeRefcount(const char *fname, int lineno, PyObject *op)
{
char buf[300];
PyOS_snprintf(buf, sizeof(buf),
"%s:%i object at %p has negative ref count %i",
fname, lineno, op, op->ob_refcnt);
Py_FatalError(buf);
}
#endif /* Py_REF_DEBUG */
--------------------------------
void
_Py_Dealloc(PyObject *op)
{
destructor dealloc = op->ob_type->tp_dealloc;
_Py_ForgetReference(op);
(*dealloc)(op);
}
======== 2005-04-13 22:52:04 您在来信中写道: ========
哪位兄弟知道下面这几个函数定义在哪个lib库里面啊?
__Py_RefTotal()
__Py_NegativeRefcount()
__Py_Dealloc()
--
My Blog >> http://leejd.cndev.org
My QQ >> 9847243
= = = = = = = = = = = = = = = = = = = = = =
致
礼!
albertlee
hanzhupeng at 163.com
2005-04-14
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20050414/bed9112b/attachment.htm
Zeuux © 2025
京ICP备05028076号