cmullins7 / pyscripter

Automatically exported from code.google.com/p/pyscripter
0 stars 0 forks source link

Parallel Python Does not run In Pyscripter #282

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run Parallel Python Code

Sample:
-------
import pp

def prn(msg):
    import time
    time.sleep(3)
    print msg
    return True

msgs = ["bort", "gort", "zort", "mort"]
job_server = pp.Server(2)
jobs = [(message, job_server.submit(prn, (message,))) for message in msgs]
for message, job in jobs:
    job()
-------

What is the expected output? What do you see instead?
Expected output:
bort
gort
zort
mort

Pyscripter outputs:
Literal for int() is: "  "
Traceback (most recent call last):
  File "\\kogntbk1\d$\dev\pp\new_test.py", line 10, in <module>
    job_server = pp.Server(2)
  File "C:\Python25\lib\site-packages\pp.py", line 294, in __init__
    self.set_ncpus(ncpus)
  File "C:\Python25\lib\site-packages\pp.py", line 448, in set_ncpus
    range(ncpus - len(self.__workers))])
  File "C:\Python25\lib\site-packages\pp.py", line 135, in __init__
    self.pid = int(self.t.receive())
  File "C:\Python25\lib\site-packages\pptransport.py", line 123, in receive
    msg_len = int(s)
ValueError: invalid literal for int() with base 10: ''

What version of the product are you using? On what operating system?
Version 1.9.9.4 (however reports 1.9.9.3 from about window???)
OS: Windows XP

This issue was on all previous versions of Pyscripter I had tried from
1.9.9.2 IIRC

Please provide any additional information below.
There is no issue when I run the same code in IDLE and some other IDEs

Original issue reported on code.google.com by rjkers...@gmail.com on 5 Feb 2009 at 11:13

GoogleCodeExporter commented 9 years ago
Works fine with the remote engine, but locks up with the internal engine which 
is
expected.
Tested with pp-1.5.7 and PyScripter 1.9.9.7 (forthcoming) should work with 
1.9.9.6.

Original comment by pyscripter on 19 May 2009 at 1:50