helping with unicode

2012-07-02 Thread self.python
it's a simple source view program. the codec of the target website is utf-8 so I read it and print the decoded -- #-*-coding:utf8-*- import urllib2 rf=urllib2.urlopen(r"http://gall.dcinside.com/list.php?id=programming";) print rf.read(

how to interact with Windows cmd?

2012-07-04 Thread self.python
what I want to do is 1.open cmd 2.waiting for user's typing 3.when I type "dir" 4.print the result of "dir" 5.then I type some other commands, printing the result until I type 'exit' I used p=subprocess.Popen('cmd',stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=True) p=c

why greenlet, gevent or the stackless are needed?

2012-07-07 Thread self.python
(I'm very new to this coroutine part so It's not supposed to attack these modules, just I don't know the differences) atfer version 2.5, python officially support coroutine with yield. and then, why greenlet, gevent, Stackless python are still useful? it there somthing that "yield" can't do or ju

Re: why greenlet, gevent or the stackless are needed?

2012-07-07 Thread self.python
r 2012년 7월 7일 토요일 오후 4시 33분 26초 UTC+9, Devin Jeanpierre 님의 말: > On Sat, Jul 7, 2012 at 3:09 AM, self.python wrote: > > it there somthing that "yield" can't do > > or just it is easier or powerful? > > couroutine-like generators can't give up control flow

how can I make it work?

2012-07-08 Thread self.python
it's a finder using threading to accelerate but it never works.. and I have no idea why it doesn't work:( it doesn't work too after changing threading to multiprocessing.. how can I make it work? or at least I know what's the problem... plz help the poor newbie... import os,threading,multipr

Re: how can I make it work?

2012-07-08 Thread self.python
2012년 7월 9일 월요일 오전 11시 2분 41초 UTC+9, self.python 님의 말: > it's a finder using threading to accelerate but it never works.. > and I have no idea why it doesn't work:( > it doesn't work too after changing threading to multiprocessing.. > how can I make it work? or at leas

Re: how can I make it work?

2012-07-08 Thread self.python
2012년 7월 9일 월요일 오전 11시 41분 32초 UTC+9, self.python 님의 말: > 2012년 7월 9일 월요일 오전 11시 2분 41초 UTC+9, self.python 님의 말: > > it's a finder using threading to accelerate but it never works.. > > and I have no idea why it doesn't work:( > > it doesn't work too after c