From jonnojohnson at gmail.com Wed Mar 5 16:59:16 2014 From: jonnojohnson at gmail.com (Jonno) Date: Wed, 5 Mar 2014 09:59:16 -0600 Subject: [Python.NET] DocStringAttribute Example Message-ID: Hi, 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); return; } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at pyxll.com Fri Mar 7 19:19:51 2014 From: tony at pyxll.com (Tony Roberts) Date: Fri, 7 Mar 2014 18:19:51 +0000 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: Hi, if your class has a constructor then the class docstring will get replaced with a description of the constructor, even if you explicitly gave the class a docstring using DocStringAttribute. I've created an issue for github for this and fixed it: https://github.com/pythonnet/pythonnet/issues/14 In the same commit I added some unit tests which should do as an example for you to see how it should work (see the newly added file pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). cheers, Tony On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: > Hi, > > 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); > return; > } > } > } > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonnojohnson at gmail.com Wed Mar 12 15:33:37 2014 From: jonnojohnson at gmail.com (Jonno) Date: Wed, 12 Mar 2014 09:33:37 -0500 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: Thanks Tony, This is probably my ignorance of C# but I get the following error using the same syntax as the example: The type or namespace name 'DocStringAttribute' could not be found (are you missing a using directive or an assembly reference?) I have the: using Python.Runtime statement. On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: > Hi, > > if your class has a constructor then the class docstring will get replaced > with a description of the constructor, even if you explicitly gave the > class a docstring using DocStringAttribute. > > I've created an issue for github for this and fixed it: > https://github.com/pythonnet/pythonnet/issues/14 > > In the same commit I added some unit tests which should do as an example > for you to see how it should work (see the newly added file > pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). > > cheers, > Tony > > > > On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: > >> Hi, >> >> 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); >> return; >> } >> } >> } >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at pyxll.com Wed Mar 12 15:46:28 2014 From: tony at pyxll.com (Tony Roberts) Date: Wed, 12 Mar 2014 14:46:28 +0000 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: Hi, have you added the Python.Runtime to your project references? Take a look at the Python.Test project that's used by the unit tests if you're not sure how to set up your project. cheers, Tony On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: > Thanks Tony, > > This is probably my ignorance of C# but I get the following error using > the same syntax as the example: > > The type or namespace name 'DocStringAttribute' could not be found (are > you missing a using directive or an assembly reference?) > > I have the: > using Python.Runtime > statement. > > > On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: > >> Hi, >> >> if your class has a constructor then the class docstring will get >> replaced with a description of the constructor, even if you explicitly gave >> the class a docstring using DocStringAttribute. >> >> I've created an issue for github for this and fixed it: >> https://github.com/pythonnet/pythonnet/issues/14 >> >> In the same commit I added some unit tests which should do as an example >> for you to see how it should work (see the newly added file >> pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). >> >> cheers, >> Tony >> >> >> >> On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: >> >>> Hi, >>> >>> 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); >>> return; >>> } >>> } >>> } >>> >>> >>> _________________________________________________ >>> Python.NET mailing list - PythonDotNet at python.org >>> https://mail.python.org/mailman/listinfo/pythondotnet >>> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonnojohnson at gmail.com Wed Mar 12 17:59:56 2014 From: jonnojohnson at gmail.com (Jonno) Date: Wed, 12 Mar 2014 11:59:56 -0500 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: My mistake Tony, I was using the 2.0 CLR version of pythondotnet which doesn't have the DocStringAttribute class. On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts wrote: > Hi, > > have you added the Python.Runtime to your project references? Take a look > at the Python.Test project that's used by the unit tests if you're not sure > how to set up your project. > > cheers, > Tony > > > On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: > >> Thanks Tony, >> >> This is probably my ignorance of C# but I get the following error using >> the same syntax as the example: >> >> The type or namespace name 'DocStringAttribute' could not be found (are >> you missing a using directive or an assembly reference?) >> >> I have the: >> using Python.Runtime >> statement. >> >> >> On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: >> >>> Hi, >>> >>> if your class has a constructor then the class docstring will get >>> replaced with a description of the constructor, even if you explicitly gave >>> the class a docstring using DocStringAttribute. >>> >>> I've created an issue for github for this and fixed it: >>> https://github.com/pythonnet/pythonnet/issues/14 >>> >>> In the same commit I added some unit tests which should do as an example >>> for you to see how it should work (see the newly added file >>> pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). >>> >>> cheers, >>> Tony >>> >>> >>> >>> On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: >>> >>>> Hi, >>>> >>>> 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); >>>> return; >>>> } >>>> } >>>> } >>>> >>>> >>>> _________________________________________________ >>>> Python.NET mailing list - PythonDotNet at python.org >>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>> >>> >>> >>> _________________________________________________ >>> Python.NET mailing list - PythonDotNet at python.org >>> https://mail.python.org/mailman/listinfo/pythondotnet >>> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonnojohnson at gmail.com Wed Mar 12 20:33:23 2014 From: jonnojohnson at gmail.com (Jonno) Date: Wed, 12 Mar 2014 14:33:23 -0500 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: Is it possible to compile the 2.0 Beta version containing the DocStringAttribute for clr version 2.0 or is there some incompatibility? I'm not familiar with how to build the pythondotnet source. On Wed, Mar 12, 2014 at 11:59 AM, Jonno wrote: > My mistake Tony, > > I was using the 2.0 CLR version of pythondotnet which doesn't have the > DocStringAttribute class. > > > On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts wrote: > >> Hi, >> >> have you added the Python.Runtime to your project references? Take a look >> at the Python.Test project that's used by the unit tests if you're not sure >> how to set up your project. >> >> cheers, >> Tony >> >> >> On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: >> >>> Thanks Tony, >>> >>> This is probably my ignorance of C# but I get the following error using >>> the same syntax as the example: >>> >>> The type or namespace name 'DocStringAttribute' could not be found (are >>> you missing a using directive or an assembly reference?) >>> >>> I have the: >>> using Python.Runtime >>> statement. >>> >>> >>> On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: >>> >>>> Hi, >>>> >>>> if your class has a constructor then the class docstring will get >>>> replaced with a description of the constructor, even if you explicitly gave >>>> the class a docstring using DocStringAttribute. >>>> >>>> I've created an issue for github for this and fixed it: >>>> https://github.com/pythonnet/pythonnet/issues/14 >>>> >>>> In the same commit I added some unit tests which should do as an >>>> example for you to see how it should work (see the newly added file >>>> pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). >>>> >>>> cheers, >>>> Tony >>>> >>>> >>>> >>>> On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: >>>> >>>>> Hi, >>>>> >>>>> 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); >>>>> return; >>>>> } >>>>> } >>>>> } >>>>> >>>>> >>>>> _________________________________________________ >>>>> Python.NET mailing list - PythonDotNet at python.org >>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>> >>>> >>>> >>>> _________________________________________________ >>>> Python.NET mailing list - PythonDotNet at python.org >>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>> >>> >>> >>> _________________________________________________ >>> Python.NET mailing list - PythonDotNet at python.org >>> https://mail.python.org/mailman/listinfo/pythondotnet >>> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonnojohnson at gmail.com Thu Mar 13 14:57:19 2014 From: jonnojohnson at gmail.com (Jonno) Date: Thu, 13 Mar 2014 08:57:19 -0500 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: Also when using clr.pyd from pythonnet-2.0-Beta0-clr4.0_140_py27_UCS2_x86.zip I cannot import clr. I get the following error: "dynamic module not initialized properly" I'm on CPython 2.7.5, Win7 32bit. Can anyone suggest what might be causing this? I have .NET Framework 4.5 installed. On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: > Is it possible to compile the 2.0 Beta version containing the > DocStringAttribute for clr version 2.0 or is there some incompatibility? > > I'm not familiar with how to build the pythondotnet source. > > > On Wed, Mar 12, 2014 at 11:59 AM, Jonno wrote: > >> My mistake Tony, >> >> I was using the 2.0 CLR version of pythondotnet which doesn't have the >> DocStringAttribute class. >> >> >> On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts wrote: >> >>> Hi, >>> >>> have you added the Python.Runtime to your project references? Take a >>> look at the Python.Test project that's used by the unit tests if you're not >>> sure how to set up your project. >>> >>> cheers, >>> Tony >>> >>> >>> On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: >>> >>>> Thanks Tony, >>>> >>>> This is probably my ignorance of C# but I get the following error using >>>> the same syntax as the example: >>>> >>>> The type or namespace name 'DocStringAttribute' could not be found (are >>>> you missing a using directive or an assembly reference?) >>>> >>>> I have the: >>>> using Python.Runtime >>>> statement. >>>> >>>> >>>> On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: >>>> >>>>> Hi, >>>>> >>>>> if your class has a constructor then the class docstring will get >>>>> replaced with a description of the constructor, even if you explicitly gave >>>>> the class a docstring using DocStringAttribute. >>>>> >>>>> I've created an issue for github for this and fixed it: >>>>> https://github.com/pythonnet/pythonnet/issues/14 >>>>> >>>>> In the same commit I added some unit tests which should do as an >>>>> example for you to see how it should work (see the newly added file >>>>> pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). >>>>> >>>>> cheers, >>>>> Tony >>>>> >>>>> >>>>> >>>>> On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> 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); >>>>>> return; >>>>>> } >>>>>> } >>>>>> } >>>>>> >>>>>> >>>>>> _________________________________________________ >>>>>> Python.NET mailing list - PythonDotNet at python.org >>>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>>> >>>>> >>>>> >>>>> _________________________________________________ >>>>> Python.NET mailing list - PythonDotNet at python.org >>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>> >>>> >>>> >>>> _________________________________________________ >>>> Python.NET mailing list - PythonDotNet at python.org >>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>> >>> >>> >>> _________________________________________________ >>> Python.NET mailing list - PythonDotNet at python.org >>> https://mail.python.org/mailman/listinfo/pythondotnet >>> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonnojohnson at gmail.com Thu Mar 13 16:20:41 2014 From: jonnojohnson at gmail.com (Jonno) Date: Thu, 13 Mar 2014 10:20:41 -0500 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: Only way I could get this to work is to copy the files: clr.pyd, nPython.exe, Python.Runtime.dll to the directory c:\Python27 (rather than c:\Python27\DLLs). Does anyone know why this would not work? Using sys.path.append() while keeping the files elsewhere also doesn't work. On Thu, Mar 13, 2014 at 8:57 AM, Jonno wrote: > Also when using clr.pyd from > pythonnet-2.0-Beta0-clr4.0_140_py27_UCS2_x86.zip I cannot import clr. I get > the following error: > "dynamic module not initialized properly" > I'm on CPython 2.7.5, Win7 32bit. > Can anyone suggest what might be causing this? I have .NET Framework 4.5 > installed. > > > On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: > >> Is it possible to compile the 2.0 Beta version containing the >> DocStringAttribute for clr version 2.0 or is there some incompatibility? >> >> I'm not familiar with how to build the pythondotnet source. >> >> >> On Wed, Mar 12, 2014 at 11:59 AM, Jonno wrote: >> >>> My mistake Tony, >>> >>> I was using the 2.0 CLR version of pythondotnet which doesn't have the >>> DocStringAttribute class. >>> >>> >>> On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts wrote: >>> >>>> Hi, >>>> >>>> have you added the Python.Runtime to your project references? Take a >>>> look at the Python.Test project that's used by the unit tests if you're not >>>> sure how to set up your project. >>>> >>>> cheers, >>>> Tony >>>> >>>> >>>> On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: >>>> >>>>> Thanks Tony, >>>>> >>>>> This is probably my ignorance of C# but I get the following error >>>>> using the same syntax as the example: >>>>> >>>>> The type or namespace name 'DocStringAttribute' could not be found >>>>> (are you missing a using directive or an assembly reference?) >>>>> >>>>> I have the: >>>>> using Python.Runtime >>>>> statement. >>>>> >>>>> >>>>> On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> if your class has a constructor then the class docstring will get >>>>>> replaced with a description of the constructor, even if you explicitly gave >>>>>> the class a docstring using DocStringAttribute. >>>>>> >>>>>> I've created an issue for github for this and fixed it: >>>>>> https://github.com/pythonnet/pythonnet/issues/14 >>>>>> >>>>>> In the same commit I added some unit tests which should do as an >>>>>> example for you to see how it should work (see the newly added file >>>>>> pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). >>>>>> >>>>>> cheers, >>>>>> Tony >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> 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); >>>>>>> return; >>>>>>> } >>>>>>> } >>>>>>> } >>>>>>> >>>>>>> >>>>>>> _________________________________________________ >>>>>>> Python.NET mailing list - PythonDotNet at python.org >>>>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>>>> >>>>>> >>>>>> >>>>>> _________________________________________________ >>>>>> Python.NET mailing list - PythonDotNet at python.org >>>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>>> >>>>> >>>>> >>>>> _________________________________________________ >>>>> Python.NET mailing list - PythonDotNet at python.org >>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>> >>>> >>>> >>>> _________________________________________________ >>>> Python.NET mailing list - PythonDotNet at python.org >>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jgill at tokiomillennium.com Thu Mar 13 17:25:57 2014 From: jgill at tokiomillennium.com (John Gill) Date: Thu, 13 Mar 2014 16:25:57 +0000 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: I occasionally get this error on import of clr. Usually when I have Visual Studio open. Closing VS and retrying has always solved the issue up to now. John From: PythonDotNet [mailto:pythondotnet-bounces+jgill=tokiomillennium.com at python.org] On Behalf Of Jonno Sent: Thursday, March 13, 2014 10:57 AM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] DocStringAttribute Example Also when using clr.pyd from pythonnet-2.0-Beta0-clr4.0_140_py27_UCS2_x86.zip I cannot import clr. I get the following error: "dynamic module not initialized properly" I'm on CPython 2.7.5, Win7 32bit. Can anyone suggest what might be causing this? I have .NET Framework 4.5 installed. On Wed, Mar 12, 2014 at 2:33 PM, Jonno > wrote: Is it possible to compile the 2.0 Beta version containing the DocStringAttribute for clr version 2.0 or is there some incompatibility? I'm not familiar with how to build the pythondotnet source. On Wed, Mar 12, 2014 at 11:59 AM, Jonno > wrote: My mistake Tony, I was using the 2.0 CLR version of pythondotnet which doesn't have the DocStringAttribute class. On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts > wrote: Hi, have you added the Python.Runtime to your project references? Take a look at the Python.Test project that's used by the unit tests if you're not sure how to set up your project. cheers, Tony On Wed, Mar 12, 2014 at 2:33 PM, Jonno > wrote: Thanks Tony, This is probably my ignorance of C# but I get the following error using the same syntax as the example: The type or namespace name 'DocStringAttribute' could not be found (are you missing a using directive or an assembly reference?) I have the: using Python.Runtime statement. On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts > wrote: Hi, if your class has a constructor then the class docstring will get replaced with a description of the constructor, even if you explicitly gave the class a docstring using DocStringAttribute. I've created an issue for github for this and fixed it: https://github.com/pythonnet/pythonnet/issues/14 In the same commit I added some unit tests which should do as an example for you to see how it should work (see the newly added file pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). cheers, Tony On Wed, Mar 5, 2014 at 3:59 PM, Jonno > wrote: Hi, 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); return; } } } _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet This communication and any attachments contain information which is confidential and may also be legally privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying, printing or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please return it with the title "received in error" to postmaster at tokiomillennium.com and then permanently delete the email and any attachments from your system. E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. It is the recipient's responsibility to ensure that e-mail transmissions and any attachments are virus free. We do not accept liability for any damages or other consequences caused by information that is intercepted, corrupted, amended, lost, destroyed, arrives late or incomplete or contains viruses. ****************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From tony at pyxll.com Thu Mar 13 17:33:10 2014 From: tony at pyxll.com (Tony Roberts) Date: Thu, 13 Mar 2014 16:33:10 +0000 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: That's a fairly old version. The project's in a bit of a transition stage at the moment. If you want to try out the latest version (still in development) you should get the code from github https://github.com/pythonnet/pythonnet (use the develop branch) and build it yourself using the setup.py script, eg: python setup.py install As long as you have visual studio 2012 installed that *should* just work... cheers, Tony On Thu, Mar 13, 2014 at 3:20 PM, Jonno wrote: > Only way I could get this to work is to copy the files: clr.pyd, > nPython.exe, Python.Runtime.dll to the directory c:\Python27 (rather > than c:\Python27\DLLs). > > Does anyone know why this would not work? Using sys.path.append() while > keeping the files elsewhere also doesn't work. > > > On Thu, Mar 13, 2014 at 8:57 AM, Jonno wrote: > >> Also when using clr.pyd from >> pythonnet-2.0-Beta0-clr4.0_140_py27_UCS2_x86.zip I cannot import clr. I get >> the following error: >> "dynamic module not initialized properly" >> I'm on CPython 2.7.5, Win7 32bit. >> Can anyone suggest what might be causing this? I have .NET Framework 4.5 >> installed. >> >> >> On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: >> >>> Is it possible to compile the 2.0 Beta version containing the >>> DocStringAttribute for clr version 2.0 or is there some incompatibility? >>> >>> I'm not familiar with how to build the pythondotnet source. >>> >>> >>> On Wed, Mar 12, 2014 at 11:59 AM, Jonno wrote: >>> >>>> My mistake Tony, >>>> >>>> I was using the 2.0 CLR version of pythondotnet which doesn't have the >>>> DocStringAttribute class. >>>> >>>> >>>> On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts wrote: >>>> >>>>> Hi, >>>>> >>>>> have you added the Python.Runtime to your project references? Take a >>>>> look at the Python.Test project that's used by the unit tests if you're not >>>>> sure how to set up your project. >>>>> >>>>> cheers, >>>>> Tony >>>>> >>>>> >>>>> On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: >>>>> >>>>>> Thanks Tony, >>>>>> >>>>>> This is probably my ignorance of C# but I get the following error >>>>>> using the same syntax as the example: >>>>>> >>>>>> The type or namespace name 'DocStringAttribute' could not be found >>>>>> (are you missing a using directive or an assembly reference?) >>>>>> >>>>>> I have the: >>>>>> using Python.Runtime >>>>>> statement. >>>>>> >>>>>> >>>>>> On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> if your class has a constructor then the class docstring will get >>>>>>> replaced with a description of the constructor, even if you explicitly gave >>>>>>> the class a docstring using DocStringAttribute. >>>>>>> >>>>>>> I've created an issue for github for this and fixed it: >>>>>>> https://github.com/pythonnet/pythonnet/issues/14 >>>>>>> >>>>>>> In the same commit I added some unit tests which should do as an >>>>>>> example for you to see how it should work (see the newly added file >>>>>>> pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). >>>>>>> >>>>>>> cheers, >>>>>>> Tony >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> 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); >>>>>>>> return; >>>>>>>> } >>>>>>>> } >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> _________________________________________________ >>>>>>>> Python.NET mailing list - PythonDotNet at python.org >>>>>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>>>>> >>>>>>> >>>>>>> >>>>>>> _________________________________________________ >>>>>>> Python.NET mailing list - PythonDotNet at python.org >>>>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>>>> >>>>>> >>>>>> >>>>>> _________________________________________________ >>>>>> Python.NET mailing list - PythonDotNet at python.org >>>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>>> >>>>> >>>>> >>>>> _________________________________________________ >>>>> Python.NET mailing list - PythonDotNet at python.org >>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>> >>>> >>>> >>> >> > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthoff at berkeley.edu Thu Mar 13 17:55:36 2014 From: anthoff at berkeley.edu (David Anthoff) Date: Thu, 13 Mar 2014 09:55:36 -0700 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: This might be related to https://github.com/pythonnet/pythonnet/issues/3 (i.e. the stuff you can download from sourceforge does NOT work with .Net 4.5.1). The develop version that is on https://github.com/pythonnet/pythonnet fixes this bug. We hope to release a beta version of this that can be installed via pip soon. Best, David From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu at python.org] On Behalf Of Jonno Sent: Thursday, March 13, 2014 6:57 AM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] DocStringAttribute Example Also when using clr.pyd from pythonnet-2.0-Beta0-clr4.0_140_py27_UCS2_x86.zip I cannot import clr. I get the following error: "dynamic module not initialized properly" I'm on CPython 2.7.5, Win7 32bit. Can anyone suggest what might be causing this? I have .NET Framework 4.5 installed. On Wed, Mar 12, 2014 at 2:33 PM, Jonno > wrote: Is it possible to compile the 2.0 Beta version containing the DocStringAttribute for clr version 2.0 or is there some incompatibility? I'm not familiar with how to build the pythondotnet source. On Wed, Mar 12, 2014 at 11:59 AM, Jonno > wrote: My mistake Tony, I was using the 2.0 CLR version of pythondotnet which doesn't have the DocStringAttribute class. On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts > wrote: Hi, have you added the Python.Runtime to your project references? Take a look at the Python.Test project that's used by the unit tests if you're not sure how to set up your project. cheers, Tony On Wed, Mar 12, 2014 at 2:33 PM, Jonno > wrote: Thanks Tony, This is probably my ignorance of C# but I get the following error using the same syntax as the example: The type or namespace name 'DocStringAttribute' could not be found (are you missing a using directive or an assembly reference?) I have the: using Python.Runtime statement. On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts > wrote: Hi, if your class has a constructor then the class docstring will get replaced with a description of the constructor, even if you explicitly gave the class a docstring using DocStringAttribute. I've created an issue for github for this and fixed it: https://github.com/pythonnet/pythonnet/issues/14 In the same commit I added some unit tests which should do as an example for you to see how it should work (see the newly added file pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). cheers, Tony On Wed, Mar 5, 2014 at 3:59 PM, Jonno > wrote: Hi, 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); return; } } } _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonnojohnson at gmail.com Thu Mar 13 22:18:55 2014 From: jonnojohnson at gmail.com (Jonno) Date: Thu, 13 Mar 2014 16:18:55 -0500 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: I tried with VS2012 closed but it didn't help me. On Thu, Mar 13, 2014 at 11:25 AM, John Gill wrote: > I occasionally get this error on import of clr. Usually when I have > Visual Studio open. Closing VS and retrying has always solved the issue > up to now. > > > > John > > > > *From:* PythonDotNet [mailto:pythondotnet-bounces+jgill= > tokiomillennium.com at python.org] *On Behalf Of *Jonno > *Sent:* Thursday, March 13, 2014 10:57 AM > *To:* A list for users and developers of Python for .NET > *Subject:* Re: [Python.NET] DocStringAttribute Example > > > > Also when using clr.pyd from > pythonnet-2.0-Beta0-clr4.0_140_py27_UCS2_x86.zip I cannot import clr. I get > the following error: > > "dynamic module not initialized properly" > > I'm on CPython 2.7.5, Win7 32bit. > > Can anyone suggest what might be causing this? I have .NET Framework 4.5 > installed. > > > > On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: > > Is it possible to compile the 2.0 Beta version containing the > DocStringAttribute for clr version 2.0 or is there some incompatibility? > > > I'm not familiar with how to build the pythondotnet source. > > > > On Wed, Mar 12, 2014 at 11:59 AM, Jonno wrote: > > My mistake Tony, > > > > I was using the 2.0 CLR version of pythondotnet which doesn't have the > DocStringAttribute class. > > > > On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts wrote: > > Hi, > > > > have you added the Python.Runtime to your project references? Take a look > at the Python.Test project that's used by the unit tests if you're not sure > how to set up your project. > > > > cheers, > > Tony > > > > On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: > > Thanks Tony, > > > > This is probably my ignorance of C# but I get the following error using > the same syntax as the example: > > > > The type or namespace name 'DocStringAttribute' could not be found (are > you missing a using directive or an assembly reference?) > > > > I have the: > > using Python.Runtime > > statement. > > > > On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: > > Hi, > > > > if your class has a constructor then the class docstring will get replaced > with a description of the constructor, even if you explicitly gave the > class a docstring using DocStringAttribute. > > > > I've created an issue for github for this and fixed it: > https://github.com/pythonnet/pythonnet/issues/14 > > > > In the same commit I added some unit tests which should do as an example > for you to see how it should work (see the newly added file > pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). > > > > cheers, > > Tony > > > > > > On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: > > Hi, > > > > 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); > > return; > > } > > } > > } > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > > > > > This communication and any attachments contain information which is > confidential and may also be legally privileged. It is for the exclusive > use of the intended recipient(s). If you are not the intended recipient(s) > please note that any form of disclosure, distribution, copying, printing or > use of this communication or the information in it or in any attachments is > strictly prohibited and may be unlawful. If you have received this > communication in error, please return it with the title "received in error" > to postmaster at tokiomillennium.com and then permanently delete the email > and any attachments from your system. > > > > E-mail communications cannot be guaranteed to be secure or error free, as > information could be intercepted, corrupted, amended, lost, destroyed, > arrive late or incomplete, or contain viruses. It is the recipient's > responsibility to ensure that e-mail transmissions and any attachments are > virus free. We do not accept liability for any damages or other > consequences caused by information that is intercepted, corrupted, amended, > lost, destroyed, arrives late or incomplete or contains viruses. > > ****************************************** > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonnojohnson at gmail.com Thu Mar 13 22:34:45 2014 From: jonnojohnson at gmail.com (Jonno) Date: Thu, 13 Mar 2014 16:34:45 -0500 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: I'm afraid it didn't work for me. I got a ton of errors. Many type or namespaces couldn't be found (NUnit + many more). On Thu, Mar 13, 2014 at 11:33 AM, Tony Roberts wrote: > That's a fairly old version. The project's in a bit of a transition stage > at the moment. If you want to try out the latest version (still in > development) you should get the code from github > https://github.com/pythonnet/pythonnet (use the develop branch) and build > it yourself using the setup.py script, eg: > > python setup.py install > > As long as you have visual studio 2012 installed that *should* just work... > > cheers, > Tony > > > > On Thu, Mar 13, 2014 at 3:20 PM, Jonno wrote: > >> Only way I could get this to work is to copy the files: clr.pyd, >> nPython.exe, Python.Runtime.dll to the directory c:\Python27 (rather >> than c:\Python27\DLLs). >> >> Does anyone know why this would not work? Using sys.path.append() while >> keeping the files elsewhere also doesn't work. >> >> >> On Thu, Mar 13, 2014 at 8:57 AM, Jonno wrote: >> >>> Also when using clr.pyd from >>> pythonnet-2.0-Beta0-clr4.0_140_py27_UCS2_x86.zip I cannot import clr. I get >>> the following error: >>> "dynamic module not initialized properly" >>> I'm on CPython 2.7.5, Win7 32bit. >>> Can anyone suggest what might be causing this? I have .NET Framework 4.5 >>> installed. >>> >>> >>> On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: >>> >>>> Is it possible to compile the 2.0 Beta version containing the >>>> DocStringAttribute for clr version 2.0 or is there some incompatibility? >>>> >>>> I'm not familiar with how to build the pythondotnet source. >>>> >>>> >>>> On Wed, Mar 12, 2014 at 11:59 AM, Jonno wrote: >>>> >>>>> My mistake Tony, >>>>> >>>>> I was using the 2.0 CLR version of pythondotnet which doesn't have the >>>>> DocStringAttribute class. >>>>> >>>>> >>>>> On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> have you added the Python.Runtime to your project references? Take a >>>>>> look at the Python.Test project that's used by the unit tests if you're not >>>>>> sure how to set up your project. >>>>>> >>>>>> cheers, >>>>>> Tony >>>>>> >>>>>> >>>>>> On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: >>>>>> >>>>>>> Thanks Tony, >>>>>>> >>>>>>> This is probably my ignorance of C# but I get the following error >>>>>>> using the same syntax as the example: >>>>>>> >>>>>>> The type or namespace name 'DocStringAttribute' could not be found >>>>>>> (are you missing a using directive or an assembly reference?) >>>>>>> >>>>>>> I have the: >>>>>>> using Python.Runtime >>>>>>> statement. >>>>>>> >>>>>>> >>>>>>> On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> if your class has a constructor then the class docstring will get >>>>>>>> replaced with a description of the constructor, even if you explicitly gave >>>>>>>> the class a docstring using DocStringAttribute. >>>>>>>> >>>>>>>> I've created an issue for github for this and fixed it: >>>>>>>> https://github.com/pythonnet/pythonnet/issues/14 >>>>>>>> >>>>>>>> In the same commit I added some unit tests which should do as an >>>>>>>> example for you to see how it should work (see the newly added file >>>>>>>> pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). >>>>>>>> >>>>>>>> cheers, >>>>>>>> Tony >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> 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); >>>>>>>>> return; >>>>>>>>> } >>>>>>>>> } >>>>>>>>> } >>>>>>>>> >>>>>>>>> >>>>>>>>> _________________________________________________ >>>>>>>>> Python.NET mailing list - PythonDotNet at python.org >>>>>>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _________________________________________________ >>>>>>>> Python.NET mailing list - PythonDotNet at python.org >>>>>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>>>>> >>>>>>> >>>>>>> >>>>>>> _________________________________________________ >>>>>>> Python.NET mailing list - PythonDotNet at python.org >>>>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>>>> >>>>>> >>>>>> >>>>>> _________________________________________________ >>>>>> Python.NET mailing list - PythonDotNet at python.org >>>>>> https://mail.python.org/mailman/listinfo/pythondotnet >>>>>> >>>>> >>>>> >>>> >>> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthoff at berkeley.edu Thu Mar 13 23:15:21 2014 From: anthoff at berkeley.edu (David Anthoff) Date: Thu, 13 Mar 2014 15:15:21 -0700 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: Hi Jonno, would be great if you could post the exact output with the errors here, or even better open an issue with that info here https://github.com/pythonnet/pythonnet/issues, so that we can fix that. My suspicion is that this is related to NuGet package restore issues. You might try to open pythonnet.sln in VS and build it once there (that should restore the NuGet packages) and then try to run the command Tony mentioned. Best, David From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu at python.org] On Behalf Of Jonno Sent: Thursday, March 13, 2014 2:35 PM To: A list for users and developers of Python for .NET Subject: Re: [Python.NET] DocStringAttribute Example I'm afraid it didn't work for me. I got a ton of errors. Many type or namespaces couldn't be found (NUnit + many more). On Thu, Mar 13, 2014 at 11:33 AM, Tony Roberts > wrote: That's a fairly old version. The project's in a bit of a transition stage at the moment. If you want to try out the latest version (still in development) you should get the code from github https://github.com/pythonnet/pythonnet (use the develop branch) and build it yourself using the setup.py script, eg: python setup.py install As long as you have visual studio 2012 installed that *should* just work... cheers, Tony On Thu, Mar 13, 2014 at 3:20 PM, Jonno > wrote: Only way I could get this to work is to copy the files: clr.pyd, nPython.exe, Python.Runtime.dll to the directory c:\Python27 (rather than c:\Python27\DLLs). Does anyone know why this would not work? Using sys.path.append() while keeping the files elsewhere also doesn't work. On Thu, Mar 13, 2014 at 8:57 AM, Jonno > wrote: Also when using clr.pyd from pythonnet-2.0-Beta0-clr4.0_140_py27_UCS2_x86.zip I cannot import clr. I get the following error: "dynamic module not initialized properly" I'm on CPython 2.7.5, Win7 32bit. Can anyone suggest what might be causing this? I have .NET Framework 4.5 installed. On Wed, Mar 12, 2014 at 2:33 PM, Jonno > wrote: Is it possible to compile the 2.0 Beta version containing the DocStringAttribute for clr version 2.0 or is there some incompatibility? I'm not familiar with how to build the pythondotnet source. On Wed, Mar 12, 2014 at 11:59 AM, Jonno > wrote: My mistake Tony, I was using the 2.0 CLR version of pythondotnet which doesn't have the DocStringAttribute class. On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts > wrote: Hi, have you added the Python.Runtime to your project references? Take a look at the Python.Test project that's used by the unit tests if you're not sure how to set up your project. cheers, Tony On Wed, Mar 12, 2014 at 2:33 PM, Jonno > wrote: Thanks Tony, This is probably my ignorance of C# but I get the following error using the same syntax as the example: The type or namespace name 'DocStringAttribute' could not be found (are you missing a using directive or an assembly reference?) I have the: using Python.Runtime statement. On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts > wrote: Hi, if your class has a constructor then the class docstring will get replaced with a description of the constructor, even if you explicitly gave the class a docstring using DocStringAttribute. I've created an issue for github for this and fixed it: https://github.com/pythonnet/pythonnet/issues/14 In the same commit I added some unit tests which should do as an example for you to see how it should work (see the newly added file pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). cheers, Tony On Wed, Mar 5, 2014 at 3:59 PM, Jonno > wrote: Hi, 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); return; } } } _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From rudilutz0 at gmail.com Fri Mar 14 11:13:02 2014 From: rudilutz0 at gmail.com (Rudi Lutz) Date: Fri, 14 Mar 2014 10:13:02 +0000 (UTC) Subject: [Python.NET] Python .NET on Windows 8.1 References: Message-ID: davidacoder writes: > > I had the same problem and the following fix in the file > runtime/assemblymanager.cs made things work for me. I believe the problem is > that on Win 8.1 there seem to be generic types that aren't in a namespace. > My patch just skips those and thus prevents a crash. I am not sure whether > that is the right way to handle it, but it does fix the crash. > > Best, > David > > diff --git a/pythonnet/src/runtime/assemblymanager.cs > b/pythonnet/src/runtime/assemblymanager.cs > index 80c838d..2d369b5 100644 > --- a/pythonnet/src/runtime/assemblymanager.cs > +++ b/pythonnet/src/runtime/assemblymanager.cs > -283,7 +283,7 internal class AssemblyManager { > namespaces[ns].Add(assembly, String.Empty); > } > > - if (t.IsGenericTypeDefinition) { > + if (ns !=null && t.IsGenericTypeDefinition) { > GenericUtil.Register(t); > } > } > > From: PythonDotNet [mailto:pythondotnet-bounces+btribble=ea.com at > python.org] On Behalf Of Mihhail Maslakov > Sent: Wed Nov 6 11:27:45 CET 2013 > To: pythondotnet at python.org > Subject: [Python.NET] Python .NET on Windows 8.1 > > I have been using python.net for about 5 years for my project at work. > Usually everything worked or at least there was a way to fix it. Right now, > there is a situation, that I cannot understand. > > Since my PC got upgraded from W7 to W8.1 imports stopped working. It seems > that something happens on clr module initialization stage, because when I > try clr.AddReference("...") python answers: "AttributeError: 'module' > object has no attribute 'AddReference'" > > When debugging with freshly built clr.pyd/Python.Runtime.dll I see that > Runtime.Initialize() finishes without exception and clr module methods are > added via InitializeModuleMembers(). Yet still, when I run my program clr > doesn't work properly and seems like import hooks are not there > (breakpoints at AddReference and other methods are not fired). > > Do you have any pointers for me in this situation? > > Thank you, > Mihhail Maslakov > > _________________________________________________ > Python.NET mailing list - PythonDotNet at ... > https://mail.python.org/mailman/listinfo/pythondotnet > > Hi! I am having this problem too. Since I upgraded to Windows 8.1. today my Python.net installation has stopped working: import clr SystemError: dynamic module not initialized properly I have not built my own Python.net (and would rather not if possible as I am not sure what is involved - I suspect I would have to set up lots of things I currently don't have, but just used the latest version at http://sourceforge.net/projects/pythonnet/files/. Has anyone rebuilt Python.net using the patch suggested in David's message above, and either has, or is willing to, make it publicly available somewhere in a gzipped form that could just be downloaded and copied into my Python setup. I would be really really grateful! Many thanks. Hoping ... Rudi From jonnojohnson at gmail.com Sat Mar 15 14:19:13 2014 From: jonnojohnson at gmail.com (Jonno) Date: Sat, 15 Mar 2014 08:19:13 -0500 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: I'll do both of those David. On Mar 13, 2014 5:36 PM, "David Anthoff" wrote: > Hi Jonno, > > > > would be great if you could post the exact output with the errors here, or > even better open an issue with that info here > https://github.com/pythonnet/pythonnet/issues, so that we can fix that. > > > > My suspicion is that this is related to NuGet package restore issues. You > might try to open pythonnet.sln in VS and build it once there (that should > restore the NuGet packages) and then try to run the command Tony mentioned. > > > > Best, > > David > > > > *From:* PythonDotNet [mailto:pythondotnet-bounces+anthoff= > berkeley.edu at python.org] *On Behalf Of *Jonno > *Sent:* Thursday, March 13, 2014 2:35 PM > *To:* A list for users and developers of Python for .NET > *Subject:* Re: [Python.NET] DocStringAttribute Example > > > > I'm afraid it didn't work for me. > > I got a ton of errors. Many type or namespaces couldn't be found (NUnit + > many more). > > > > On Thu, Mar 13, 2014 at 11:33 AM, Tony Roberts wrote: > > That's a fairly old version. The project's in a bit of a transition stage > at the moment. If you want to try out the latest version (still in > development) you should get the code from github > https://github.com/pythonnet/pythonnet (use the develop branch) and build > it yourself using the setup.py script, eg: > > > > python setup.py install > > > > As long as you have visual studio 2012 installed that *should* just work... > > > > cheers, > > Tony > > > > > > On Thu, Mar 13, 2014 at 3:20 PM, Jonno wrote: > > Only way I could get this to work is to copy the files: clr.pyd, > nPython.exe, Python.Runtime.dll to the directory c:\Python27 (rather > than c:\Python27\DLLs). > > > > Does anyone know why this would not work? Using sys.path.append() while > keeping the files elsewhere also doesn't work. > > > > On Thu, Mar 13, 2014 at 8:57 AM, Jonno wrote: > > Also when using clr.pyd from > pythonnet-2.0-Beta0-clr4.0_140_py27_UCS2_x86.zip I cannot import clr. I get > the following error: > > "dynamic module not initialized properly" > > I'm on CPython 2.7.5, Win7 32bit. > > Can anyone suggest what might be causing this? I have .NET Framework 4.5 > installed. > > > > On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: > > Is it possible to compile the 2.0 Beta version containing the > DocStringAttribute for clr version 2.0 or is there some incompatibility? > > > I'm not familiar with how to build the pythondotnet source. > > > > On Wed, Mar 12, 2014 at 11:59 AM, Jonno wrote: > > My mistake Tony, > > > > I was using the 2.0 CLR version of pythondotnet which doesn't have the > DocStringAttribute class. > > > > On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts wrote: > > Hi, > > > > have you added the Python.Runtime to your project references? Take a look > at the Python.Test project that's used by the unit tests if you're not sure > how to set up your project. > > > > cheers, > > Tony > > > > On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: > > Thanks Tony, > > > > This is probably my ignorance of C# but I get the following error using > the same syntax as the example: > > > > The type or namespace name 'DocStringAttribute' could not be found (are > you missing a using directive or an assembly reference?) > > > > I have the: > > using Python.Runtime > > statement. > > > > On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: > > Hi, > > > > if your class has a constructor then the class docstring will get replaced > with a description of the constructor, even if you explicitly gave the > class a docstring using DocStringAttribute. > > > > I've created an issue for github for this and fixed it: > https://github.com/pythonnet/pythonnet/issues/14 > > > > In the same commit I added some unit tests which should do as an example > for you to see how it should work (see the newly added file > pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). > > > > cheers, > > Tony > > > > > > On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: > > Hi, > > > > 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); > > return; > > } > > } > > } > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > > > > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > https://mail.python.org/mailman/listinfo/pythondotnet > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthoff at berkeley.edu Mon Mar 17 20:40:28 2014 From: anthoff at berkeley.edu (David Anthoff) Date: Mon, 17 Mar 2014 12:40:28 -0700 Subject: [Python.NET] pip install prerelease versions Message-ID: Hi everyone, if you are on Python 2.7 and Windows you can try to install a nightly snapshot of Python.Net via pip: pip install --pre pythonnet Make sure you have a recent version of pip installed (http://www.pip-installer.org/en/latest/installing.html). This is VERY experimental and the version you will get is just a nightly snapshot of the current source on github. It should work on Windows 8.1, though. Please report back any problems or success of this. The current plan is still to release a stable version 2.0 at some point. The major thanks for the progress so far goes to Tony, who has contributed most of the code changes to make this work. Best, David -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonnojohnson at gmail.com Tue Mar 18 03:44:07 2014 From: jonnojohnson at gmail.com (Jonno) Date: Mon, 17 Mar 2014 21:44:07 -0500 Subject: [Python.NET] DocStringAttribute Example In-Reply-To: References: Message-ID: Sorry it took a while but I submitted it as an issue: https://github.com/pythonnet/pythonnet/issues/24 I got an error when building in VS2012 also. On Sat, Mar 15, 2014 at 8:19 AM, Jonno wrote: > I'll do both of those David. > On Mar 13, 2014 5:36 PM, "David Anthoff" wrote: > >> Hi Jonno, >> >> >> >> would be great if you could post the exact output with the errors here, >> or even better open an issue with that info here >> https://github.com/pythonnet/pythonnet/issues, so that we can fix that. >> >> >> >> My suspicion is that this is related to NuGet package restore issues. You >> might try to open pythonnet.sln in VS and build it once there (that should >> restore the NuGet packages) and then try to run the command Tony mentioned. >> >> >> >> Best, >> >> David >> >> >> >> *From:* PythonDotNet [mailto:pythondotnet-bounces+anthoff= >> berkeley.edu at python.org] *On Behalf Of *Jonno >> *Sent:* Thursday, March 13, 2014 2:35 PM >> *To:* A list for users and developers of Python for .NET >> *Subject:* Re: [Python.NET] DocStringAttribute Example >> >> >> >> I'm afraid it didn't work for me. >> >> I got a ton of errors. Many type or namespaces couldn't be found (NUnit + >> many more). >> >> >> >> On Thu, Mar 13, 2014 at 11:33 AM, Tony Roberts wrote: >> >> That's a fairly old version. The project's in a bit of a transition stage >> at the moment. If you want to try out the latest version (still in >> development) you should get the code from github >> https://github.com/pythonnet/pythonnet (use the develop branch) and >> build it yourself using the setup.py script, eg: >> >> >> >> python setup.py install >> >> >> >> As long as you have visual studio 2012 installed that *should* just >> work... >> >> >> >> cheers, >> >> Tony >> >> >> >> >> >> On Thu, Mar 13, 2014 at 3:20 PM, Jonno wrote: >> >> Only way I could get this to work is to copy the files: clr.pyd, >> nPython.exe, Python.Runtime.dll to the directory c:\Python27 (rather >> than c:\Python27\DLLs). >> >> >> >> Does anyone know why this would not work? Using sys.path.append() while >> keeping the files elsewhere also doesn't work. >> >> >> >> On Thu, Mar 13, 2014 at 8:57 AM, Jonno wrote: >> >> Also when using clr.pyd from >> pythonnet-2.0-Beta0-clr4.0_140_py27_UCS2_x86.zip I cannot import clr. I get >> the following error: >> >> "dynamic module not initialized properly" >> >> I'm on CPython 2.7.5, Win7 32bit. >> >> Can anyone suggest what might be causing this? I have .NET Framework 4.5 >> installed. >> >> >> >> On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: >> >> Is it possible to compile the 2.0 Beta version containing the >> DocStringAttribute for clr version 2.0 or is there some incompatibility? >> >> >> I'm not familiar with how to build the pythondotnet source. >> >> >> >> On Wed, Mar 12, 2014 at 11:59 AM, Jonno wrote: >> >> My mistake Tony, >> >> >> >> I was using the 2.0 CLR version of pythondotnet which doesn't have the >> DocStringAttribute class. >> >> >> >> On Wed, Mar 12, 2014 at 9:46 AM, Tony Roberts wrote: >> >> Hi, >> >> >> >> have you added the Python.Runtime to your project references? Take a look >> at the Python.Test project that's used by the unit tests if you're not sure >> how to set up your project. >> >> >> >> cheers, >> >> Tony >> >> >> >> On Wed, Mar 12, 2014 at 2:33 PM, Jonno wrote: >> >> Thanks Tony, >> >> >> >> This is probably my ignorance of C# but I get the following error using >> the same syntax as the example: >> >> >> >> The type or namespace name 'DocStringAttribute' could not be found (are >> you missing a using directive or an assembly reference?) >> >> >> >> I have the: >> >> using Python.Runtime >> >> statement. >> >> >> >> On Fri, Mar 7, 2014 at 12:19 PM, Tony Roberts wrote: >> >> Hi, >> >> >> >> if your class has a constructor then the class docstring will get >> replaced with a description of the constructor, even if you explicitly gave >> the class a docstring using DocStringAttribute. >> >> >> >> I've created an issue for github for this and fixed it: >> https://github.com/pythonnet/pythonnet/issues/14 >> >> >> >> In the same commit I added some unit tests which should do as an example >> for you to see how it should work (see the newly added file >> pythonnet/src/testing/doctest.cs and pythonnet/src/tests/test_docstring.py). >> >> >> >> cheers, >> >> Tony >> >> >> >> >> >> On Wed, Mar 5, 2014 at 3:59 PM, Jonno wrote: >> >> Hi, >> >> >> >> 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); >> >> return; >> >> } >> >> } >> >> } >> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> >> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> >> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> >> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> >> >> >> >> >> >> >> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> >> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> >> >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> https://mail.python.org/mailman/listinfo/pythondotnet >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rudilutz0 at gmail.com Fri Mar 21 16:32:08 2014 From: rudilutz0 at gmail.com (Rudi Lutz) Date: Fri, 21 Mar 2014 15:32:08 +0000 (UTC) Subject: [Python.NET] pip install prerelease versions References: Message-ID: Hi! I just installed using pip as instructed, but I now get an error saying that it can't find file or assembly Python.Runtime Version 4.0.0.1 and I can't find a file called that anywhere installed as part of the installation process. I have some older versions of Python.Runtime but they don't work (must be wrong version) Help. Regards, Rudi From anthoff at berkeley.edu Fri Mar 21 22:54:49 2014 From: anthoff at berkeley.edu (David Anthoff) Date: Fri, 21 Mar 2014 14:54:49 -0700 Subject: [Python.NET] pip install prerelease versions In-Reply-To: References: Message-ID: Are you trying to run 1) npython.exe or are you running 2) python.exe and then do import clr? The first option is broken right now (https://github.com/pythonnet/pythonnet/issues/26), the second option should work. If this is not related to npython.exe, can you please file an issue https://github.com/pythonnet/pythonnet/issues with precise error output and replication steps? Much appreciated! Best, David -----Original Message----- From: PythonDotNet [mailto:pythondotnet-bounces+anthoff=berkeley.edu at python.org] On Behalf Of Rudi Lutz Sent: Friday, March 21, 2014 8:32 AM To: pythondotnet at python.org Subject: Re: [Python.NET] pip install prerelease versions Hi! I just installed using pip as instructed, but I now get an error saying that it can't find file or assembly Python.Runtime Version 4.0.0.1 and I can't find a file called that anywhere installed as part of the installation process. I have some older versions of Python.Runtime but they don't work (must be wrong version) Help. Regards, Rudi _________________________________________________ Python.NET mailing list - PythonDotNet at python.org https://mail.python.org/mailman/listinfo/pythondotnet From rudilutz0 at gmail.com Mon Mar 24 09:13:05 2014 From: rudilutz0 at gmail.com (Rudi Lutz) Date: Mon, 24 Mar 2014 08:13:05 +0000 (UTC) Subject: [Python.NET] pip install prerelease versions References: Message-ID: David Anthoff writes: > > Are you trying to run 1) npython.exe or are you running 2) python.exe and > then do import clr? > > The first option is broken right now > (https://github.com/pythonnet/pythonnet/issues/26), the second option should > work. If this is not related to npython.exe, can you please file an issue > https://github.com/pythonnet/pythonnet/issues with precise error output and > replication steps? Much appreciated! > > Best, > David > > -----Original Message----- > From: PythonDotNet > [mailto:pythondotnet-bounces+anthoff=berkeley.edu at ...] > On Behalf Of > Rudi Lutz > Sent: Friday, March 21, 2014 8:32 AM > To: pythondotnet at ... > Subject: Re: [Python.NET] pip install prerelease versions > > Hi! > > I just installed using pip as instructed, but I now get an error saying > that it can't find file or assembly Python.Runtime Version 4.0.0.1 and I > can't find a file called that anywhere installed as part of the installation > process. I have some older versions of Python.Runtime but they don't work > (must be wrong version) > > Help. > > Regards, > Rudi > > _________________________________________________ > Python.NET mailing list - PythonDotNet at ... > https://mail.python.org/mailman/listinfo/pythondotnet > _________________________________________________ > Python.NET mailing list - PythonDotNet at ... > https://mail.python.org/mailman/listinfo/pythondotnet > > Hi! I am running python.exe, and doing 'import cld'. Simply starting up Python and doing 'import cld' is enough to trigger an ioException, as shown below: Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\rudil>python Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> import clr Unhandled Exception: System.IO.FileLoadException: Could not load file or assembl y 'Python.Runtime, Version=4.0.0.1, Culture=neutral, PublicKeyToken=5000fea6cba7 02dd' or one of its dependencies. The located assembly's manifest definition doe s not match the assembly reference. (Exception from HRESULT: 0x80131040) at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String cod eBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntro spection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String code Base, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& s tackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntros pection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName as semblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMar k& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIn trospection, Boolean suppressSecurityChecks) at System.Reflection.Assembly.Load(AssemblyName assemblyRef) at clrModule.initclr() Thank you very much for looking at this. Regards, Rudi From rudilutz0 at gmail.com Mon Mar 24 09:36:18 2014 From: rudilutz0 at gmail.com (Rudi Lutz) Date: Mon, 24 Mar 2014 08:36:18 +0000 (UTC) Subject: [Python.NET] pip install prerelease versions References: Message-ID: Issue filed properly now as asked for! Sorry Regards, Rudi From rudilutz0 at gmail.com Mon Mar 24 23:39:51 2014 From: rudilutz0 at gmail.com (Rudi Lutz) Date: Mon, 24 Mar 2014 22:39:51 +0000 (UTC) Subject: [Python.NET] pip install prerelease versions References: Message-ID: Rudi Lutz writes: > > > Issue filed properly now as asked for! Sorry > > Regards, > Rudi > > _________________________________________________ > Python.NET mailing list - PythonDotNet at ... > https://mail.python.org/mailman/listinfo/pythondotnet > > Just in case anyone else has this problem. See David's reply to me: https://github.com/pythonnet/pythonnet/issues/34 It fixed it perfectly Regards, Rudi