Thanks for your help. Now I think I found the reason why os.getpid() returns the same PID value for the Process object, because Process object is NOT the standard Python's process which is adapted by a library called SimPy.(Simulation with Python).
BRs, Han / Henrry -----邮件原件----- 发件人: tutor-bounces+guanghua.han=huawei....@python.org [mailto:tutor-bounces+guanghua.han=huawei....@python.org] 代表 Lisi 发送时间: 2011年8月29日 17:12 收件人: tutor@python.org 主题: Re: [Tutor] One basic question about the Python's PID of Process object. On Monday 29 August 2011 07:17:51 Han Guanghua wrote: > 2. Second question: When I changed the os.getpid() to os.getppid() or > self. _pid, the Python’s interpreter generates some error message like > “Customer object has no attribute ‘_pid’”. > > I'm very much a beginner myself, but I am sure that someone will correct me if I am wrong. Should it not be self.pid rather than self._pid? Lisi _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor