[Tutor] 答复: One basic question about the Python's PID of Process object.

Han Guanghua guanghua.han at huawei.com
Tue Aug 30 02:29:29 CEST 2011


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.com at python.org [mailto:tutor-bounces+guanghua.han=huawei.com at python.org] 代表 Lisi
发送时间: 2011年8月29日 17:12
收件人: tutor at 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 at python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list