fix some broken things from syntax conversion
--HG-- branch : trunk
This commit is contained in:
parent
fb365e47dc
commit
4369c65790
|
@ -18,6 +18,6 @@ def main():
|
||||||
try:
|
try:
|
||||||
location = mod.__file__
|
location = mod.__file__
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
sys.stderr.write("module (has no __file__): " + mod)
|
sys.stderr.write("module (has no __file__): " + str(mod))
|
||||||
else:
|
else:
|
||||||
print(location)
|
print(location)
|
||||||
|
|
|
@ -34,7 +34,7 @@ class TestThreadOut:
|
||||||
defaults = []
|
defaults = []
|
||||||
def f(l):
|
def f(l):
|
||||||
out.setwritefunc(l.append)
|
out.setwritefunc(l.append)
|
||||||
print(id(l))
|
sys.stdout.write(str(id(l)))
|
||||||
out.delwritefunc()
|
out.delwritefunc()
|
||||||
print(1)
|
print(1)
|
||||||
out.setdefaultwriter(defaults.append)
|
out.setdefaultwriter(defaults.append)
|
||||||
|
@ -46,7 +46,7 @@ class TestThreadOut:
|
||||||
pool.dispatch(f, l)
|
pool.dispatch(f, l)
|
||||||
pool.shutdown()
|
pool.shutdown()
|
||||||
for name, value in out.__dict__.items():
|
for name, value in out.__dict__.items():
|
||||||
sys.stderr.write("%s: %s\n" %(name, value))
|
sys.stderr.write("%s: %s" %(name, value))
|
||||||
pool.join(2.0)
|
pool.join(2.0)
|
||||||
for i in range(num):
|
for i in range(num):
|
||||||
item = listlist[i]
|
item = listlist[i]
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
import sys
|
||||||
from py.xml import Namespace, Tag
|
from py.xml import Namespace, Tag
|
||||||
from py.__.xmlobj.visit import SimpleUnicodeVisitor
|
from py.__.xmlobj.visit import SimpleUnicodeVisitor
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue