[IronPython] Problem with ScriptSource.GetCodeProperties()

Michael Foord michael at voidspace.org.uk
Mon Jun 14 00:30:54 CEST 2010


Hello all,

IronPython 2.6.1:

 >>> import clr
 >>> clr.AddReference('IronPython')
 >>> clr.AddReference('Microsoft.Scripting')
 >>> from IronPython.Hosting import Python
 >>> from Microsoft.Scripting import SourceCodeKind
 >>> engine = Python.CreateEngine()
 >>> scope = engine.CreateScope()
 >>> text = 'lambda'
 >>> source = engine.CreateScriptSourceFromString(text, 'stdin', 
SourceCodeKind.InteractiveCode)
 >>> result = source.GetCodeProperties()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Value cannot be null.
Parameter name: parameters

If instead of 'stdin' I use '<stdin>' like I used to it throws for that 
as well.

All the best,

Michael Foord

-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.





More information about the Ironpython-users mailing list