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(
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
(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
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
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
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
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