From no_reply at codeplex.com Fri Jul 4 09:26:14 2014 From: no_reply at codeplex.com (CodePlex) Date: 4 Jul 2014 00:26:14 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/3/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] "{} in {}" returns False instead of raising TypeError ---------------------------------------------- ISSUES 1. [New issue] "{} in {}" returns False instead of raising TypeError http://ironpython.codeplex.com/workitem/35348 User ysitu has proposed the issue: "IronPython 2.7.5b2 (2.7.5.0) on .NET 4.0.30319.34014 (64-bit) Type "help", "copyright", "credits" or "license" for more information. >>> {} in {} False This is inconsistent with CPython: Python 2.7.6 (default, Mar 22 2014, 22:59:38) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> {} in {} Traceback (most recent call last): File "", line 1, in TypeError: unhashable type: 'dict' See http://bugs.python.org/issue18510." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sat Jul 5 09:31:12 2014 From: no_reply at codeplex.com (CodePlex) Date: 5 Jul 2014 00:31:12 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/4/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] ensurepip support 2. [New comment] zlib - ValueError: Invalid initialization option 3. [New comment] __name__ not set to __main__ 4. [New comment] ctype legacy support 5. [New issue] PYTHONIOENCODING is ignored ---------------------------------------------- ISSUES 1. [New comment] ensurepip support http://ironpython.codeplex.com/workitem/35198 User paweljasinski has commented on the issue: "

fixed in 4aa646daf0c0f4a7097880b4039e19049ba48c7f

"----------------- 2. [New comment] zlib - ValueError: Invalid initialization option http://ironpython.codeplex.com/workitem/35295 User paweljasinski has commented on the issue: "

fixed in 21ee91eded2048a4875e7a277bc2aebd52b05c05

"----------------- 3. [New comment] __name__ not set to __main__ http://ironpython.codeplex.com/workitem/35322 User paweljasinski has commented on the issue: "

fixed in 4a10f44f93fbeddf0b585dfd7e9ae2d2d13999a3

"----------------- 4. [New comment] ctype legacy support http://ironpython.codeplex.com/workitem/35326 User paweljasinski has commented on the issue: "

fixed in c969a597eed55785eac37bf4f323c20e62c389c5

"----------------- 5. [New issue] PYTHONIOENCODING is ignored http://ironpython.codeplex.com/workitem/35352 User paweljasinski has proposed the issue: "when using alternative console, such as mintty or redirecting stdout/stderr, the recommended way to overwrite default encoding doesn't work. https://docs.python.org/2.7/using/cmdline.html?highlight=pythonioencoding#envvar-PYTHONIOENCODING $ export PYTHONIOENCODING=utf-8 $ ipy -c 'import sys; sys.stdout.write("?\n"); print sys.stdout.encoding' ? cp437 " ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sun Jul 6 09:24:01 2014 From: no_reply at codeplex.com (CodePlex) Date: 6 Jul 2014 00:24:01 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/5/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] PYTHONIOENCODING is ignored 2. [Status update] PYTHONIOENCODING is ignored ---------------------------------------------- ISSUES 1. [New comment] PYTHONIOENCODING is ignored http://ironpython.codeplex.com/workitem/35352 User paweljasinski has commented on the issue: "

The better solution is to set the terminal encoding in terminal. Inside mintty under cygwin it is:
```
cmd /c chcp 65001
```

"----------------- 2. [Status update] PYTHONIOENCODING is ignored http://ironpython.codeplex.com/workitem/35352 User paweljasinski has updated the issue: Status has changed from Active to Closed. ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Mon Jul 7 09:24:42 2014 From: no_reply at codeplex.com (CodePlex) Date: 7 Jul 2014 00:24:42 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/6/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] compile() does not recognize CO_FUTURE_PRINT_FUNCTION ---------------------------------------------- ISSUES 1. [New issue] compile() does not recognize CO_FUTURE_PRINT_FUNCTION http://ironpython.codeplex.com/workitem/35354 User ysitu has proposed the issue: "CO_FUTURE_PRINT_FUNCTION does not have an entry in the CompilerFlags enum and is not handled by the GetCompilerFlags function." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Tue Jul 8 09:25:41 2014 From: no_reply at codeplex.com (CodePlex) Date: 8 Jul 2014 00:25:41 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/7/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] iter(object) does not raise TypeError 2. [New comment] iter(object) does not raise TypeError 3. [New comment] from multiprocessing.pool import ThreadPool fails ---------------------------------------------- ISSUES 1. [New comment] iter(object) does not raise TypeError http://ironpython.codeplex.com/workitem/34705 User paweljasinski has commented on the issue: "

additional test case which should work at the same time:
```
>>> class Foo(object):
def __iter__(self):
... bar = "bar"
... baz = 1
... class __metaclass__(type):
... def __iter__(self):
... for attr in dir(Foo):
... if not attr.startswith("__"):
... yield attr
...
>>> iter(Foo)
<generator object __iter__ at 0x6ffffef2f50>
>>> for f in Foo:
... print f
...
bar
baz
>>>
```

"----------------- 2. [New comment] iter(object) does not raise TypeError http://ironpython.codeplex.com/workitem/34705 User paweljasinski has commented on the issue: "

the second line of the snipped should not be there
```
class Foo(object):
bar = "bar"
baz = 1
class __metaclass__(type):
def __iter__(self):
for attr in dir(Foo):
if not attr.startswith("__"):
yield attr
for f in Foo:
print f
```

"----------------- 3. [New comment] from multiprocessing.pool import ThreadPool fails http://ironpython.codeplex.com/workitem/34959 User paweljasinski has commented on the issue: "

fixed in 7e78d327d4c8750fd4c97a6f9ec0bcf5b51e22e5

" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From LMorrison at CalAmp.com Tue Jul 8 09:30:15 2014 From: LMorrison at CalAmp.com (Lance Morrison) Date: Tue, 8 Jul 2014 00:30:15 -0700 Subject: [Ironpython-users] Crash creating watermark Message-ID: <0EF62BA3BD36B84C9BCC4E12216A74CA052A7F4ED9@oxn-mx01.PD.CalAmpCorp.com> The following code crashes with a XamlObjectWriterException - Failed to create a 'ImageSource' from the text 'watermark.png'. Is there a way around this? Using IronPython 2.7.5b2 build. watermark.png -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Wed Jul 9 09:28:07 2014 From: no_reply at codeplex.com (CodePlex) Date: 9 Jul 2014 00:28:07 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/8/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] print u'\xe4'.encode(sys.stdout.encoding) -> ? ---------------------------------------------- ISSUES 1. [New comment] print u'\xe4'.encode(sys.stdout.encoding) -> ? http://ironpython.codeplex.com/workitem/29487 User jdhardy has commented on the issue: "

This is probably related to https://ironpython.codeplex.com/workitem/34842.

" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdimatteo at gmail.com Wed Jul 9 01:04:28 2014 From: jdimatteo at gmail.com (John DiMatteo) Date: Tue, 8 Jul 2014 17:04:28 -0600 Subject: [Ironpython-users] Enable Unmanaged Debugging IronPython Message-ID: Hello, While debugging, with an IronPython startup project, I'm trying to step from IronPython to C# code to unmanaged C/C++ code. Is this possible? I am currently able to step from IronPython to C# when the startup project is IronPython. I'm also currently able to step from C# to unmanaged C/C++ code when the startup project is C#. However, I am not able to step from IronPython to C# to C++ when the startup project is IronPython. Even though there was no relevant gui option I could find, I tried edited the .pyproj file, changing the EnableUnmanagedDebugging field from "false" to "true", but this did not have any noticeable impact. I'm using Visual Studio 2010 and Microsoft Visual Studio 2010 (Version 10.0.40219.1 SP1Rel), Microsoft .NET Framework Version 4.5.50709 SP1Rel, and Python Tools for Visual Studio 2.1.20620.00. I would greatly appreciate any help in this, even if just to confirm it is not possible so that I stop trying. Regards, John -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Wed Jul 9 14:14:41 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 9 Jul 2014 13:14:41 +0100 Subject: [Ironpython-users] Enable Unmanaged Debugging IronPython In-Reply-To: References: Message-ID: Adding DinoV because this sounds more like a PTVS issue than an IronPython issue - from the IronPython side there's nothing that should prevent it from working AFAIK. IronPython in VS uses the normal managed debugger. - Jeff On Wed, Jul 9, 2014 at 12:04 AM, John DiMatteo wrote: > Hello, > > While debugging, with an IronPython startup project, I'm trying to step > from IronPython to C# code to unmanaged C/C++ code. Is this possible? > > I am currently able to step from IronPython to C# when the startup project > is IronPython. I'm also currently able to step from C# to unmanaged C/C++ > code when the startup project is C#. However, I am not able to step from > IronPython to C# to C++ when the startup project is IronPython. > > Even though there was no relevant gui option I could find, I tried edited > the .pyproj file, changing the EnableUnmanagedDebugging field from "false" > to "true", but this did not have any noticeable impact. > > I'm using Visual Studio 2010 and Microsoft Visual Studio 2010 (Version > 10.0.40219.1 SP1Rel), Microsoft .NET Framework Version 4.5.50709 SP1Rel, > and Python Tools for Visual Studio 2.1.20620.00. > > I would greatly appreciate any help in this, even if just to confirm it is > not possible so that I stop trying. > > Regards, > John > > _______________________________________________ > 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 slide.o.mix at gmail.com Wed Jul 9 21:37:14 2014 From: slide.o.mix at gmail.com (Slide) Date: Wed, 9 Jul 2014 12:37:14 -0700 Subject: [Ironpython-users] Memory Leak and Lightweight Scopes In-Reply-To: <6C7ABA8B4E309440B857D74348836F2E4916664E@TK5EX14MBXC294.redmond.corp.microsoft.com> References: <727D8E16AE957149B447FE368139F2B508B2972D@SERVER10> <6C7ABA8B4E309440B857D74348836F2E49141A30@TK5EX14MBXC294.redmond.corp.microsoft.com> <727D8E16AE957149B447FE368139F2B508B35005@SERVER10> <727D8E16AE957149B447FE368139F2B508B39032@SERVER10> <6C7ABA8B4E309440B857D74348836F2E4916664E@TK5EX14MBXC294.redmond.corp.microsoft.com> Message-ID: Dino, Did you ever have a chance to look into this many moons ago, and if not, any tips on how to go about figuring it out? I'm pretty sure I am running into something similar. Thanks, Alex On Wed, Nov 16, 2011 at 10:54 AM, Dino Viehland wrote: > settrace() debugging should be perfectly fine, it's only the .NET > debugging which causes the memory leaks. Can you open a bug and attach the > repro? The repro's simple enough, I might be able to track down the leak > fairly quickly. > > -----Original Message----- > From: ironpython-users-bounces+dinov=microsoft.com at python.org [mailto: > ironpython-users-bounces+dinov=microsoft.com at python.org] On Behalf Of > Markus Schaber > Sent: Wednesday, November 16, 2011 1:40 AM > To: Markus Schaber; ironpython-users at python.org > Subject: Re: [Ironpython-users] Memory Leak and Lightweight Scopes > > Hi, Dino, > > Von: Markus Schaber > > Von: Dino Viehland [mailto:dinov at microsoft.com] > >> Also make sure that you don't have debugging enabled as that forces to > create uncollectible code too and probably overrides the light weight > scopes option. > > I'll first try to check that one. The reason is that we are using > settrace() unconditionally, currently. > > Removing the settrace() call and all other language options except > LightweightScopes actually reduces the problem by an enormous amount. > > I guess what's left is the generated code in the dynamic assemblies, and > to get rid of that leak, we will have to use AppDomains, right? > > I also wanted to try the interpreted mode, but found a comment that this > mode is ignored. Is that correct? > > > Thanks, > Markus Schaber > -- > ___________________________ > We software Automation. > > 3S-Smart Software Solutions GmbH > Markus Schaber | Developer > Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax > +49-831-54031-50 > > Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com > CoDeSys internet forum: http://forum.3s-software.com Download CoDeSys > sample projects: http://www.3s-software.com/index.shtml?sample_projects > > Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | > Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > Mit freundlichen Gr??en > > Markus Schaber > -- > ___________________________ > We software Automation. > > 3S-Smart Software Solutions GmbH > Markus Schaber | Entwicklung > Memminger Str. 151 | 87439 Kempten | Tel. +49-831-54031-0 | Fax > +49-831-54031-50 > > Email: m.schaber at 3s-software.com | Web: http://www.3s-software.com > CoDeSys Internet-Forum: http://forum.3s-software.com > > Gesch?ftsf?hrer: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | > Handelsregister: Kempten HRB 6186 | USt-IDNr.: DE 167014915 > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From Andrew.Stephens at nu-ins.com Fri Jul 11 12:58:42 2014 From: Andrew.Stephens at nu-ins.com (Andrew Stephens) Date: Fri, 11 Jul 2014 10:58:42 +0000 Subject: [Ironpython-users] Recreate and compile a script in an existing engine instance? Message-ID: <620E6490461DDB44942EB371DFAEA70A56224D51@EXCH01.nu-ins.local> In C# I?m loading and compiling a script like this:- _engine = Python.CreateEngine(); _scope = _engine.CreateScope(); _scriptSource = _engine.CreateScriptSourceFromFile(filename, Encoding.UTF7, SourceCodeKind.Statements); _compiledScript = _scriptSource.Compile(); (At some point in time my application will run the script by calling _compiledScript.Execute(_scope).) I?ve also got a FileSystemWatcher watching the script file. When the file changes I recreate the ScriptSource and compile, basically executing those last two lines again. When I do this, _scriptSource.Compile() throws an ArgumentException (?Invalid argument valueParameter name: start?). The stack trace is below. It works if I re-create *everything* ? the engine, scope, script source, compile, but this seems a bit a wasteful. Am I missing something? Stack trace:- at Microsoft.Scripting.Utils.ContractUtils.Requires(Boolean precondition, String paramName) at Microsoft.Scripting.SourceUnit.GetCodeLines(Int32 start, Int32 count) at Microsoft.Scripting.SourceUnit.GetCodeLine(Int32 line) at Microsoft.Scripting.SyntaxErrorException..ctor(String message, SourceUnit sourceUnit, SourceSpan span, Int32 errorCode, Severity severity) at Microsoft.Scripting.Hosting.ErrorListenerProxySink.Add(SourceUnit sourceUnit, String message, SourceSpan span, Int32 errorCode, Severity severity) at IronPython.Compiler.Parser.CreateParserWorker(CompilerContext context, PythonOptions options, Boolean verbatim) at IronPython.Compiler.Parser.CreateParser(CompilerContext context, PythonOptions options) at IronPython.Runtime.PythonContext.ParseAndBindAst(CompilerContext context) at IronPython.Runtime.PythonContext.CompilePythonCode(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink) at IronPython.Runtime.PythonContext.CompileSourceCode(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink) at Microsoft.Scripting.SourceUnit.Compile(CompilerOptions options, ErrorSink errorSink) at Microsoft.Scripting.SourceUnit.Compile(ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.CompileInternal(CompilerOptions compilerOptions, ErrorListener errorListener) at Microsoft.Scripting.Hosting.ScriptSource.Compile() Andrew Stephens Senior Software Engineer Nu Instruments Ltd Email: Andrew.Stephens at nu-ins.com Tel: +44 (0) 1978 661304 Fax: +44 (0) 1978 664301 Web: www.nu-ins.com [cid:d9eab3.png at 3b3b5453.488676da] Nu Instruments Ltd Unit 74 Clywedog Road South Wrexham Industrial Estate Wrexham LL13 9XS United Kingdom Disclaimer This message is confidential and may contain privileged information and is protected by copyright. If you are not the intended recipient you should not copy or disclose this message to anyone but should kindly notify the sender and delete the message. Opinions, conclusions and other information in this message which do not relate to the official business of Nu Instruments Ltd shall be understood as neither given nor endorsed by it. No contracts shall be concluded by means of this email. Neither the Company nor the sender accepts any responsibility or liability for any loss or damage arising from the presence of any computer virus or similar harmful code contained in this email or attachment/s. It is your responsibility to scan this email and any attachments. The Company reserves the right to access and disclose all messages sent over its email system. Nu Instruments Ltd is registered in England, No.: 3046042. Registered Office: Seacourt Tower, West Way, Oxford OX2 0FB. VAT No.: GB 616 3733 45 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: d9eab3.png Type: image/png Size: 7347 bytes Desc: d9eab3.png URL: From no_reply at codeplex.com Mon Jul 14 09:22:52 2014 From: no_reply at codeplex.com (CodePlex) Date: 14 Jul 2014 00:22:52 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/13/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] IronPython throw InsufficientMemoryException when using numpy in threads 2. [New issue] support for running content of zip file ---------------------------------------------- ISSUES 1. [New issue] IronPython throw InsufficientMemoryException when using numpy in threads http://ironpython.codeplex.com/workitem/35378 User elishao has proposed the issue: "I have some IronPython code that being called from within a C# application. This code worked fine until I decided to change one function to run in a thread. when numpy functions called in a python thread a InsufficientMemoryException exception is thrown. I Searched for solutions but didn't find. can someone explain why it is happening and how can I fix it? I think this is happening only when I have two threads that use numpy I run code like this: C#: _python.functionA(); # _python was created with "Python.CreateEngine()" _python.functionA(); # twice on purpose Python: import threading import time import numpy def blah(): print numpy.array([100,100,0]) def functionA(): t = threading.Timer(0,blah) t.start() time.sleep(2) And I got this Exception: Exception in thread Thread-1: Traceback (most recent call last): File "c:\Program Files\IronPython 2.7.1\Lib\threading.py", line 552, in _Thread__bootstrap_inner self.run() File "c:\Program Files\IronPython 2.7.1\Lib\threading.py", line 756, in run self.function(*self.args, **self.kwargs) File "C:\workspace\my_python_script.py", line 113, in blah print numpy.array([100,100,0]) MemoryError: Exception of type 'System.InsufficientMemoryException' was thrown. This is on Windows 7. 32bit. 4G RAM. quad core."----------------- 2. [New issue] support for running content of zip file http://ironpython.codeplex.com/workitem/35379 User paweljasinski has proposed the issue: "This is cpython vs. ironpython difference, which is used by script option of distlib $ cat __main__.py print __file__ print __name__ $ zip aaa.zip __main__.py adding: __main__.py (deflated 20%) $ python aaa.zip aaa.zip/__main__.py __main__ $ ipy aaa.zip File "aaa.zip", line SyntaxError: Non-ASCII character '\xb8' in file aaa.zip on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details " ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.schaber at codesys.com Mon Jul 14 09:58:43 2014 From: m.schaber at codesys.com (Markus Schaber) Date: Mon, 14 Jul 2014 07:58:43 +0000 Subject: [Ironpython-users] Recreate and compile a script in an existing engine instance? Message-ID: <727D8E16AE957149B447FE368139F2B539C20B93@SERVER10> Hi, Von: Andrew Stephens > In C# I?m loading and compiling a script like this:- > > _engine = Python.CreateEngine(); > _scope = _engine.CreateScope(); > > _scriptSource = _engine.CreateScriptSourceFromFile(filename, Encoding.UTF7, SourceCodeKind.Statements); > _compiledScript = _scriptSource.Compile(); > > (At some point in time my application will run the script by calling _compiledScript.Execute(_scope).) Just as a side question out of curiosity: Are you really using UTF7 encoding? Are you constrained to ASCII? Best regards Markus Schaber CODESYS? 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: codesys.com | CODESYS store: store.codesys.com CODESYS forum: 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 Mon Jul 14 14:02:48 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 14 Jul 2014 13:02:48 +0100 Subject: [Ironpython-users] Recreate and compile a script in an existing engine instance? In-Reply-To: <620E6490461DDB44942EB371DFAEA70A56224D51@EXCH01.nu-ins.local> References: <620E6490461DDB44942EB371DFAEA70A56224D51@EXCH01.nu-ins.local> Message-ID: Smells like a bug, because this should work. Can you open an issue ( https://ironpython.codeplex.com/WorkItem/Create) with a minimal test case that reproduces it? - Jeff On Fri, Jul 11, 2014 at 11:58 AM, Andrew Stephens < Andrew.Stephens at nu-ins.com> wrote: > In C# I?m loading and compiling a script like this:- > > > > _engine = Python.CreateEngine(); > > _scope = _engine.CreateScope(); > > > > _scriptSource = _engine.CreateScriptSourceFromFile(filename, > Encoding.UTF7, SourceCodeKind.Statements); > > _compiledScript = _scriptSource.Compile(); > > > > (At some point in time my application will run the script by calling > _compiledScript.Execute(_scope).) > > > > I?ve also got a FileSystemWatcher watching the script file. When the file > changes I recreate the ScriptSource and compile, basically executing those > last two lines again. When I do this, _scriptSource.Compile() throws an > ArgumentException (?Invalid argument valueParameter name: start?). The > stack trace is below. It works if I re-create **everything** ? the > engine, scope, script source, compile, but this seems a bit a wasteful. Am > I missing something? > > > > Stack trace:- > > at Microsoft.Scripting.Utils.ContractUtils.Requires(Boolean > precondition, String paramName) > > at Microsoft.Scripting.SourceUnit.GetCodeLines(Int32 start, Int32 count) > > at Microsoft.Scripting.SourceUnit.GetCodeLine(Int32 line) > > at Microsoft.Scripting.SyntaxErrorException..ctor(String message, > SourceUnit sourceUnit, SourceSpan span, Int32 errorCode, Severity severity) > > at Microsoft.Scripting.Hosting.ErrorListenerProxySink.Add(SourceUnit > sourceUnit, String message, SourceSpan span, Int32 errorCode, Severity > severity) > > at IronPython.Compiler.Parser.CreateParserWorker(CompilerContext > context, PythonOptions options, Boolean verbatim) > > at IronPython.Compiler.Parser.CreateParser(CompilerContext context, > PythonOptions options) > > at IronPython.Runtime.PythonContext.ParseAndBindAst(CompilerContext > context) > > at IronPython.Runtime.PythonContext.CompilePythonCode(SourceUnit > sourceUnit, CompilerOptions options, ErrorSink errorSink) > > at IronPython.Runtime.PythonContext.CompileSourceCode(SourceUnit > sourceUnit, CompilerOptions options, ErrorSink errorSink) > > at Microsoft.Scripting.SourceUnit.Compile(CompilerOptions options, > ErrorSink errorSink) > > at Microsoft.Scripting.SourceUnit.Compile(ErrorSink errorSink) > > at > Microsoft.Scripting.Hosting.ScriptSource.CompileInternal(CompilerOptions > compilerOptions, ErrorListener errorListener) > > at Microsoft.Scripting.Hosting.ScriptSource.Compile() > > > > > > Andrew Stephens > > Senior Software Engineer > > Nu Instruments Ltd > > > > Email: Andrew.Stephens at nu-ins.comTel: +44 (0) 1978 661304Fax: +44 (0) > 1978 664301Web:www.nu-ins.com > > > > > > *Nu Instruments Ltd* > Unit 74 Clywedog Road South > Wrexham Industrial Estate > Wrexham LL13 9XS > United Kingdom > > *Disclaimer* > > This message is confidential and may contain privileged information and is > protected by copyright. If you are not the intended recipient you should > not copy or disclose this message to anyone but should kindly notify the > sender and delete the message. Opinions, conclusions and other information > in this message which do not relate to the official business of Nu > Instruments Ltd shall be understood as neither given nor endorsed by it. No > contracts shall be concluded by means of this email. Neither the Company > nor the sender accepts any responsibility or liability for any loss or > damage arising from the presence of any computer virus or similar harmful > code contained in this email or attachment/s. It is your responsibility to > scan this email and any attachments. The Company reserves the right to > access and disclose all messages sent over its email system. > > Nu Instruments Ltd is registered in England, No.: 3046042. Registered > Office: Seacourt Tower, West Way, Oxford OX2 0FB. VAT No.: GB 616 3733 45 > > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: d9eab3.png Type: image/png Size: 7347 bytes Desc: not available URL: From Andrew.Stephens at nu-ins.com Mon Jul 14 16:12:32 2014 From: Andrew.Stephens at nu-ins.com (Andrew Stephens) Date: Mon, 14 Jul 2014 14:12:32 +0000 Subject: [Ironpython-users] Recreate and compile a script in an existing engine instance? In-Reply-To: References: <620E6490461DDB44942EB371DFAEA70A56224D51@EXCH01.nu-ins.local> Message-ID: <620E6490461DDB44942EB371DFAEA70A56224EB3@EXCH01.nu-ins.local> I think I?ve found the cause of the problem. I recreate the script source and compile it within the FileSystemWatcher.Changed event. I can only assume that the file is still locked or is still being written to as this event fires - adding even a very small Thread.Sleep() seems to have fixed it. From: Jeff Hardy [mailto:jdhardy at gmail.com] Sent: 14 July 2014 13:03 To: Andrew Stephens Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Recreate and compile a script in an existing engine instance? Smells like a bug, because this should work. Can you open an issue (https://ironpython.codeplex.com/WorkItem/Create) with a minimal test case that reproduces it? - Jeff On Fri, Jul 11, 2014 at 11:58 AM, Andrew Stephens > wrote: In C# I?m loading and compiling a script like this:- _engine = Python.CreateEngine(); _scope = _engine.CreateScope(); _scriptSource = _engine.CreateScriptSourceFromFile(filename, Encoding.UTF7, SourceCodeKind.Statements); _compiledScript = _scriptSource.Compile(); (At some point in time my application will run the script by calling _compiledScript.Execute(_scope).) I?ve also got a FileSystemWatcher watching the script file. When the file changes I recreate the ScriptSource and compile, basically executing those last two lines again. When I do this, _scriptSource.Compile() throws an ArgumentException (?Invalid argument valueParameter name: start?). The stack trace is below. It works if I re-create *everything* ? the engine, scope, script source, compile, but this seems a bit a wasteful. Am I missing something? Stack trace:- at Microsoft.Scripting.Utils.ContractUtils.Requires(Boolean precondition, String paramName) at Microsoft.Scripting.SourceUnit.GetCodeLines(Int32 start, Int32 count) at Microsoft.Scripting.SourceUnit.GetCodeLine(Int32 line) at Microsoft.Scripting.SyntaxErrorException..ctor(String message, SourceUnit sourceUnit, SourceSpan span, Int32 errorCode, Severity severity) at Microsoft.Scripting.Hosting.ErrorListenerProxySink.Add(SourceUnit sourceUnit, String message, SourceSpan span, Int32 errorCode, Severity severity) at IronPython.Compiler.Parser.CreateParserWorker(CompilerContext context, PythonOptions options, Boolean verbatim) at IronPython.Compiler.Parser.CreateParser(CompilerContext context, PythonOptions options) at IronPython.Runtime.PythonContext.ParseAndBindAst(CompilerContext context) at IronPython.Runtime.PythonContext.CompilePythonCode(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink) at IronPython.Runtime.PythonContext.CompileSourceCode(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink) at Microsoft.Scripting.SourceUnit.Compile(CompilerOptions options, ErrorSink errorSink) at Microsoft.Scripting.SourceUnit.Compile(ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.CompileInternal(CompilerOptions compilerOptions, ErrorListener errorListener) at Microsoft.Scripting.Hosting.ScriptSource.Compile() Andrew Stephens Senior Software Engineer Nu Instruments Ltd Email: Andrew.Stephens at nu-ins.com Tel: +44 (0) 1978 661304 Fax: +44 (0) 1978 664301 Web: www.nu-ins.com [cid:image001.png at 01CF9F76.0956BB30] Nu Instruments Ltd Unit 74 Clywedog Road South Wrexham Industrial Estate Wrexham LL13 9XS United Kingdom Disclaimer This message is confidential and may contain privileged information and is protected by copyright. If you are not the intended recipient you should not copy or disclose this message to anyone but should kindly notify the sender and delete the message. Opinions, conclusions and other information in this message which do not relate to the official business of Nu Instruments Ltd shall be understood as neither given nor endorsed by it. No contracts shall be concluded by means of this email. Neither the Company nor the sender accepts any responsibility or liability for any loss or damage arising from the presence of any computer virus or similar harmful code contained in this email or attachment/s. It is your responsibility to scan this email and any attachments. The Company reserves the right to access and disclose all messages sent over its email system. Nu Instruments Ltd is registered in England, No.: 3046042. Registered Office: Seacourt Tower, West Way, Oxford OX2 0FB. VAT No.: GB 616 3733 45 Andrew Stephens Senior Software Engineer Nu Instruments Ltd Email: Andrew.Stephens at nu-ins.com Tel: +44 (0) 1978 661304 Fax: +44 (0) 1978 664301 Web: www.nu-ins.com [cid:1ef635.png at 70ebec31.41a4999b] Nu Instruments Ltd Unit 74 Clywedog Road South Wrexham Industrial Estate Wrexham LL13 9XS United Kingdom Disclaimer This message is confidential and may contain privileged information and is protected by copyright. If you are not the intended recipient you should not copy or disclose this message to anyone but should kindly notify the sender and delete the message. Opinions, conclusions and other information in this message which do not relate to the official business of Nu Instruments Ltd shall be understood as neither given nor endorsed by it. No contracts shall be concluded by means of this email. Neither the Company nor the sender accepts any responsibility or liability for any loss or damage arising from the presence of any computer virus or similar harmful code contained in this email or attachment/s. It is your responsibility to scan this email and any attachments. The Company reserves the right to access and disclose all messages sent over its email system. Nu Instruments Ltd is registered in England, No.: 3046042. Registered Office: Seacourt Tower, West Way, Oxford OX2 0FB. VAT No.: GB 616 3733 45 _______________________________________________ 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 7347 bytes Desc: image001.png URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1ef635.png Type: image/png Size: 7347 bytes Desc: 1ef635.png URL: From m.schaber at codesys.com Mon Jul 14 16:55:40 2014 From: m.schaber at codesys.com (Markus Schaber) Date: Mon, 14 Jul 2014 14:55:40 +0000 Subject: [Ironpython-users] Recreate and compile a script in an existing engine instance? In-Reply-To: <620E6490461DDB44942EB371DFAEA70A56224EB3@EXCH01.nu-ins.local> References: <620E6490461DDB44942EB371DFAEA70A56224D51@EXCH01.nu-ins.local> <620E6490461DDB44942EB371DFAEA70A56224EB3@EXCH01.nu-ins.local> Message-ID: <727D8E16AE957149B447FE368139F2B539C20E05@SERVER10> Hi, Andrew, According to my experiences, the FileSystemWatcher are only of limited use without additional precautions. They fire "eventually" after a file modification took place (the write access happened). This does not imply that 1. The modifying program has finished its modifications ? it could be still issuing further write requests to complete its work. 2. The modifying program has closed the file handle. (By default, windows blocks concurrent access to the files.) 3. No one else has started modifying the file in the meantime (including the next "cycle of the original modifying program). Most of the time, one wishes some "Notify me when the modifying program has closed the file handle, and atomically give me a file handle" event. Best regards Markus Schaber CODESYS? 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: codesys.com | CODESYS store: store.codesys.com CODESYS forum: 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. Von: Ironpython-users [mailto:ironpython-users-bounces+m.schaber=codesys.com at python.org] Im Auftrag von Andrew Stephens Gesendet: Montag, 14. Juli 2014 16:13 An: Jeff Hardy Cc: ironpython-users at python.org Betreff: Re: [Ironpython-users] Recreate and compile a script in an existing engine instance? I think I?ve found the cause of the problem. I recreate the script source and compile it within the FileSystemWatcher.Changed event. I can only assume that the file is still locked or is still being written to as this event fires - adding even a very small Thread.Sleep() seems to have fixed it. From: Jeff Hardy [mailto:jdhardy at gmail.com] Sent: 14 July 2014 13:03 To: Andrew Stephens Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] Recreate and compile a script in an existing engine instance? Smells like a bug, because this should work. Can you open an issue (https://ironpython.codeplex.com/WorkItem/Create) with a minimal test case that reproduces it? - Jeff On Fri, Jul 11, 2014 at 11:58 AM, Andrew Stephens > wrote: In C# I?m loading and compiling a script like this:- _engine = Python.CreateEngine(); _scope = _engine.CreateScope(); _scriptSource = _engine.CreateScriptSourceFromFile(filename, Encoding.UTF7, SourceCodeKind.Statements); _compiledScript = _scriptSource.Compile(); (At some point in time my application will run the script by calling _compiledScript.Execute(_scope).) I?ve also got a FileSystemWatcher watching the script file. When the file changes I recreate the ScriptSource and compile, basically executing those last two lines again. When I do this, _scriptSource.Compile() throws an ArgumentException (?Invalid argument valueParameter name: start?). The stack trace is below. It works if I re-create *everything* ? the engine, scope, script source, compile, but this seems a bit a wasteful. Am I missing something? Stack trace:- at Microsoft.Scripting.Utils.ContractUtils.Requires(Boolean precondition, String paramName) at Microsoft.Scripting.SourceUnit.GetCodeLines(Int32 start, Int32 count) at Microsoft.Scripting.SourceUnit.GetCodeLine(Int32 line) at Microsoft.Scripting.SyntaxErrorException..ctor(String message, SourceUnit sourceUnit, SourceSpan span, Int32 errorCode, Severity severity) at Microsoft.Scripting.Hosting.ErrorListenerProxySink.Add(SourceUnit sourceUnit, String message, SourceSpan span, Int32 errorCode, Severity severity) at IronPython.Compiler.Parser.CreateParserWorker(CompilerContext context, PythonOptions options, Boolean verbatim) at IronPython.Compiler.Parser.CreateParser(CompilerContext context, PythonOptions options) at IronPython.Runtime.PythonContext.ParseAndBindAst(CompilerContext context) at IronPython.Runtime.PythonContext.CompilePythonCode(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink) at IronPython.Runtime.PythonContext.CompileSourceCode(SourceUnit sourceUnit, CompilerOptions options, ErrorSink errorSink) at Microsoft.Scripting.SourceUnit.Compile(CompilerOptions options, ErrorSink errorSink) at Microsoft.Scripting.SourceUnit.Compile(ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.CompileInternal(CompilerOptions compilerOptions, ErrorListener errorListener) at Microsoft.Scripting.Hosting.ScriptSource.Compile() Andrew Stephens Senior Software Engineer Nu Instruments Ltd Email: Andrew.Stephens at nu-ins.com Tel: +44 (0) 1978 661304 Fax: +44 (0) 1978 664301 Web: www.nu-ins.com [cid:image001.png at 01CF9F83.270D7800] Nu Instruments Ltd Unit 74 Clywedog Road South Wrexham Industrial Estate Wrexham LL13 9XS United Kingdom Disclaimer This message is confidential and may contain privileged information and is protected by copyright. If you are not the intended recipient you should not copy or disclose this message to anyone but should kindly notify the sender and delete the message. Opinions, conclusions and other information in this message which do not relate to the official business of Nu Instruments Ltd shall be understood as neither given nor endorsed by it. No contracts shall be concluded by means of this email. Neither the Company nor the sender accepts any responsibility or liability for any loss or damage arising from the presence of any computer virus or similar harmful code contained in this email or attachment/s. It is your responsibility to scan this email and any attachments. The Company reserves the right to access and disclose all messages sent over its email system. Nu Instruments Ltd is registered in England, No.: 3046042. Registered Office: Seacourt Tower, West Way, Oxford OX2 0FB. VAT No.: GB 616 3733 45 Andrew Stephens Senior Software Engineer Nu Instruments Ltd Email: Andrew.Stephens at nu-ins.com Tel: +44 (0) 1978 661304 Fax: +44 (0) 1978 664301 Web: www.nu-ins.com [cid:image001.png at 01CF9F83.270D7800] Nu Instruments Ltd Unit 74 Clywedog Road South Wrexham Industrial Estate Wrexham LL13 9XS United Kingdom Disclaimer This message is confidential and may contain privileged information and is protected by copyright. If you are not the intended recipient you should not copy or disclose this message to anyone but should kindly notify the sender and delete the message. Opinions, conclusions and other information in this message which do not relate to the official business of Nu Instruments Ltd shall be understood as neither given nor endorsed by it. No contracts shall be concluded by means of this email. Neither the Company nor the sender accepts any responsibility or liability for any loss or damage arising from the presence of any computer virus or similar harmful code contained in this email or attachment/s. It is your responsibility to scan this email and any attachments. The Company reserves the right to access and disclose all messages sent over its email system. Nu Instruments Ltd is registered in England, No.: 3046042. Registered Office: Seacourt Tower, West Way, Oxford OX2 0FB. VAT No.: GB 616 3733 45 _______________________________________________ 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 7347 bytes Desc: image001.png URL: From slide.o.mix at gmail.com Mon Jul 14 18:51:16 2014 From: slide.o.mix at gmail.com (Slide) Date: Mon, 14 Jul 2014 09:51:16 -0700 Subject: [Ironpython-users] WI 31764 - Memory Leak Message-ID: Markus, hopefully this reaches you. In regards to https://ironpython.codeplex.com/workitem/31764, I was wondering how you got the heap dump like you posted. I'm looking into this issue because I'm having some memory leak type issues as well and would like to try and fix this. Thanks, slide -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From m.schaber at codesys.com Tue Jul 15 09:17:06 2014 From: m.schaber at codesys.com (Markus Schaber) Date: Tue, 15 Jul 2014 07:17:06 +0000 Subject: [Ironpython-users] WI 31764 - Memory Leak In-Reply-To: References: Message-ID: <727D8E16AE957149B447FE368139F2B539C20F9C@SERVER10> Hi, Slide, As written in the 3rd comment, the heapdump was generated using ClrProfiler: https://clrprofiler.codeplex.com/releases/view/97738 I was using an older version, it seems (before .NET 4.5 came out). I had various mileage using different memory profilers while trying to debug this problem. Some profilers did not show any useful information (just displaying "root" holding references to some Ironpython stuff), others did crash (including ClrProfiler). Somehow, I tracked it to some pinned objects, but got stuck then, due to lacking knowledge of IronPython and DLR internas. We even tried to find commercial support / contractors back then to solve this problem, to no avail. (https://mail.python.org/pipermail/ironpython-users/2012-October/016273.html and some private emails to companies like Xamarin.) Eventually, we had internal workarounds for most of the problems caused by this, and the problem was scheduled low priority. So thanks a lot for your efforts, and good luck! Should you solve the problems, I'll invite you for a pizza and beer should we ever meet in real. ? Best regards Markus Schaber CODESYS? 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: codesys.com | CODESYS store: store.codesys.com CODESYS forum: 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. Von: Ironpython-users [mailto:ironpython-users-bounces+m.schaber=codesys.com at python.org] Im Auftrag von Slide Gesendet: Montag, 14. Juli 2014 18:52 An: ironpython-users at python.org Betreff: [Ironpython-users] WI 31764 - Memory Leak Markus, hopefully this reaches you. In regards to https://ironpython.codeplex.com/workitem/31764, I was wondering how you got the heap dump like you posted. I'm looking into this issue because I'm having some memory leak type issues as well and would like to try and fix this. Thanks, slide -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ecinunice at gmail.com Tue Jul 15 15:47:22 2014 From: ecinunice at gmail.com (ecinunice at gmail.com) Date: Tue, 15 Jul 2014 17:47:22 +0400 Subject: [Ironpython-users] SAXReaderNotAvailable: No parsers found Message-ID: <165301297.20140715174722@gmail.com> Hi I try use simple ods py http://simple-odspy.sourceforge.net/?q=node/9 and get xml.sax._exceptions.SAXReaderNotAvailable: No parsers found Traceback (most recent call last): File "\IronPython-2.7.3\lib\site-packages\odf\opendocument.py", line 615, in load File "\IronPython-2.7.3\lib\site-packages\odf\odfmanifest.py", line 93, in manifestlist File "", line 1, in File "\IronPython-2.7.3\lib\site-packages\simpleodspy\sodsods.py", line 158, in load File "\IronPython-2.7.3\Lib\xml\sax\__init__.py", line 93, in make_parser xml.sax._exceptions.SAXReaderNotAvailable: No parsers found Is there any workaround? Can i use http://ironpython.codeplex.com/workitem/20023 ? From slide.o.mix at gmail.com Tue Jul 15 16:08:31 2014 From: slide.o.mix at gmail.com (Slide) Date: Tue, 15 Jul 2014 07:08:31 -0700 Subject: [Ironpython-users] SAXReaderNotAvailable: No parsers found In-Reply-To: <165301297.20140715174722@gmail.com> References: <165301297.20140715174722@gmail.com> Message-ID: I believe that tries to use expat under the covers and IronPython doesn't support expat. It's a native module in CPython, and there is no implementation in IronPython. You can try the implementation from FePy, but it is very old, so it may not run out of the box, you may need to modify it to get it to work (and it doesn't implement everything in pyexpat). On Tue, Jul 15, 2014 at 6:47 AM, wrote: > Hi I try use simple ods py > http://simple-odspy.sourceforge.net/?q=node/9 and get > xml.sax._exceptions.SAXReaderNotAvailable: No parsers found > > Traceback (most recent call last): File > "\IronPython-2.7.3\lib\site-packages\odf\opendocument.py", line 615, > in load File "\IronPython-2.7.3\lib\site-packages\odf\odfmanifest.py", > line 93, in manifestlist File "", line 1, in File > "\IronPython-2.7.3\lib\site-packages\simpleodspy\sodsods.py", line > 158, in load File "\IronPython-2.7.3\Lib\xml\sax\__init__.py", line > 93, in make_parser xml.sax._exceptions.SAXReaderNotAvailable: No > parsers found > > Is there any workaround? Can i use > http://ironpython.codeplex.com/workitem/20023 ? > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Tue Jul 15 17:05:15 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Tue, 15 Jul 2014 16:05:15 +0100 Subject: [Ironpython-users] SAXReaderNotAvailable: No parsers found In-Reply-To: References: <165301297.20140715174722@gmail.com> Message-ID: If it's using the generic SAX parser it shouldn't be trying to use expat, but I think that workaround was only added in 2.7.4. Try using a newer version of IronPython and see if that helps. - Jeff On Tue, Jul 15, 2014 at 3:08 PM, Slide wrote: > I believe that tries to use expat under the covers and IronPython doesn't > support expat. It's a native module in CPython, and there is no > implementation in IronPython. You can try the implementation from FePy, but > it is very old, so it may not run out of the box, you may need to modify it > to get it to work (and it doesn't implement everything in pyexpat). > > > On Tue, Jul 15, 2014 at 6:47 AM, wrote: > >> Hi I try use simple ods py >> http://simple-odspy.sourceforge.net/?q=node/9 and get >> xml.sax._exceptions.SAXReaderNotAvailable: No parsers found >> >> Traceback (most recent call last): File >> "\IronPython-2.7.3\lib\site-packages\odf\opendocument.py", line 615, >> in load File "\IronPython-2.7.3\lib\site-packages\odf\odfmanifest.py", >> line 93, in manifestlist File "", line 1, in File >> "\IronPython-2.7.3\lib\site-packages\simpleodspy\sodsods.py", line >> 158, in load File "\IronPython-2.7.3\Lib\xml\sax\__init__.py", line >> 93, in make_parser xml.sax._exceptions.SAXReaderNotAvailable: No >> parsers found >> >> Is there any workaround? Can i use >> http://ironpython.codeplex.com/workitem/20023 ? >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> https://mail.python.org/mailman/listinfo/ironpython-users >> > > > > -- > Website: http://earl-of-code.com > > _______________________________________________ > 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 ecinunice at gmail.com Wed Jul 16 08:24:28 2014 From: ecinunice at gmail.com (ecinunice at gmail.com) Date: Wed, 16 Jul 2014 10:24:28 +0400 Subject: [Ironpython-users] SAXReaderNotAvailable: No parsers found In-Reply-To: References: <165301297.20140715174722@gmail.com> Message-ID: <1844515223.20140716102428@gmail.com> An HTML attachment was scrubbed... URL: From ecinunice at gmail.com Wed Jul 16 09:15:02 2014 From: ecinunice at gmail.com (ecinunice at gmail.com) Date: Wed, 16 Jul 2014 11:15:02 +0400 Subject: [Ironpython-users] how to pass parameter to (this IQueryable table, Expression> predicate) Message-ID: <486930133.20140716111502@gmail.com> I want to use https://github.com/linq2db/linq2db in ironpython I wrote extension in c# public static class BillingDBHelper { public static IQueryable Filter(this IQueryable table, Expression> predicate) { if (predicate == null) return table; return table.Where(predicate); } } and call it in py with get_db() as db: cycle = db.t_ws_billing_cycle.Filter(lambda x: x.policy_no == pn) and get TypeError: The type arguments for method 'Filter' cannot be inferred from the usage. Try specifying the type arguments explicitly. How to fix? Or how i build c# expression lambda in ironpython? Thanks From no_reply at codeplex.com Thu Jul 17 09:23:36 2014 From: no_reply at codeplex.com (CodePlex) Date: 17 Jul 2014 00:23:36 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/16/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Telnetlib exception - "getaddrinfo returns an empty list" ---------------------------------------------- ISSUES 1. [New issue] Telnetlib exception - "getaddrinfo returns an empty list" http://ironpython.codeplex.com/workitem/35388 User cemremengu has proposed the issue: "I am trying to port a native python script into an IronPython project. The script gathers data from a list of IPs with telnet. The native version works perfectly fine however the IronPython version keeps giving me an exception saying "getaddrinfo returns an empty list". I am almost sure that this is because the IP is unreachable but the native version is able to handle the situation by telling me that the connection to the specified IP has timed out. I tried many ways to catch the exception but for some reason nothing catches it. I am thinking that this may be a bug but it may be also the case that I am simply doing something wrong." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pawel.jasinski at gmail.com Thu Jul 17 10:52:52 2014 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Thu, 17 Jul 2014 10:52:52 +0200 Subject: [Ironpython-users] test framework Message-ID: First of all, there is a need to document where the tests are and how to run them. It took me a moment to figure it out, so it make sense to share it. The test config: IronLanguages/Test/IronPython.tests An individual test can be started by: ./test-ipy.cmd /test:test_zipimport_cpy I remember at one time compiling TestRunner. IronLanguages/Test/TestRunner/TestRunner.sln, so if something doesn't work, try to build it. The body of the tests is located in many places: IronLanguages/Languages/IronPython/Tests IronLanguages/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/test In addition to ./test-ipy.cmd the test from stdlib can be run with a usual: ipy -X:FullFrames -m unittest test.test_zipimport_support I also had 'nose' running at some point, so it is likely to be still ok. Now the second part, what is not so nice about our test framework and perhaps how can we avoid the same mistakes in "3". As Jeff refers to it: "fabulously complicated test infrastructure" (FCTI?), is a bit of inconvenient to use. I suspect the definition of what individual test constitutes is not uniform. FCTI things a test is entire file or even worse a package. I found no way to test a single function out of a test file without reconfiguring or modifying a lot. For example: test_stdconsole.py takes ~3 minutes. But a test where it fails 12 seconds. so I nuke (or comment out) all other test functions in test_stdconsole.py to get to fast test cycle. Second example: modules_io_related_ipy is a single test, but it includes not only all functions out of a file but entire package (all files out of IronLanguages/Languages/IronPython/Tests/modules/io_related). Here I basically remove all not interesting files and functions. If anybody has a better way, please share. --pawel From jdhardy at gmail.com Thu Jul 17 15:40:21 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 17 Jul 2014 14:40:21 +0100 Subject: [Ironpython-users] test framework In-Reply-To: References: Message-ID: On Thu, Jul 17, 2014 at 9:52 AM, Pawel Jasinski wrote: > First of all, there is a need to document where the tests are and how > to run them. It took me a moment to figure it out, so it make sense to > share it. > > The test config: IronLanguages/Test/IronPython.tests > An individual test can be started by: ./test-ipy.cmd > /test:test_zipimport_cpy > > I remember at one time compiling TestRunner. > IronLanguages/Test/TestRunner/TestRunner.sln, so if something doesn't > work, try to build it. > > The body of the tests is located in many places: > IronLanguages/Languages/IronPython/Tests > IronLanguages/External.LCA_RESTRICTED/Languages/IronPython/27/Lib/test > > > In addition to ./test-ipy.cmd the test from stdlib can be run with a usual: > ipy -X:FullFrames -m unittest test.test_zipimport_support > > I also had 'nose' running at some point, so it is likely to be still ok. > Thanks for writing this down! It could go on the github wiki as well, but at least search engines are likely to find it. > > > Now the second part, what is not so nice about our test framework and > perhaps how can we avoid the same mistakes in "3". > > As Jeff refers to it: "fabulously complicated test infrastructure" > (FCTI?), is a bit of inconvenient to use. I suspect the definition of > what individual test constitutes is not uniform. FCTI things a test is > entire file or even worse a package. I found no way to test a single > function out of a test file without reconfiguring or modifying a lot. > Yep. It's a legacy of the system used at MS (which I believe was called SNAP); the current TestRunner was the simplest thing Dino could put together to get it working when the code was permanently moved out of MS. > > For example: > test_stdconsole.py takes ~3 minutes. But a test where it fails 12 seconds. > so I nuke (or comment out) all other test functions in > test_stdconsole.py to get to fast test cycle. > > Second example: > modules_io_related_ipy is a single test, but it includes not only all > functions out of a file but entire package (all files out of > IronLanguages/Languages/IronPython/Tests/modules/io_related). Here I > basically remove all not interesting files and functions. > > If anybody has a better way, please share. > My thinking on testing for 3 can be found at https://github.com/jdhardy/ironpython3/commits/test-runner. The main reason I want to use NUnit (or xUnit.Net) to drive it is that they support multiple platforms, and it saves us having to write test runners everywhere (keeping in mind things like Android, iOS, Win8, etc.). Doing so, though, involves rewriting the discovery portions of both iptest and the CPython test suite, but at least we only have to do it once. Then the tests can be exposed to any NUnit-capable runner. Nothing to help much in the short term, but longer term things will get better. - Jeff > > --pawel > _______________________________________________ > 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 pawel.jasinski at gmail.com Thu Jul 17 16:38:12 2014 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Thu, 17 Jul 2014 16:38:12 +0200 Subject: [Ironpython-users] Adoption of IronPython Message-ID: Recently I had 2 ideas or perhaps suggestions which may help IronPython to get better. I asked myself, what would help us to get more general python packages to get IP specific patches and keep things alive. Most of them use travis as a test framework and cover most of the python versions, including pypy, under linux. So what is stopping us from testing the package under IronPython? Travis does not have windows support. So the idea 1, help good people of github to get windows support for travis. Or if you prefer, get mono in shape so it can be used as test environment for IP under linux. Second observation from porting exercise of bytes vs. chars vs. unicode. Every package keeps its own platform.py or similar which deals with 2.x/3.x differences. After n-th package, I thought "if there was one package for all to deal with it, someone could update it to handle not only 2.x and 3.x but also ip2.x". Guess what, there is already a package which does it and it appears to be used by a few projects. It is six. The idea 2, check what can be done about our notorious encode problem with help of six. --pawel From no_reply at codeplex.com Fri Jul 18 09:30:28 2014 From: no_reply at codeplex.com (CodePlex) Date: 18 Jul 2014 00:30:28 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/17/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] Exceptions not being trapped by Debugger in VS 2013 ---------------------------------------------- ISSUES 1. [New issue] Exceptions not being trapped by Debugger in VS 2013 http://ironpython.codeplex.com/workitem/35389 User johntrinder has proposed the issue: "I've installed the FePy tools package (2.0) for Visual Studio 2013 and have encountered a minor bug which doesn't occur in VS2012: If an exception is thrown during program execution the debugger should put the cursor straight in the line in the appropriate script and display a popup giving details of the exception; instead nothing happens other than the traceback report in the console window. Debugging otherwise works brilliantly. It works fine in VS 2012 though. The same happens with the latest beta releases (1 and 2)" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Jul 18 11:27:24 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 18 Jul 2014 10:27:24 +0100 Subject: [Ironpython-users] Adoption of IronPython In-Reply-To: References: Message-ID: On Thu, Jul 17, 2014 at 3:38 PM, Pawel Jasinski wrote: > Recently I had 2 ideas or perhaps suggestions which may help > IronPython to get better. > I asked myself, what would help us to get more general python packages > to get IP specific patches and keep things alive. Most of them use > travis as a test framework and cover most of the python versions, > including pypy, under linux. So what is stopping us from testing the > package under IronPython? Travis does not have windows support. > > So the idea 1, help good people of github to get windows support for > travis. > Or if you prefer, get mono in shape so it can be used as test > environment for IP under linux. > I noticed this while working on virtualenv. They run tests on CPython and PyPy but not Jython or IronPython. Making sure IP is part of their regression suites is important, but the burden falls on us to get it setup (which is fair IMO). One of my goals for the B3 -> RC 2.7.5 release is much better Mono support. I'm going to restrict myself to working on my Mac and see what happens (and then try it in an Ubuntu VM just to double check). Supporting it on travis could get some of the key projects that drive adoption. > > Second observation from porting exercise of bytes vs. chars vs. > unicode. Every package keeps its own platform.py or similar which > deals with 2.x/3.x differences. After n-th package, I thought "if > there was one package for all to deal with it, someone could update it > to handle not only 2.x and 3.x but also ip2.x". Guess what, there is > already a package which does it and it appears to be used by a few > projects. It is six. > > The idea 2, check what can be done about our notorious encode problem > with help of six. > Also a good idea. If six-ified libraries also work on IronPython, that's a big win for us. There's another, similar library whose name escapes me right now. The third thing (and the hardest) is that IronPython needs better docs. Ideally we'd have a copy of the Python stdlib docs that called out compatibility issues, and also guides on how to embed IronPython, which is a critical use case. - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Jul 18 19:43:31 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 18 Jul 2014 18:43:31 +0100 Subject: [Ironpython-users] Adoption of IronPython In-Reply-To: References: Message-ID: For now, that's probably the best place. Eventually I'd like to use something like CPython's sphinx docs, but the wiki is a good start. - Jeff On Jul 18, 2014 11:41 AM, "Pawel Jasinski" wrote: > > The third thing (and the hardest) is that IronPython needs better docs. > Ideally we'd have a copy of the Python stdlib docs that called out > compatibility issues, and also guides on how to embed IronPython, which is > a critical use case. > > Agree 100%, for the guides would > https://github.com/IronLanguages/main/wiki be the right place? > Any other suggestions? > > --pawel > -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sat Jul 19 09:23:54 2014 From: no_reply at codeplex.com (CodePlex) Date: 19 Jul 2014 00:23:54 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/18/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] support for running content of zip file 2. [New comment] Exceptions not being trapped by Debugger in VS 2013 ---------------------------------------------- ISSUES 1. [New comment] support for running content of zip file http://ironpython.codeplex.com/workitem/35379 User paweljasinski has commented on the issue: "

fixed in 4c323d996ab86a1f6dd074f433f005776ea4c825

"----------------- 2. [New comment] Exceptions not being trapped by Debugger in VS 2013 http://ironpython.codeplex.com/workitem/35389 User jdhardy has commented on the issue: "

If your IronPython version hasn't changed, then it sounds like a PTVS issue. You'll want to open a ticket with them: https://pytools.codeplex.com/WorkItem/Create.

" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From TrinderJohn at dsl.pipex.com Mon Jul 21 01:10:47 2014 From: TrinderJohn at dsl.pipex.com (John Trinder) Date: Mon, 21 Jul 2014 00:10:47 +0100 Subject: [Ironpython-users] py_compile.compile() constant error (unable to generate a .pyc file) Message-ID: <53CC4C77.2070900@dsl.pipex.com> If I try to compile a .pyc file doing the following, I get: >>> import py_compile as p >>> p.compile('dummy.py') Traceback (most recent call last): File "", line 1, in File "D:\Programming\IronPython 2.7\Lib\py_compile.py", line 126, in compile marshal.dump(codeobject, fc) ValueError: unmarshallable object where 'dummy.py' is a simple test file consisting of: a = 1 I seem to have noticed that whenever files are imported in a session that no .pyc files are automatically generated. --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com From TrinderJohn at dsl.pipex.com Mon Jul 21 14:32:56 2014 From: TrinderJohn at dsl.pipex.com (John Trinder) Date: Mon, 21 Jul 2014 13:32:56 +0100 Subject: [Ironpython-users] py_compile.compile() constant error (unable to generate a .pyc file) Message-ID: <53CD0878.7080703@dsl.pipex.com> What do you mean 'save off assemblies'? I looked at 'ipy -h' as you suggested but couldn't find anything of ehlp. I tried 'ipy -O file.py' but no optimised file (file.pyo) was generated. Thanks for the response btw. [Re] IronPython doesn't support pyc files. There is a way to save off assemblies, if you run ipy with -h it should tell you how. On Jul 21, 2014 2:36 AM, "John Trinder" > wrote: If I try to compile a .pyc file doing the following, I get: >>> import py_compile as p >>> p.compile('dummy.py') Traceback (most recent call last): File "", line 1, in File "D:\Programming\IronPython 2.7\Lib\py_compile.py", line 126, in compile marshal.dump(codeobject, fc) ValueError: unmarshallable object where 'dummy.py' is a simple test file consisting of: a = 1 I seem to have noticed that whenever files are imported in a session that no .pyc files are automatically generated. -------------- next part -------------- An HTML attachment was scrubbed... URL: From TrinderJohn at dsl.pipex.com Mon Jul 21 14:51:20 2014 From: TrinderJohn at dsl.pipex.com (John Trinder) Date: Mon, 21 Jul 2014 13:51:20 +0100 Subject: [Ironpython-users] py_compile.compile() constant error (unable to generate a .pyc file) Message-ID: <53CD0CC8.3030305@dsl.pipex.com> Nope - nothing under -X remotely like it! In fact I can't see any options for saving anything. [Re] Should be an option -X:SaveAssemblies or something like that. IronPython doesn't support pyo files either. Both pyc and pyo files require support for Python bytecode, which IronPython does not have right now. From slide.o.mix at gmail.com Mon Jul 21 15:28:27 2014 From: slide.o.mix at gmail.com (Slide) Date: Mon, 21 Jul 2014 06:28:27 -0700 Subject: [Ironpython-users] py_compile.compile() constant error (unable to generate a .pyc file) In-Reply-To: <53CD0CC8.3030305@dsl.pipex.com> References: <53CD0CC8.3030305@dsl.pipex.com> Message-ID: Oh, looking at the source, it's a debug option only, not for production use. On Mon, Jul 21, 2014 at 5:51 AM, John Trinder wrote: > Nope - nothing under -X remotely like it! In fact I can't see any options > for saving anything. > > [Re] Should be an option -X:SaveAssemblies or something like that. > IronPython doesn't support pyo files either. Both pyc and pyo files require > support for Python bytecode, which IronPython does not have right now. > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From TrinderJohn at dsl.pipex.com Mon Jul 21 15:37:17 2014 From: TrinderJohn at dsl.pipex.com (John Trinder) Date: Mon, 21 Jul 2014 14:37:17 +0100 Subject: [Ironpython-users] py_compile.compile() constant error (unable to generate a .pyc file) Message-ID: <53CD178D.40903@dsl.pipex.com> Thanks for your help anyway. Saves me time trying to manually compile .pyc files when they aren't available :( From cemre.mengu at ttgint.com Mon Jul 21 15:42:42 2014 From: cemre.mengu at ttgint.com (Cemre Mengu) Date: Mon, 21 Jul 2014 16:42:42 +0300 Subject: [Ironpython-users] Telnetlib exception - "getaddrinfo returns an empty list" Message-ID: Hi everyone, I am trying to port a native python script into an IronPython project. The script gathers data from a list of IPs with telnet. The native version works perfectly fine however the IronPython version keeps giving me an exception saying "getaddrinfo returns an empty list". I am almost sure that this is because the IP is unreachable (which in fact is) but the native (python) version is able to handle the situation by telling me that the connection to the specified IP has timed out. I tried many ways to catch the exception but for some reason it can not be handled. I am thinking that this may be a bug but it may be also the case that I am simply doing something wrong. Any ideas ? *Complete Exception Message:* An exception of type 'System.Exception' occurred in Snippets.debug.scripting but was not handled in user code Additional information: getaddrinfo returns an empty list -------------- next part -------------- An HTML attachment was scrubbed... URL: From ecinunice at gmail.com Wed Jul 23 10:36:05 2014 From: ecinunice at gmail.com (ecinunice at gmail.com) Date: Wed, 23 Jul 2014 12:36:05 +0400 Subject: [Ironpython-users] How can i use readline Message-ID: <105841683.20140723123605@gmail.com> Hi All I setup readline https://pypi.python.org/pypi/pyreadline-ais and try import readline and get File "\lib\site-packages\pyreadline_ais-2.0.3-py2.7.egg\pyreadline\console\__init__.py", line 9, in File "\lib\site-packages\pyreadline_ais-2.0.3-py2.7.egg\pyreadline\console\ironpython_console.py", line 31, in ImportError: No module named IronPythonConsole Is there any workaround for this? My core issue is custom shell with command history Thanks From pawel.jasinski at gmail.com Wed Jul 23 14:50:02 2014 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Wed, 23 Jul 2014 14:50:02 +0200 Subject: [Ironpython-users] How can i use readline In-Reply-To: <105841683.20140723123605@gmail.com> References: <105841683.20140723123605@gmail.com> Message-ID: check pull reqests. if it doesn't help, i have a version which used to work with ipython https://github.com/paweljasinski/pyreadline On Wednesday, July 23, 2014, wrote: > Hi All > I setup readline https://pypi.python.org/pypi/pyreadline-ais > and try import readline and get > File > "\lib\site-packages\pyreadline_ais-2.0.3-py2.7.egg\pyreadline\console\__init__.py", > line 9, in > File > "\lib\site-packages\pyreadline_ais-2.0.3-py2.7.egg\pyreadline\console\ironpython_console.py", > line 31, in > ImportError: No module named IronPythonConsole > > Is there any workaround for this? > My core issue is custom shell with command history > > Thanks > > _______________________________________________ > 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 ecinunice at gmail.com Wed Jul 23 15:20:35 2014 From: ecinunice at gmail.com (ecinunice at gmail.com) Date: Wed, 23 Jul 2014 17:20:35 +0400 Subject: [Ironpython-users] How can i use readline In-Reply-To: References: <105841683.20140723123605@gmail.com> Message-ID: <922615634.20140723172035@gmail.com> An HTML attachment was scrubbed... URL: From pawel.jasinski at gmail.com Wed Jul 23 21:02:21 2014 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Wed, 23 Jul 2014 21:02:21 +0200 Subject: [Ironpython-users] How can i use readline In-Reply-To: <922615634.20140723172035@gmail.com> References: <105841683.20140723123605@gmail.com> <922615634.20140723172035@gmail.com> Message-ID: On Wednesday, July 23, 2014, wrote: > Thanks a lot fork works > but this https://docs.python.org/2/tutorial/interactive.html does not > work > Do you know why? > no, i only fixed what was required for ipython > > > Thanks > > > > check pull reqests. if it doesn't help, i have a version which used to > work with ipython https://github.com/paweljasinski/pyreadline > > On Wednesday, July 23, 2014, > wrote: > Hi All > I setup readline https://pypi.python.org/pypi/pyreadline-ais > and try import readline and get > File > "\lib\site-packages\pyreadline_ais-2.0.3-py2.7.egg\pyreadline\console\__init__.py", > line 9, in > File > "\lib\site-packages\pyreadline_ais-2.0.3-py2.7.egg\pyreadline\console\ironpython_console.py", > line 31, in > ImportError: No module named IronPythonConsole > > Is there any workaround for this? > My core issue is custom shell with command history > > Thanks > > _______________________________________________ > 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 TrinderJohn at dsl.pipex.com Thu Jul 24 01:13:26 2014 From: TrinderJohn at dsl.pipex.com (John Trinder) Date: Thu, 24 Jul 2014 00:13:26 +0100 Subject: [Ironpython-users] couple of code completion suggestions Message-ID: <53D04196.7010700@dsl.pipex.com> When doing: from Foo import foo2 (assuming for eg foo2 is a class) and then going on to do: a = foo2() it would be nice if intellisense could offer suggestions as I am typing out foo2 In the same vein, when doing: varname = 1 and then doing a = varname + etc it would be nice if intellisense could offer suggestions as I am typing out varname From jdhardy at gmail.com Thu Jul 24 15:53:37 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Thu, 24 Jul 2014 14:53:37 +0100 Subject: [Ironpython-users] couple of code completion suggestions In-Reply-To: <53D04196.7010700@dsl.pipex.com> References: <53D04196.7010700@dsl.pipex.com> Message-ID: On Thu, Jul 24, 2014 at 12:13 AM, John Trinder wrote: > When doing: > > from Foo import foo2 > > (assuming for eg foo2 is a class) and then going on to do: > > a = foo2() > > it would be nice if intellisense could offer suggestions as I am typing > out foo2 > > In the same vein, when doing: > > varname = 1 > > and then doing > > a = varname + etc > > it would be nice if intellisense could offer suggestions as I am typing > out varname > Are you talking about Visual Studio or the IronPython console? AFAICT the console already does both of those. For Visual Studio, you'll have to ask the PTVS team (http://pytools.codeplex.com). - Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From TrinderJohn at dsl.pipex.com Fri Jul 25 01:45:00 2014 From: TrinderJohn at dsl.pipex.com (John Trinder) Date: Fri, 25 Jul 2014 00:45:00 +0100 Subject: [Ironpython-users] problem incorporating namespace into Xaml Message-ID: <53D19A7C.7050708@dsl.pipex.com> I'm new to FePy and after doing a fair bit of studying am embarking on transcoding a C# project to FePy. I'm encountering a problem incorporating a module that defines a subclass of Canvas and then trying to utilize this custom canvas in the Xaml code. My skeleton files/modules and contents are as follows: _*module1.py *_import clr clr.AddReference('PresentationFramework') import System.Windows.Controls as swc class CustomCanvas(swc.Canvas): def __init__(self): pass_* *__*WpfApplication1.xaml*_ ** _*WpfApplication1.py*_ import wpf from System.Windows import Application, Window class MyWindow(Window): def __init__(self): wpf.LoadComponent(self, 'WpfApplication1.xaml') Application().Run(MyWindow()) I've marked in bold where I have incorporated my module/namespace. Intellisense says that on the ** line, CustomCanvas 'does not exist in the namespace *"clr-namespace:module1"'* I'm guessing that it's not possible to do (yet) what I want to do - which is pretty basic. Thanks in advance btw for any advice and tips. -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Fri Jul 25 01:54:08 2014 From: slide.o.mix at gmail.com (Slide) Date: Thu, 24 Jul 2014 16:54:08 -0700 Subject: [Ironpython-users] problem incorporating namespace into Xaml In-Reply-To: <53D19A7C.7050708@dsl.pipex.com> References: <53D19A7C.7050708@dsl.pipex.com> Message-ID: Just so you are aware FePy was the name of a side project that was a set of enhancements to IronPython. If you are looking for a shorter form of IronPython, IP is generally the best way to go so there is no confusion. On Thu, Jul 24, 2014 at 4:45 PM, John Trinder wrote: > I'm new to FePy and after doing a fair bit of studying am embarking on > transcoding a C# project to FePy. I'm encountering a problem incorporating > a module that defines a subclass of Canvas and then trying to utilize this > custom canvas in the Xaml code. > > My skeleton files/modules and contents are as follows: > > > > *module1.py *import clr > clr.AddReference('PresentationFramework') > import System.Windows.Controls as swc > > class CustomCanvas(swc.Canvas): > def __init__(self): > pass > > *WpfApplication1.xaml* > > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > > *xmlns:local="clr-namespace:module1"* > Title="WpfApplication1" Height="300" Width="300"> > > * Margin="96,90,0,0" VerticalAlignment="Top" Width="100"/>* > > > > *WpfApplication1.py* > > import wpf > > from System.Windows import Application, Window > > class MyWindow(Window): > def __init__(self): > wpf.LoadComponent(self, 'WpfApplication1.xaml') > > Application().Run(MyWindow()) > > > I've marked in bold where I have incorporated my module/namespace. > Intellisense says that on the ** line, > CustomCanvas 'does not exist in the namespace *"clr-namespace:module1"'* > I'm guessing that it's not possible to do (yet) what I want to do - which > is pretty basic. > Thanks in advance btw for any advice and tips. > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > https://mail.python.org/mailman/listinfo/ironpython-users > > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Jul 25 10:25:57 2014 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 25 Jul 2014 09:25:57 +0100 Subject: [Ironpython-users] problem incorporating namespace into Xaml In-Reply-To: <53D19A7C.7050708@dsl.pipex.com> References: <53D19A7C.7050708@dsl.pipex.com> Message-ID: On Fri, Jul 25, 2014 at 12:45 AM, John Trinder wrote: > I'm new to FePy and after doing a fair bit of studying am embarking on > transcoding a C# project to FePy. I'm encountering a problem incorporating > a module that defines a subclass of Canvas and then trying to utilize this > custom canvas in the Xaml code. > > My skeleton files/modules and contents are as follows: > > > > *module1.py *import clr > clr.AddReference('PresentationFramework') > import System.Windows.Controls as swc > > class CustomCanvas(swc.Canvas): > def __init__(self): > pass > > *WpfApplication1.xaml* > > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > > *xmlns:local="clr-namespace:module1"* > Title="WpfApplication1" Height="300" Width="300"> > > * Margin="96,90,0,0" VerticalAlignment="Top" Width="100"/>* > > > > *WpfApplication1.py* > > import wpf > > from System.Windows import Application, Window > > class MyWindow(Window): > def __init__(self): > wpf.LoadComponent(self, 'WpfApplication1.xaml') > > Application().Run(MyWindow()) > > > I've marked in bold where I have incorporated my module/namespace. > Intellisense says that on the ** line, > CustomCanvas 'does not exist in the namespace *"clr-namespace:module1"'* > I'm guessing that it's not possible to do (yet) what I want to do - which > is pretty basic. > Thanks in advance btw for any advice and tips. > I'm no WPF expert, but I'm guessing the issue is that IronPython doesn't statically build a "real" .NET class, and the namespace and class name aren't guaranteed to be the same on each run.* It is possible to manipulate the type generation using __clrtype__[1] but it's not well documented. That allows you to control the exact type name that is used so that other code can look it up using reflection. I have grand plans for how this will in IronPython, where classes can take keyword args and there are function attributes to set types: class CustomCanvas(swc.Canvas, namespace="Foo"): pass Then you could use *xmlns:local="clr-namespace:Foo" *and it would work as expected. That's still a ways out, though - I'd have to implement support for those keyword args first. :) - Jeff [1] http://ironpython.net/documentation/dotnet/dotnet.html#clrtype * In your case, the backing type name would be something like "IronPython.Types.System.Windows.Controls.Canvas$1" - and it's the "$1" that can change on each run. -------------- next part -------------- An HTML attachment was scrubbed... URL: From vernondcole at gmail.com Fri Jul 25 12:09:21 2014 From: vernondcole at gmail.com (Vernon Cole) Date: Fri, 25 Jul 2014 11:09:21 +0100 Subject: [Ironpython-users] problem incorporating namespace into Xaml In-Reply-To: References: <53D19A7C.7050708@dsl.pipex.com> Message-ID: <53D22CD1.7020907@gmail.com> Repeating my (minority) argument on this subject years ago: "IP" is generally used as the acronym for "Internet Protocol" and is so generally understood with that meaning, that re-use of that acronym for any other computer-related concept is fraught with misunderstanding. A more appropriate short form for IronPython would be: "IPy". -- Vernon Cole On 25/07/14 00:54, Slide wrote: > Just so you are aware FePy was the name of a side project that was a > set of enhancements to IronPython. If you are looking for a shorter > form of IronPython, IP is generally the best way to go so there is no > confusion. From doug.blank at gmail.com Fri Jul 25 14:14:26 2014 From: doug.blank at gmail.com (Doug Blank) Date: Fri, 25 Jul 2014 08:14:26 -0400 Subject: [Ironpython-users] problem incorporating namespace into Xaml In-Reply-To: <53D22CD1.7020907@gmail.com> References: <53D19A7C.7050708@dsl.pipex.com> <53D22CD1.7020907@gmail.com> Message-ID: On Fri, Jul 25, 2014 at 6:09 AM, Vernon Cole wrote: > Repeating my (minority) argument on this subject years ago: > > "IP" is generally used as the acronym for "Internet Protocol" and is so > generally understood with that meaning, that re-use of that acronym for any > other computer-related concept is fraught with misunderstanding. > > A more appropriate short form for IronPython would be: "IPy". > Except that is nearly exactly the form that IPython uses as their logo [1]. Maybe IronPy (or IronPython) is short enough. Some James's don't want to be called "Jim" :) -Doug [1] - http://ipython.org/ > -- > Vernon Cole > > > On 25/07/14 00:54, Slide wrote: > >> Just so you are aware FePy was the name of a side project that was a set >> of enhancements to IronPython. If you are looking for a shorter form of >> IronPython, IP is generally the best way to go so there is no confusion. >> > _______________________________________________ > 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 jdimatteo at gmail.com Fri Jul 25 18:44:04 2014 From: jdimatteo at gmail.com (John DiMatteo) Date: Fri, 25 Jul 2014 10:44:04 -0600 Subject: [Ironpython-users] Enable Unmanaged Debugging IronPython In-Reply-To: References: Message-ID: FYI, I posted this issue on https://pytools.codeplex.com/workitem/2538 . --- John's business hour MST availability (and John's availability in EST ) On Wed, Jul 9, 2014 at 6:14 AM, Jeff Hardy wrote: > Adding DinoV because this sounds more like a PTVS issue than an IronPython > issue - from the IronPython side there's nothing that should prevent it > from working AFAIK. IronPython in VS uses the normal managed debugger. > > - Jeff > > > On Wed, Jul 9, 2014 at 12:04 AM, John DiMatteo > wrote: > >> Hello, >> >> While debugging, with an IronPython startup project, I'm trying to step >> from IronPython to C# code to unmanaged C/C++ code. Is this possible? >> >> I am currently able to step from IronPython to C# when the startup >> project is IronPython. I'm also currently able to step from C# to >> unmanaged C/C++ code when the startup project is C#. However, I am not >> able to step from IronPython to C# to C++ when the startup project is >> IronPython. >> >> Even though there was no relevant gui option I could find, I tried edited >> the .pyproj file, changing the EnableUnmanagedDebugging field from "false" >> to "true", but this did not have any noticeable impact. >> >> I'm using Visual Studio 2010 and Microsoft Visual Studio 2010 (Version >> 10.0.40219.1 SP1Rel), Microsoft .NET Framework Version 4.5.50709 SP1Rel, >> and Python Tools for Visual Studio 2.1.20620.00. >> >> I would greatly appreciate any help in this, even if just to confirm it >> is not possible so that I stop trying. >> >> Regards, >> John >> >> _______________________________________________ >> 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 no_reply at codeplex.com Tue Jul 29 09:26:46 2014 From: no_reply at codeplex.com (CodePlex) Date: 29 Jul 2014 00:26:46 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/28/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] DependencyProperty implementation in IP? ---------------------------------------------- ISSUES 1. [New issue] DependencyProperty implementation in IP? http://ironpython.codeplex.com/workitem/35425 User johntrinder has proposed the issue: "I'm new to IP and am trying to get to grips with the DependencyProperty class implementation (if there is one). I'm new to setting up a DependencyProperty anyway and I'm beginning a learning curve involving them. I have an excellent C# VS project that uses it and am analysing it also. Could someone please tell me if I'm wasting my time using IP to learn about DependencyProperty - I've Googled it and have got the basics but it's all in C# and can't find anything for IP. I'm becoming enamoured with IP and so would like to stick with this." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Wed Jul 30 09:22:03 2014 From: no_reply at codeplex.com (CodePlex) Date: 30 Jul 2014 00:22:03 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/29/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] DependencyProperty implementation in IP? ---------------------------------------------- ISSUES 1. [New comment] DependencyProperty implementation in IP? http://ironpython.codeplex.com/workitem/35425 User MarkusSchaber has commented on the issue: "

I don't know anything about DependencyProperty mechanism.

But you're more likely to get useful answers by asking in the IronPython Users mailing list (https://mail.python.org/mailman/listinfo/ironpython-users) or maybe on StackExchange (http://stackexchange.com/) instead of creating a bug report here - this tracking system is for bug reports and improvements only, not for user questions. :-)

" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Thu Jul 31 09:29:49 2014 From: no_reply at codeplex.com (CodePlex) Date: 31 Jul 2014 00:29:49 -0700 Subject: [Ironpython-users] IronPython, Daily Digest 7/30/2014 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [Status update] DependencyProperty implementation in IP? ---------------------------------------------- ISSUES 1. [Status update] DependencyProperty implementation in IP? http://ironpython.codeplex.com/workitem/35425 User slide_o_mix has updated the issue: Status has changed from Proposed to Closed with the following comment, "Please use the IP mailing list for questions." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: