diff --git a/bindings/python/ns3modulescan.py b/bindings/python/ns3modulescan.py index a116732a8..a89176dcc 100644 --- a/bindings/python/ns3modulescan.py +++ b/bindings/python/ns3modulescan.py @@ -253,7 +253,7 @@ class MyPygenClassifier(PygenClassifier): def ns3_module_scan(top_builddir, pygen_file_name, everything_h, cflags): - ns3_modules = eval(sys.stdin.read()) + ns3_modules = eval(sys.stdin.readline()) ## do a topological sort on the modules graph from topsort import topsort diff --git a/bindings/python/wscript b/bindings/python/wscript index 6aa044384..68f7fe40b 100644 --- a/bindings/python/wscript +++ b/bindings/python/wscript @@ -437,7 +437,7 @@ class python_scan_task(Task.TaskBase): self.cflags, ] scan = subprocess.Popen(argv, stdin=subprocess.PIPE) - scan.stdin.write(repr(get_modules_and_headers(self.bld))) + print >> scan.stdin, repr(get_modules_and_headers(self.bld)) scan.stdin.close() retval = scan.wait() return retval