[IronPython] Importing on another Thread

2008-07-01 Thread Dan Eloff
I actually haven't managed to successfully import any modules in a new thread, shouldn't this be possible in IronPython (2.0b3) Silverlight B2 All modules loaded in 2.95s Background imported [] Could not (background) import ['hmac', 'hashlib', 'urlparse', 'new', 'ConfigParser', 'cgi', 'heapq', '

Re: [IronPython] how to avoid a .Net object being converted to tuple type?

2008-07-01 Thread Dan Eloff
Liwei, You just need to add a __future__.py module with with_statement = True, or (probably better) just use the CPython 2.5 __future__.py. -Dan On Tue, Jul 1, 2008 at 9:22 PM, Liwei Peng <[EMAIL PROTECTED]> wrote: > thanks. > > Can you advise on how to use "with" statement in 2.0 beta3? I could

Re: [IronPython] how to avoid a .Net object being converted to tuple type?

2008-07-01 Thread Liwei Peng
thanks. Can you advise on how to use "with" statement in 2.0 beta3? I couldn't find the __future__ module by default thanks, liwei On Tue, Jul 1, 2008 at 4:40 PM, Dino Viehland <[EMAIL PROTECTED]> wrote: > I'm not sure about the error message but unfortunately 1.x doesn't expose > Dispose as

Re: [IronPython] IronPython 1.1.2 eta?

2008-07-01 Thread Keith J. Farmer
That's basically what I said. From: [EMAIL PROTECTED] on behalf of Dino Viehland Sent: Tue 7/1/2008 8:11 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython 1.1.2 eta? Or we could use reflection to access the members we need (we've been doing t

Re: [IronPython] CodeWalker public?

2008-07-01 Thread Michael Stephens
Thanks.. I didn't realize that the nodes were meant for walking :) I thought I would have to dispatch to the right walk method etc. Thanks! Michael Stephens Electrical Engineering Graduate Student University of Wyoming [EMAIL PROTECTED] or [EMAIL PROTECTED] On Tue, Jul 1, 2008 at 5:07 PM, Dino

Re: [IronPython] how to avoid a .Net object being converted to tuple type?

2008-07-01 Thread Dino Viehland
I'm not sure about the error message but unfortunately 1.x doesn't expose Dispose as __exit__. That's been fixed in 2.0. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Liwei Peng Sent: Tuesday, July 01, 2008 4:26 PM To: users@lists.ironpython.com Subject: [IronPython] how to avoi

[IronPython] how to avoid a .Net object being converted to tuple type?

2008-07-01 Thread Liwei Peng
Hi, I am trying to call MPI.Net from IronPython 1.1.1 in the following script. The problem is IronPython automatically converts my MPI.Environment() object into a tuple type, so that the object cannot be disposed at the end of with statement. the following is what I did: 1) write a __future__.py

[IronPython] help: ironpy 1.1.1: clr.Reference(Array[str]) works in interactive mode but not in script

2008-07-01 Thread Liwei Peng
Hi Iron python team, I have trouble when using *clr.Reference(Array[str]…)* in the following python script. When I ran the script line by line under interactive mode ipy.exe, no issue is found. When I ran it with "ipy.exe a.py", I got the following error: Traceback (most recent call last):

Re: [IronPython] CodeWalker public?

2008-07-01 Thread Dino Viehland
There's a AstWalker/IAstWalker in IronPython.Compiler.Ast which is better for general consumption. Is that good enough? The AST nodes then expose Walk method which take the IAstWalker. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Stephens Sent: Tuesday, July 01, 2008

[IronPython] CodeWalker public?

2008-07-01 Thread Michael Stephens
Any chance of getting CodeWalker made public in the 1.2 release? We really need to be able to easily walk through the AST and track dependant objects. Michael Stephens Electrical Engineering Graduate Student University of Wyoming [EMAIL PROTECTED] or [EMAIL PROTECTED] ___

Re: [IronPython] ToyScript - Parses code twice?

2008-07-01 Thread Dino Viehland
IF you haven't figured this out yet I think it's due to the fact that it gets parsed once to get the source code properties (by the console) and once to compile it. It should only be interactive code that this is happening to. If it's happening to all code then there's probably a bug somewhere

Re: [IronPython] Another deployment question...

2008-07-01 Thread Michael Foord
Bob Rosembob wrote: Michael, thanks for your help. I looked at the documentation and tried to follow the directions but I got something different then what I expected. Here what I did: 1. Copied IronPython and IronMath dlls and ipy.exe into the directory where my script is 2. Started comman

Re: [IronPython] Python Generation

2008-07-01 Thread Michael Stephens
http://tech-michael.blogspot.com/2008/06/python-generation-using-code-dom.html Michael Stephens Electrical Engineering Graduate Student University of Wyoming [EMAIL PROTECTED] or [EMAIL PROTECTED] On Tue, Jul 1, 2008 at 12:26 PM, Tim Riley <[EMAIL PROTECTED]> wrote: > Care to share an example?

Re: [IronPython] Another deployment question...

2008-07-01 Thread Bob Rosembob
I thinks I got it. ipy.exe pyc.py /target:dll cycle.py would create cycle.dll - Original Message From: Bob Rosembob <[EMAIL PROTECTED]> To: Discussion of IronPython Sent: Tuesday, July 1, 2008 2:29:12 PM Subject: Re: [IronPython] Another deployment question... Michael, thanks for your

Re: [IronPython] Another deployment question...

2008-07-01 Thread Bob Rosembob
Michael, thanks for your help.   I looked at the documentation and tried to follow the directions but I got something different then what I expected. Here what I did: 1. Copied IronPython and IronMath dlls and ipy.exe into the directory where my script is 2. Started command prompt and changed the

Re: [IronPython] Python Generation

2008-07-01 Thread Tim Riley
Care to share an example? I am very interested in this. On Mon, Jun 30, 2008 at 10:39 PM, Michael Stephens <[EMAIL PROTECTED]> wrote: > Thanks.. I've got a basic example up. > > Michael Stephens > > Electrical Engineering Graduate Student > University of Wyoming > [EMAIL PROTECTED] or [EMAIL PROTE

Re: [IronPython] IronPython 1.1.2 eta?

2008-07-01 Thread Michael Foord
Dino Viehland wrote: We're not going to do that anytime soon - but there will be a point in the future when we require a more recent .NET than 2.0. Our current thinking is that happens when pieces of the DLR move into the .NET framework. We'll then have a major new version - e.g. 3.0. But i

Re: [IronPython] IronPython 1.1.2 eta?

2008-07-01 Thread Dino Viehland
We're not going to do that anytime soon - but there will be a point in the future when we require a more recent .NET than 2.0. Our current thinking is that happens when pieces of the DLR move into the .NET framework. We'll then have a major new version - e.g. 3.0. But it's not going to happen

Re: [IronPython] IronPython 1.1.2 eta?

2008-07-01 Thread Dino Viehland
Or we could use reflection to access the members we need (we've been doing that for a while to get a 2.0SP1 feature). For small features this is perfectly reasonable but for something as large as transforming our ASTs into LINQ ASTs it seems better to just move to a newer version of .NET when a

Re: [IronPython] Another deployment question...

2008-07-01 Thread Michael Foord
Bob Rosembob wrote: One script that I'm using is a third party code and they would prefere me to use the compiled version of it. Is there a way to compile it? You *cannot* use '.pyc' files with IronPython. With IronPython 1 you can compile Python files into .NET assemblies that you can impo

[IronPython] Another deployment question...

2008-07-01 Thread Bob Rosembob
One script that I'm using is a third party code and they would prefere me to use the compiled version of it. Is there a way to compile it? Please advise. Thanks, Bob --- Bob Rosembob wrote: >Hi there, >I have a couple of questions

Re: [IronPython] StaticResources + DLR + Silverlight

2008-07-01 Thread Dan Eloff
Hi Jimmy, I was reading your blog and it turns out you and I are the same age. Go figure. I tried this out, and it works great. There's one major problem with it though. It doesn't work with templating. LoadComponent has no overload that accepts a xaml string (or loaded application object). The c

Re: [IronPython] IronPython 1.1.2 eta?

2008-07-01 Thread Michael Foord
Dino Viehland wrote: The good news is this is basically inevitable but will take some time to achieve :). In the latest source code, I guess currently available only through the IronRuby SVN, you'll see that the namespaces of the DLR expression trees have moved to System.Linq.Expressions. Th