0

How do you get the XML documentation strings from .NET assemblies using IronPython? Using '_doc_' doesn't seem to be the way.

MessageBox.Show(Label().Bottom.__doc__) returns "Represents a 32bit signed integer."

How do I get the actual doc string, which should be "get the distance, in pixels, between the bottom edge..."

5
  • Comments are not included in the compiled assembly. You would have to use an XmlReader to access the .XML file produced by the compiler. Commented Dec 28, 2012 at 21:46
  • I was hoping not to do that way and thought there would be a built in way of doing it. Commented Dec 28, 2012 at 21:52
  • Sadly, I don't think there is. Having comments in assemblies would also significantly impact memory usage, load times, download sizes, etc. And XML is fairly easy for tools to parse, without having to know about .NET assemblies. Commented Dec 28, 2012 at 21:58
  • Just found this according to Dino: If the XML file is in the same location as the assembly and has the same filename just with ".xml" instead of ".exe" or ".dll" then IronPython should pick it up and include it in relevant doc strings for types, methods, etc.... Commented Dec 28, 2012 at 23:01
  • I think that refers to VS IntelliSense, but I'm not familiar with IronPython, so they may have built something on their own. But it sounds very unlikely to me. Commented Dec 28, 2012 at 23:23

1 Answer 1

0

I just found out that you need to have the XML documentation in the same directory as the exe, dll and it will be picked up by IronPython. See here:

IronPython use C# module documentation

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.