[IPython-user] Trivial parallelisation

Jose Gómez-Dans jgomezdans@gmail....
Tue Dec 9 11:47:47 CST 2008


Hi Brian (and others),

I've been trying your suggestions (finally!) and found them really useful. I 
have however decided to add a small improvement

On Tuesday 02 December 2008 21:02:04 Brian Granger wrote:
> In [2]: mec = client.MultiEngineClient()
>
> In [3]: def doit(filename):
>    ...:     from crunch import CrunchData
>    ...:     cd = CrunchData()
>    ...:     return cd.process_file(filename)

crunch needs to be in your python path. If it is not, you can modify your 
definition of doit to:
 def doit(filename):
>    ...:     import sys
>    ...:     sys.path.insert(0,"/home/ucfajlg/Data/python/")
>    ...:     from crunch import CrunchData
>    ...:     cd = CrunchData()
>    ...:     return cd.process_file(filename)
	
Maybe someone finds it useful!

Thanks!
Jose


More information about the IPython-user mailing list