I'm just learning python. After changed it to a non-OOP program, it
works.
Thank you all for suggestions :)
On Mar 8, 1:38 pm, Benjamin Kaplan wrote:
> Is there any particular reason you're using processes and not threads?
> Functions that wait for stuff to happen in C land, such as I/O calls,
>
On Mon, Mar 7, 2011 at 7:47 PM, Vincent Ren wrote:
> Got it, thanks.
> But what should I do if I want to improve the efficiency of my
> program?
>
Is there any particular reason you're using processes and not threads?
Functions that wait for stuff to happen in C land, such as I/O calls,
release t
Got it, thanks.
But what should I do if I want to improve the efficiency of my
program?
On Mar 8, 11:37 am, Robert Kern wrote:
> I'm afraid his response applies to this as well: you can't pass methods to
> pool.map() or any other such communication channel to your subprocesses.
--
http://mail
On 3/7/11 3:27 PM, Vincent Ren wrote:
On Mar 7, 9:21 pm, Jean-Michel Pichavant
wrote:
It's a mistake many beginners do, I don't understand why, but it's a
very common thing. RTFM should stand for "Read The Formidable (error)
Message" as well.
Your url is invalid, check your url definition.
JM
On Mar 7, 9:21 pm, Jean-Michel Pichavant
wrote:
> It's a mistake many beginners do, I don't understand why, but it's a
> very common thing. RTFM should stand for "Read The Formidable (error)
> Message" as well.
> Your url is invalid, check your url definition.
>
> JM
I've fixed that problem. Bu
Vincent Ren wrote:
Hello, everyone, recently I am trying to learn python's
multiprocessing, but
I got confused as a beginner.
[SNIP]
httplib.InvalidURL: nonnumeric port: ''
Regards
Vincent
It's a mistake many beginners do, I don't understand why, but it's a
very common thing. RTFM should
I've got some new problems and I tried to search on Google but got no
useful information.
I want to download some images with multiprocessing.pool
In my class named Renren, I defined two methods:
def getPotrait(self, url):
# get the current potraits of a friend on Renren.com
Got it.
After putting commas, it works (The 'o' was a mistake when I posted,
sorry about it ).
Thanks to all of you :)
On Mar 5, 5:12 pm, Dennis Lee Bieber wrote:
> On Fri, 4 Mar 2011 20:08:21 -0800 (PST), Vincent Ren
> declaimed the following in
> gmane.comp.python.general:
>
> > Hello, every
> otasks = [
> ...
> print pool.map(f, tasks)
You are running the maps on "tasks" while the list of URLs is called otasks
(unless there's any error in the cut&paste).
HTH,
--
Miki
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 4, 2011, at 11:08 PM, Vincent Ren wrote:
> Hello, everyone, recently I am trying to learn python's
> multiprocessing, but
> I got confused as a beginner.
>
> If I run the code below:
>
> from multiprocessing import Pool
> import urllib2
> otasks = [
> 'http://www.php.net'
> 'http
Hello, everyone, recently I am trying to learn python's
multiprocessing, but
I got confused as a beginner.
If I run the code below:
from multiprocessing import Pool
import urllib2
otasks = [
'http://www.php.net'
'http://www.python.org'
'http://www.perl.org'
'http://www.gnu.org
11 matches
Mail list logo