[Python.NET] DocStringAttribute Example

Jonno jonnojohnson at gmail.com
Wed Mar 5 16:59:16 CET 2014


Is there an example how to format documentation in classes & methods so
that a python docstring will be produced?

I found the following in a thread a while back but it's not working for me:

### test.cs ##
using System;
using System.Runtime.InteropServices;
using Python.Runtime;

namespace PinvokeTest
	[DocStringAttribute("Interface class to external functions.")]
	public class Invoke {
		[DocStringAttribute("External funtion simulation: WriteToFile(char)
will write a char to the terminal.")]
         	public static void WriteToFile(char arg) {
             		Console.WriteLine("Writing {0}", arg);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythondotnet/attachments/20140305/3d153002/attachment.html>

More information about the PythonDotNet mailing list