Hi,
I recently installed Quixote 1.0 and am unable to import ptl files. For
example I created a simple ptl function:
def test [plain]():
'Testing'
After importing quixote.enable_ptl and calling it, I attempt to import
my test function from the python shell. The result I get is an
AttributeError. Here is the traceback:
>>> from ptltest import test
Traceback (most recent call last):
File "", line 1, in -toplevel-
from ptltest import test
File "C:\PYTHON23\Lib\ihooks.py", line 398, in import_module
q, tail = self.find_head_package(parent, str(name))
File "C:\PYTHON23\Lib\ihooks.py", line 434, in find_head_package
q = self.import_it(head, qname, parent)
File "C:\PYTHON23\Lib\ihooks.py", line 489, in import_it
m = self.loader.load_module(fqname, stuff)
File "c:\Python23\Lib\site-packages\quixote\ptl_import.py", line 107,
in load_module
return _load_ptl(name, filename, file)
File "c:\Python23\Lib\site-packages\quixote\ptl_import.py", line 72,
in _load_ptl
code = compile_template(file, filename, output)
File "c:\Python23\Lib\site-packages\quixote\ptl_compile.py", line
286, in compile_template
template.compile()
File "c:\Python23\lib\compiler\pycodegen.py", line 116, in compile
self.code = gen.getCode()
File "c:\Python23\lib\compiler\pycodegen.py", line 245, in getCode
return self.graph.getCode()
File "c:\Python23\lib\compiler\pyassem.py", line 371, in getCode
self.convertArgs()
File "c:\Python23\lib\compiler\pyassem.py", line 477, in convertArgs
self.insts[i] = opname, conv(self, oparg)
File "c:\Python23\lib\compiler\pyassem.py", line 513, in
_convert_LOAD_CONST
arg = arg.getCode()
File "c:\Python23\lib\compiler\pycodegen.py", line 245, in getCode
return self.graph.getCode()
File "c:\Python23\lib\compiler\pyassem.py", line 375, in getCode
return self.newCodeObject()
File "c:\Python23\lib\compiler\pyassem.py", line 600, in newCodeObject
return new.code(argcount, nlocals, self.stacksize, self.flags,
AttributeError: 'module' object has no attribute 'code'
I am running python 2.3.3 and quixote 1.0. I am probably missing
something simple, but I can't figure it out. Any ideas?