Parallel Python
Is your Python knowledge up to date? Shop for Python books on Amazon.
Parallel Python Community Forums rss  
November 28, 2015, 08:34:41 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Parallel python forum is up and running!
   Home   Help Search Login Register  
Pages: [1]
Author Topic: subprocess  (Read 5117 times)
0 Members and 1 Guest are viewing this topic.
Full Python

Karma: 1
Posts: 16

View Profile
« on: August 22, 2011, 04:28:33 AM »

I am trying to use the subprocess module in the standard library without luck For example:

import pp

def myfunc():"hostname")

if __name__ == "__main__":

    job_server = pp.Server()
    j = job_server.submit(myfunc, modules=("subprocess",))

This gives the error:

Exception in thread run_local:
Traceback (most recent call last):
  File "/usr/lib/python2.6/", line 525, in __bootstrap_inner
  File "/usr/lib/python2.6/", line 477, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.6/dist-packages/", line 721, in _run_local
UnboundLocalError: local variable 'sresult' referenced before assignment

I know that the error in PP will be fixed in the next version (,com_smf/Itemid,29/topic,604.0), but it also seems like PP clients cant spawn new processes. I guess this may also affect multiprocessing and threading modules as well.
Pages: [1]
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Nutrition facts and analysis