Message-ID: <4UY08a$gTF@newsmth.net>
Subject: ����subprocess������
Date: Tue, 19 Jun 2007 04:55:00 +0000
From: fylzd@newsmth.net-SPAM.no (夜���源�)
Path: news.cnusenet.org!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-cn.bbs.comp.lang.python.mbox.zip!g2news1.google.com!news2.google.com!newshub.sdsu.edu!newsgate.cuhk.edu.hk!news.szu.edu.cn!news.uestc.edu.cn!news.newsmth.net!NEWSMTH
Newsgroups: cn.bbs.comp.lang.python
Organization: 水木����
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Python/y/M.1182228900.u0
Xref: news.cnusenet.org cn.bbs.comp.lang.python:37694

Linux�拢�
cpp����写��一�����颍�����丝�执���募�aa
����������aa.cpp----
#include <iostream>
int main()
{
    for(int i=0;i<10;i++)
       {
        for(long int j=0;j<399999000;j++)
            {   //����胤���要�����一����么�印�亩�����么���印����
                 int k=10;
                 k*=(k+j);
            }
          std::cout << "Hello, C++ World!\n";    
       }
}

�����������牵���wxPython写�慕��������一����钮��一���谋���
���诘����钮��时�����锌�执���募�aa,然���aa���������诺��谋����校�������实��C��������艽�����亩�����时时�测)���跃��,每��C������������直��������谋���

��������subprocess模�,��
self.textCtrl1.SetValue(subprocess.Popen(dd,bufsize=7,stdout=subprocess.PIPE).communicate()[0])
���������慕���牵��������械�时�颍����������一���募���������������螅����一���臃诺����谋����小�����实时��������
���指��指�,��么�馨�C������������实时��������谋����校�����遣��薷�C��������

��������谋���也���裕�直�哟蚩�shell���呀��实时�������shell����也���浴���windows�拢����院芊���拇�一��dos���冢��呀�������dos�����校�������linux�拢�����么���薹���一��shell�兀���Popen���������械�shell=True也�����浴�

����������������������������������������������
�揖�����Linux�拢���wxPYthon写�慕����系��一����钮������一����执�谐��颍�执�谐�����������实时�������������������实时�姆���一���谋����校����实�诓��校�直�哟�一��shell���也���浴�
��么���兀����撕枚����恕�



--

�� ��源:��水木���� http://newsmth.net��[FROM: 159.226.36.90]