From m.schaber at codesys.com Tue Jul 7 16:18:30 2015 From: m.schaber at codesys.com (Markus Schaber) Date: Tue, 7 Jul 2015 14:18:30 +0000 Subject: [Ironpython-users] Problem with the "in" operator for Message-ID: <727D8E16AE957149B447FE368139F2B56CCA3E96@SERVER10> Hi, As far as I can see, the "in" operator should return true if any object in the enumerable is "equal" to the object given as reference: IronPython 2.7.5 (2.7.5.0) on .NET 4.0.30319.34209 (32-bit) Type "help", "copyright", "credits" or "license" for more information. >>> t = (1,2) >>> o = (t, 3, "4", 1024) >>> 1024 in o True >>> "4" in o True >>> (1,2) in o True >>> t in o True >>> a = 2**100 >>> b = 2**100 >>> a in (b,) True >>> a is b False >>> import System >>> g = System.Guid.NewGuid() >>> h = System.Guid(g.ToString()) >>> g == h True >>> g is h False >>> g in (h,) True However, it looks like this is not working correctly with IDynamicMetaObjectProvider implementations. I attached an example which is a stripped down case of some much more complex real world code[1]. In that case, the assertion in the last line fails although a equals b. # a and b are provided by the host written in C# assert a == b, 'a equals b' assert not a is b, 'a is not b' assert a in (a,), 'a is in (a,)' assert a in (b,), 'a is in (b,)' # this one fails... As far as I can see via breakpoints, the Equals methods of the objects are never actually called, except on the first assertion with the == operator. [1] In the real world code, arbitrary plugins may provide extensions to extendable objects from other plugins, to dynamically (at run-time) add methods and properties to those instances. Best regards Markus Schaber CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH Inspiring Automation Solutions 3S-Smart Software Solutions GmbH Dipl.-Inf. Markus Schaber | Product Development Core Technology Memminger Str. 151 | 87439 Kempten | Germany Tel. +49-831-54031-979 | Fax +49-831-54031-50 E-Mail: m.schaber at codesys.com | Web: http://www.codesys.com | CODESYS store: http://store.codesys.com CODESYS forum: http://forum.codesys.com Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Program.cs URL: From vano at mail.mipt.ru Wed Jul 8 06:55:20 2015 From: vano at mail.mipt.ru (Ivan Pozdeev) Date: Wed, 8 Jul 2015 07:55:20 +0300 Subject: [Ironpython-users] Problem with the "in" operator for In-Reply-To: <727D8E16AE957149B447FE368139F2B56CCA3E96@SERVER10> References: <727D8E16AE957149B447FE368139F2B56CCA3E96@SERVER10> Message-ID: <1754090284.20150708075520@mail.mipt.ru> > Hi, > As far as I can see, the "in" operator should return true if any > object in the enumerable is "equal" to the object given as reference: Indeed, https://docs.python.org/2/reference/expressions.html#membership-test-details states: For the list and tuple types, x in y is true if and only if there exists an index i such that x == y[i] is true. Now, to check if IronPython honors this. > assert a in (a,), 'a is in (a,)' > assert a in (b,), 'a is in (b,)' # this one fails... > As far as I can see via breakpoints, the Equals methods of the > objects are never actually called, except on the first assertion with the == operator. My guess is it's cutting corners by comparing hashes instead. -- Regards, Ivan Pozdeev From rkamarowski at yahoo.com Tue Jul 7 18:37:24 2015 From: rkamarowski at yahoo.com (Bob K.) Date: Tue, 7 Jul 2015 12:37:24 -0400 Subject: [Ironpython-users] DependencyProperty problem Message-ID: <000a01d0b8d3$358dcc80$a0a96580$@yahoo.com> Visual Studio Community 2013 IronPython Windows 8.1 I have a button created using xaml. In python I'm trying to set the background using SetValue. SetValue requires the DependencyProperty and then the value I want to set. I've been searching the net and trying different values, but I can't find where/how to define the DependencyProptery. _____ Python: import wpf import clr clr.AddReference('System.Drawing') clr.AddReference("System.Windows") clr.AddReference("WindowsBase") clr.AddReference("PresentationCore") clr.AddReference("PresentationFramework") from System.Drawing import Color from System.Windows import Application, DependencyObject, DependencyProperty, MessageBox, Window class MyWindow(Window): def init(self): wpf.LoadComponent(self, 'Photography.xaml') def ButtonToolbarSession_Click(self, sender, e): self.Background.SetValue(self.Background, Color.Gray) #pass if name == 'main': Application().Run(MyWindow()) If this is not the correct forum, could someone direct me to one? Thank you, Bob K. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnychis at gmail.com Wed Jul 8 17:33:33 2015 From: gnychis at gmail.com (George Nychis) Date: Wed, 08 Jul 2015 15:33:33 +0000 Subject: [Ironpython-users] struggling with Intellisense and GAC Message-ID: I am struggling to get Intellisense working with some DLLs that I have built. I do not want the C# code to be included directly in the project, I only want the functionality to be accessible through a pre-built DLL. First, I am able to run my IronPython code successfully linking to the DLLs by adding where they exist to my search path and then using clr.AddReference() However, using that method I cannot get Intellisense to work. So then I did some searching and found multiple discussions around the DLLs needing to be in the GAC for them to be accessible by Intellisense. Therefore I signed my DLLs (making them strong typed) and added them to the GAC using gacutil.exe. I can verify this by listing the installed modules: $ gacutil.exe -l | grep Utils Utils, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6c2b3719154e5544, processorArchitecture=AMD64 Despite doing that, it is not accessible by the GAC. Additionally, I assumed that I could now drop my search path and the modules would be found using clr.AddReference() in the GAC instead. However, once I drop the search path it does not work again. Could somebody point me in the right direction, here? I'm feeling lost. Thanks much! - George -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnychis at gmail.com Wed Jul 8 17:59:25 2015 From: gnychis at gmail.com (George Nychis) Date: Wed, 08 Jul 2015 15:59:25 +0000 Subject: [Ironpython-users] struggling with Intellisense and GAC In-Reply-To: References: Message-ID: I was able to solve accessing the DLL directly in the GAC by more explicitly specifying it: clr.AddReference("Utils, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6c2b3719154e5544") But that did not fix intellisense. On Wed, Jul 8, 2015 at 11:33 AM George Nychis wrote: > I am struggling to get Intellisense working with some DLLs that I have > built. I do not want the C# code to be included directly in the project, I > only want the functionality to be accessible through a pre-built DLL. > > First, I am able to run my IronPython code successfully linking to the > DLLs by adding where they exist to my search path and then using > clr.AddReference() > > However, using that method I cannot get Intellisense to work. So then I > did some searching and found multiple discussions around the DLLs needing > to be in the GAC for them to be accessible by Intellisense. > > Therefore I signed my DLLs (making them strong typed) and added them to > the GAC using gacutil.exe. I can verify this by listing the installed > modules: > > $ gacutil.exe -l | grep Utils > Utils, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=6c2b3719154e5544, processorArchitecture=AMD64 > > Despite doing that, it is not accessible by the GAC. Additionally, I > assumed that I could now drop my search path and the modules would be found > using clr.AddReference() in the GAC instead. However, once I drop the > search path it does not work again. > > Could somebody point me in the right direction, here? I'm feeling lost. > > Thanks much! > > - George > -------------- next part -------------- An HTML attachment was scrubbed... URL: From andy at agraham.demon.co.uk Thu Jul 9 20:01:34 2015 From: andy at agraham.demon.co.uk (Andrew Graham) Date: Thu, 9 Jul 2015 19:01:34 +0100 Subject: [Ironpython-users] struggling with Intellisense and GAC In-Reply-To: References: Message-ID: Is it Intellisense in Python Tools for Visual Studio you are referring to? If so my experience is that to obtain Intellisense you don?t need your DLLs in the GAC. To see my custom DLL in my project I do four things. 1) Add the DLL or EXE Assemblies to References in your IronPython project (I?m not sure if this is essential) 2) Add the folder where the Assemblies are located to Search Paths in your IronPython project. This does seem to be essential. 3) Add ?clr.AddReference(MyDllName?) to your code where the DLL path is in sys.path 4)Add ?import ANamespaceInMyDll? or ?from ANamespaceInMyDll import *? or similar. Note that the C# namespace containing the Class definitions maps to an IronPython module. You should now get Intellisense for each class in the imported Namespaces Andy Graham From: George Nychis Sent: Wednesday, July 08, 2015 4:33 PM To: ironpython-users at python.org Subject: [Ironpython-users] struggling with Intellisense and GAC I am struggling to get Intellisense working with some DLLs that I have built. I do not want the C# code to be included directly in the project, I only want the functionality to be accessible through a pre-built DLL. First, I am able to run my IronPython code successfully linking to the DLLs by adding where they exist to my search path and then using clr.AddReference() However, using that method I cannot get Intellisense to work. So then I did some searching and found multiple discussions around the DLLs needing to be in the GAC for them to be accessible by Intellisense. Therefore I signed my DLLs (making them strong typed) and added them to the GAC using gacutil.exe. I can verify this by listing the installed modules: $ gacutil.exe -l | grep Utils Utils, Version=1.0.0.0, Culture=neutral, PublicKeyToken=6c2b3719154e5544, processorArchitecture=AMD64 Despite doing that, it is not accessible by the GAC. Additionally, I assumed that I could now drop my search path and the modules would be found using clr.AddReference() in the GAC instead. However, once I drop the search path it does not work again. Could somebody point me in the right direction, here? I'm feeling lost. Thanks much! - George -------------------------------------------------------------------------------- _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org https://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnychis at gmail.com Thu Jul 9 20:09:55 2015 From: gnychis at gmail.com (George Nychis) Date: Thu, 09 Jul 2015 18:09:55 +0000 Subject: [Ironpython-users] struggling with Intellisense and GAC In-Reply-To: References: Message-ID: Hi Andy, Thanks so much for your response. The issue turned out to be something fundamental... my DLL was built as "x64" and not as "Any CPU" (even though I was explicitly using 64-bit ironpython). As soon as I switch to "Any CPU" the intellisense started working in the base cases! I've now been struggling with another Intellisense related issue that I think might be driven by IronPython using old-style Python classes? In my C# code, assume I have a class "CSharpTest(string first, string second)" that I want to inherit from my Python class AND I want the Python class to not require parameters (i.e., it will explicitly call the CSharpTest constructor)... I believe I have to do the following: ######################################## class Child (CSharpTest): def __new__(cls): instance = CSharpTest.__new__(cls, "one", "two") return instance ######################################### The issue seems to be that "instance" is of unknown type, which I think is driven by old-style classes. Am I doing inheritance the proper way here? So when I go to do: c = Child() "c" does not seem to have any Intellisensable class members, and I believe this is because its type is unknown. Is my understanding correct that this is due to old-style classes? Or might I be missing something else? On Thu, Jul 9, 2015 at 2:01 PM Andrew Graham wrote: > Is it Intellisense in Python Tools for Visual Studio you are referring > to? > > If so my experience is that to obtain Intellisense you don?t need your > DLLs in the GAC. > > To see my custom DLL in my project I do four things. > > 1) Add the DLL or EXE Assemblies to References in your IronPython project > (I?m not sure if this is essential) > > 2) Add the folder where the Assemblies are located to Search Paths in your > IronPython project. This does seem to be essential. > > 3) Add ?clr.AddReference(MyDllName?) to your code where the DLL path is in > sys.path > > 4)Add ?import ANamespaceInMyDll? or ?from ANamespaceInMyDll import *? or > similar. > > Note that the C# namespace containing the Class definitions maps to an > IronPython module. > You should now get Intellisense for each class in the imported Namespaces > > > Andy Graham > > > > *From:* George Nychis > *Sent:* Wednesday, July 08, 2015 4:33 PM > *To:* ironpython-users at python.org > *Subject:* [Ironpython-users] struggling with Intellisense and GAC > > I am struggling to get Intellisense working with some DLLs that I have > built. I do not want the C# code to be included directly in the project, I > only want the functionality to be accessible through a pre-built DLL. > > First, I am able to run my IronPython code successfully linking to the > DLLs by adding where they exist to my search path and then using > clr.AddReference() > > However, using that method I cannot get Intellisense to work. So then I > did some searching and found multiple discussions around the DLLs needing > to be in the GAC for them to be accessible by Intellisense. > > Therefore I signed my DLLs (making them strong typed) and added them to > the GAC using gacutil.exe. I can verify this by listing the installed > modules: > > $ gacutil.exe -l | grep Utils > Utils, Version=1.0.0.0, Culture=neutral, > PublicKeyToken=6c2b3719154e5544, processorArchitecture=AMD64 > > Despite doing that, it is not accessible by the GAC. Additionally, I > assumed that I could now drop my search path and the modules would be found > using clr.AddReference() in the GAC instead. However, once I drop the > search path it does not work again. > > Could somebody point me in the right direction, here? I'm feeling lost. > > Thanks much! > > - George > > ------------------------------ > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.schaber at codesys.com Fri Jul 10 08:50:50 2015 From: m.schaber at codesys.com (Markus Schaber) Date: Fri, 10 Jul 2015 06:50:50 +0000 Subject: [Ironpython-users] Problem with the "in" operator for In-Reply-To: <1754090284.20150708075520@mail.mipt.ru> References: <727D8E16AE957149B447FE368139F2B56CCA3E96@SERVER10> <1754090284.20150708075520@mail.mipt.ru> Message-ID: <727D8E16AE957149B447FE368139F2B56CCA57B9@SERVER10> Hi, Ivan, Von: Ivan Pozdeev [mailto:vano at mail.mipt.ru] > > As far as I can see, the "in" operator should return true if any > > object in the enumerable is "equal" to the object given as reference: > > Indeed, https://docs.python.org/2/reference/expressions.html#membership-test- > details states: > > For the list and tuple types, x in y is true if and only if there exists an > index i such that x == y[i] is true. > > Now, to check if IronPython honors this. > > > assert a in (a,), 'a is in (a,)' > > assert a in (b,), 'a is in (b,)' # this one fails... > > > As far as I can see via breakpoints, the Equals methods of the objects > > are never actually called, except on the first assertion with the == > > operator. > > My guess is it's cutting corners by comparing hashes instead. Hm, the GetHashCode() method in my example is hardcoded to return 0, and it is not even called (at least, the breakpoint is not hit. There must be something more subtle... Best regards Markus Schaber CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH Inspiring Automation Solutions 3S-Smart Software Solutions GmbH Dipl.-Inf. Markus Schaber | Product Development Core Technology Memminger Str. 151 | 87439 Kempten | Germany Tel. +49-831-54031-979 | Fax +49-831-54031-50 E-Mail: m.schaber at codesys.com | Web: http://www.codesys.com | CODESYS store: http://store.codesys.com CODESYS forum: http://forum.codesys.com Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. From jdhardy at gmail.com Tue Jul 14 06:25:31 2015 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 13 Jul 2015 21:25:31 -0700 Subject: [Ironpython-users] Problem with the "in" operator for In-Reply-To: <727D8E16AE957149B447FE368139F2B56CCA57B9@SERVER10> References: <727D8E16AE957149B447FE368139F2B56CCA3E96@SERVER10> <1754090284.20150708075520@mail.mipt.ru> <727D8E16AE957149B447FE368139F2B56CCA57B9@SERVER10> Message-ID: On Thu, Jul 9, 2015 at 11:50 PM, Markus Schaber wrote: > Hi, Ivan, > > Von: Ivan Pozdeev [mailto:vano at mail.mipt.ru] > >> > As far as I can see, the "in" operator should return true if any >> > object in the enumerable is "equal" to the object given as reference: >> >> Indeed, https://docs.python.org/2/reference/expressions.html#membership-test- >> details states: >> >> For the list and tuple types, x in y is true if and only if there exists an >> index i such that x == y[i] is true. >> >> Now, to check if IronPython honors this. >> >> > assert a in (a,), 'a is in (a,)' >> > assert a in (b,), 'a is in (b,)' # this one fails... >> >> > As far as I can see via breakpoints, the Equals methods of the objects >> > are never actually called, except on the first assertion with the == >> > operator. >> >> My guess is it's cutting corners by comparing hashes instead. > > Hm, the GetHashCode() method in my example is hardcoded to return 0, and it is not even called (at least, the breakpoint is not hit. > > There must be something more subtle... In theory it should be creating a dynamic call site for "equals" that will handle all of the cases (except for types that have a __contains__ method) including IDMOP. Which there could very likely be a bug in how that is generated; I'm not sure the IDMOP is stuff gets excersized as much as it should. - Jeff From gnychis at gmail.com Mon Jul 20 23:40:41 2015 From: gnychis at gmail.com (George Nychis) Date: Mon, 20 Jul 2015 17:40:41 -0400 Subject: [Ironpython-users] trouble installing Pylint Message-ID: I am trying to install Pylint with IronPython, but I'm running in to the following issue below. Is there something special that I need to do to install pylint? $ ./ipy.exe -X:Frames -m pip install pylint Downloading/unpacking pylint C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py:1: DeprecationWarning: object.__new__() takes no parameters # urllib3/connectionpool.py C:\Program Files (x86)\IronPython 2.7\Lib\weakref.py:1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef """Weak reference support for Python. Requirement already satisfied (use --upgrade to upgrade): six in c:\program files (x86)\ironpython 2.7\lib\site-packages (from pylint) Downloading/unpacking astroid>=1.3.6 (from pylint) Cleaning up... Exception: Traceback (most recent call last): File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\basecommand.py", line 122, in main status = self.run(options, args) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\commands\install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\req.py", line 1201, in prepare_files self.unpack_url( File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\req.py", line 1376, in unpack_url unpack_http_url( File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\download.py", line 546, in unpack_http_url resp = session.get(target_url, stream=True) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\sessions.py", line 468, in get return self.request('GET', url, **kwargs) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\download.py", line 237, in request return super(PipSession, self).request(method, url, *args, **kwargs) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\sessions.py", line 456, in request resp = self.send(prep, **send_kwargs) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\sessions.py", line 559, in send r = adapter.send(request, **kwargs) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\adapters.py", line 317, in send resp = conn.urlopen( File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 502, in urlopen response = HTTPResponse.from_httplib(httplib_response, File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 256, in from_httplib headers = HTTPHeaderDict() File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\_collections.py", line 155, in __init__ self.update(headers, **kwargs) File "C:\Program Files (x86)\IronPython 2.7\Lib\_abcoll.py", line 492, in update if isinstance(other, Mapping): File "C:\Program Files (x86)\IronPython 2.7\Lib\abc.py", line 132, in __instancecheck__ if subclass is not None and subclass in cls._abc_cache: File "C:\Program Files (x86)\IronPython 2.7\Lib\_weakrefset.py", line 70, in __contains__ wr = ref(item) ValueError: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index -------------- next part -------------- An HTML attachment was scrubbed... URL: From fernandez_dan2 at hotmail.com Wed Jul 22 05:26:14 2015 From: fernandez_dan2 at hotmail.com (Daniel Fernandez) Date: Tue, 21 Jul 2015 21:26:14 -0600 Subject: [Ironpython-users] trouble installing Pylint In-Reply-To: References: Message-ID: Hi George, I ran the same command line arguments and it installed correctly. Here is my output c:\IronPython27>ipy.exe -X:Frames -m pip install pylint Downloading/unpacking pylint C:\IronPython27\Lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py:1: DeprecationWarning: object.__new__() takes no parameters # urllib3/connectionpool.py c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef """Weak reference support for Python. Downloading/unpacking six (from pylint) Downloading six-1.9.0-py2.py3-none-any.whl Downloading/unpacking astroid>=1.3.6 (from pylint) Downloading/unpacking logilab-common>=0.53.0 (from pylint) Running setup.py (path:c:\users\dafern1\appdata\local\temp\pip_build_DAFERN1\logilab-common\setup.py) egg_info for package logilab-common c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef """Weak reference support for Python. warning: no files found matching '*.py' under directory 'test\input' warning: no files found matching '*' under directory 'doc\html' Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\ironpython27\lib\site-packages (from logilab-common>=0.53.0->pylint) Downloading/unpacking colorama (from logilab-common>=0.53.0->pylint) Downloading colorama-0.3.3.tar.gz Running setup.py (path:c:\users\dafern1\appdata\local\temp\pip_build_DAFERN1\colorama\setup.py) egg_info for package colorama c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef """Weak reference support for Python. Installing collected packages: pylint, six, astroid, logilab-common, colorama Running setup.py install for logilab-common c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef """Weak reference support for Python. warning: build_py: byte-compiling is disabled, skipping. Skipping installation of c:\IronPython27\Lib\site-packages\logilab\__init__.py (namespace package) warning: install_lib: byte-compiling is disabled, skipping. warning: no files found matching '*.py' under directory 'test\input' warning: no files found matching '*' under directory 'doc\html' Installing c:\IronPython27\Lib\site-packages\logilab_common-1.0.2-py2.7-nspkg.pth Running setup.py install for colorama c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef """Weak reference support for Python. warning: build_py: byte-compiling is disabled, skipping. warning: install_lib: byte-compiling is disabled, skipping. Successfully installed pylint six astroid logilab-common colorama Cleaning up... c:\IronPython27> I see this in my output c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef """Weak reference support for Python. At the moment I'm trying to see if I can reproduce the issue but not luck. Danny Date: Mon, 20 Jul 2015 17:40:41 -0400 From: gnychis at gmail.com To: ironpython-users at python.org Subject: [Ironpython-users] trouble installing Pylint I am trying to install Pylint with IronPython, but I'm running in to the following issue below. Is there something special that I need to do to install pylint? $ ./ipy.exe -X:Frames -m pip install pylintDownloading/unpacking pylintC:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py:1: DeprecationWarning: object.__new__() takes no parameters # urllib3/connectionpool.pyC:\Program Files (x86)\IronPython 2.7\Lib\weakref.py:1: DeprecationWarning: object.__init__() takes no parameters for type KeyedRef """Weak reference support for Python.Requirement already satisfied (use --upgrade to upgrade): six in c:\program files (x86)\ironpython 2.7\lib\site-packages (from pylint)Downloading/unpacking astroid>=1.3.6 (from pylint)Cleaning up...Exception:Traceback (most recent call last): File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\basecommand.py", line 122, in main status = self.run(options, args) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\commands\install.py", line 278, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\req.py", line 1201, in prepare_files self.unpack_url( File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\req.py", line 1376, in unpack_url unpack_http_url( File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\download.py", line 546, in unpack_http_url resp = session.get(target_url, stream=True) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\sessions.py", line 468, in get return self.request('GET', url, **kwargs) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\download.py", line 237, in request return super(PipSession, self).request(method, url, *args, **kwargs) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\sessions.py", line 456, in request resp = self.send(prep, **send_kwargs) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\sessions.py", line 559, in send r = adapter.send(request, **kwargs) File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\adapters.py", line 317, in send resp = conn.urlopen( File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py", line 502, in urlopen response = HTTPResponse.from_httplib(httplib_response, File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", line 256, in from_httplib headers = HTTPHeaderDict() File "C:\Program Files (x86)\IronPython 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\_collections.py", line 155, in __init__ self.update(headers, **kwargs) File "C:\Program Files (x86)\IronPython 2.7\Lib\_abcoll.py", line 492, in update if isinstance(other, Mapping): File "C:\Program Files (x86)\IronPython 2.7\Lib\abc.py", line 132, in __instancecheck__ if subclass is not None and subclass in cls._abc_cache: File "C:\Program Files (x86)\IronPython 2.7\Lib\_weakrefset.py", line 70, in __contains__ wr = ref(item)ValueError: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org https://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From gnychis at gmail.com Wed Jul 22 15:52:14 2015 From: gnychis at gmail.com (George Nychis) Date: Wed, 22 Jul 2015 09:52:14 -0400 Subject: [Ironpython-users] trouble installing Pylint In-Reply-To: References: Message-ID: Hi Danny, I actually was able to get it installed in the end. But it doesn't seem to know of the methods in my C# library. I'm wondering if it's because I haven't setup my paths properly, or if Pylint is unable to recognize the C# libraries and methods. I'm continuing to try and set it up properly, but does Pylint for sure work with C# libraries imported by IronPython? Thanks a bunch for your help. Best, George On Tue, Jul 21, 2015 at 11:26 PM, Daniel Fernandez < fernandez_dan2 at hotmail.com> wrote: > Hi George, > > I ran the same command line arguments and it installed correctly. > > Here is my output > > c:\IronPython27>ipy.exe -X:Frames -m pip install pylint > Downloading/unpacking pylint > C:\IronPython27\Lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py:1: > DeprecationWarning: object.__new__() takes no parameters > # urllib3/connectionpool.py > c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: object.__init__() > takes no parameters for type KeyedRef > """Weak reference support for Python. > Downloading/unpacking six (from pylint) > Downloading six-1.9.0-py2.py3-none-any.whl > Downloading/unpacking astroid>=1.3.6 (from pylint) > Downloading/unpacking logilab-common>=0.53.0 (from pylint) > Running setup.py > (path:c:\users\dafern1\appdata\local\temp\pip_build_DAFERN1\logilab-common\setup.py) > egg_info for package logilab-common > c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: > object.__init__() takes no parameters for type KeyedRef > """Weak reference support for Python. > warning: no files found matching '*.py' under directory 'test\input' > warning: no files found matching '*' under directory 'doc\html' > Requirement already satisfied (use --upgrade to upgrade): setuptools in > c:\ironpython27\lib\site-packages (from logilab-common>=0.53.0->pylint) > Downloading/unpacking colorama (from logilab-common>=0.53.0->pylint) > Downloading colorama-0.3.3.tar.gz > Running setup.py > (path:c:\users\dafern1\appdata\local\temp\pip_build_DAFERN1\colorama\setup.py) > egg_info for package colorama > c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: > object.__init__() takes no parameters for type KeyedRef > """Weak reference support for Python. > Installing collected packages: pylint, six, astroid, logilab-common, > colorama > Running setup.py install for logilab-common > c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: > object.__init__() takes no parameters for type KeyedRef > """Weak reference support for Python. > warning: build_py: byte-compiling is disabled, skipping. > Skipping installation of > c:\IronPython27\Lib\site-packages\logilab\__init__.py (namespace package) > warning: install_lib: byte-compiling is disabled, skipping. > > warning: no files found matching '*.py' under directory 'test\input' > warning: no files found matching '*' under directory 'doc\html' > Installing > c:\IronPython27\Lib\site-packages\logilab_common-1.0.2-py2.7-nspkg.pth > Running setup.py install for colorama > c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: > object.__init__() takes no parameters for type KeyedRef > """Weak reference support for Python. > warning: build_py: byte-compiling is disabled, skipping. > warning: install_lib: byte-compiling is disabled, skipping. > > Successfully installed pylint six astroid logilab-common colorama > Cleaning up... > > c:\IronPython27> > > > I see this in my output > c:\IronPython27\Lib\weakref.py:1: DeprecationWarning: object.__init__() > takes no parameters for type KeyedRef > """Weak reference support for Python. > > > At the moment I'm trying to see if I can reproduce the issue but not luck. > > Danny > > ------------------------------ > Date: Mon, 20 Jul 2015 17:40:41 -0400 > From: gnychis at gmail.com > To: ironpython-users at python.org > Subject: [Ironpython-users] trouble installing Pylint > > > I am trying to install Pylint with IronPython, but I'm running in to the > following issue below. Is there something special that I need to do to > install pylint? > > $ ./ipy.exe -X:Frames -m pip install pylint > Downloading/unpacking pylint > C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py:1: > DeprecationWarning: object.__new__() takes no parameters > # urllib3/connectionpool.py > C:\Program Files (x86)\IronPython 2.7\Lib\weakref.py:1: > DeprecationWarning: object.__init__() takes no parameters for type KeyedRef > """Weak reference support for Python. > Requirement already satisfied (use --upgrade to upgrade): six in > c:\program files (x86)\ironpython 2.7\lib\site-packages (from pylint) > Downloading/unpacking astroid>=1.3.6 (from pylint) > Cleaning up... > Exception: > Traceback (most recent call last): > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\basecommand.py", line 122, in main > status = self.run(options, args) > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\commands\install.py", line 278, in run > requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, > bundle=self.bundle) > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\req.py", line 1201, in prepare_files > self.unpack_url( > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\req.py", line 1376, in unpack_url > unpack_http_url( > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\download.py", line 546, in unpack_http_url > resp = session.get(target_url, stream=True) > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\_vendor\requests\sessions.py", line 468, in get > return self.request('GET', url, **kwargs) > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\download.py", line 237, in request > return super(PipSession, self).request(method, url, *args, **kwargs) > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\_vendor\requests\sessions.py", line 456, in > request > resp = self.send(prep, **send_kwargs) > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\_vendor\requests\sessions.py", line 559, in send > r = adapter.send(request, **kwargs) > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\_vendor\requests\adapters.py", line 317, in send > resp = conn.urlopen( > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\connectionpool.py", > line 502, in urlopen > response = HTTPResponse.from_httplib(httplib_response, > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\response.py", > line 256, in from_httplib > headers = HTTPHeaderDict() > File "C:\Program Files (x86)\IronPython > 2.7\lib\site-packages\pip\_vendor\requests\packages\urllib3\_collections.py", > line 155, in __init__ > self.update(headers, **kwargs) > File "C:\Program Files (x86)\IronPython 2.7\Lib\_abcoll.py", line 492, > in update > if isinstance(other, Mapping): > File "C:\Program Files (x86)\IronPython 2.7\Lib\abc.py", line 132, in > __instancecheck__ > if subclass is not None and subclass in cls._abc_cache: > File "C:\Program Files (x86)\IronPython 2.7\Lib\_weakrefset.py", line > 70, in __contains__ > wr = ref(item) > ValueError: Index was out of range. Must be non-negative and less than the > size of the collection. > Parameter name: index > > > _______________________________________________ Ironpython-users mailing > list Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From gandia at arch.ethz.ch Wed Jul 29 09:56:40 2015 From: gandia at arch.ethz.ch (Gandia Augusto) Date: Wed, 29 Jul 2015 07:56:40 +0000 Subject: [Ironpython-users] question Message-ID: <806CEE10BA7D4942B62B9C69A111C5FC2139E853@MBX214.d.ethz.ch> In this function: def simxWriteStringStream(clientID, signalName, signalValue, operationMode): ''' Please have a look at the function description/documentation in the V-REP user manual ''' sigV=signalValue if sys.version_info[0] == 3: if type(signalName) is str: signalName=signalName.encode('utf-8') if type(signalValue) is bytearray: sigV = (ct.c_ubyte*len(signalValue))(*signalValue) if type(signalValue) is str: signalValue=signalValue.encode('utf-8') sigV = (ct.c_ubyte*len(signalValue))(*signalValue) else: if type(signalValue) is bytearray: sigV = (ct.c_ubyte*len(signalValue))(*signalValue) if type(signalValue) is str: signalValue=bytearray(signalValue)#<=============================================================HERE IS WHERE I GET THE ERROR sigV = (ct.c_ubyte*len(signalValue))(*signalValue) sigV=ct.cast(sigV,ct.POINTER(ct.c_ubyte)) # IronPython needs this return c_WriteStringStream(clientID, signalName, sigV, len(signalValue), operationMode) The error I get is : Program started Connected to remote API server Runtime error (TypeErrorException): unicode argument without an encoding Traceback: line 1052, in simxWriteStringStream, "C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\programming\remoteApiBindings\python\python\vrep.py" line 70, in script Any idea of what this could be? -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsemgnip at gmail.com Tue Jul 28 15:44:17 2015 From: jsemgnip at gmail.com (=?UTF-8?B?SsOhbiBHbmlw?=) Date: Tue, 28 Jul 2015 15:44:17 +0200 Subject: [Ironpython-users] Support of Python 3.x Message-ID: Hi guys, are there any planned releases with python 3.x support? If so, do you know estimated dates? What needs to be done and how can I help you with something with intermediate python skills and beginner C# skills? Thank you for the info. Droidik -------------- next part -------------- An HTML attachment was scrubbed... URL: