Re: [IronPython] IronPython with CherryPy through WSGI Memory issue

2010-04-02 Thread Dino Viehland
Jeff wrote: I'm seeing a lot of objects with !gcroots that start with DOMAIN(005F5F48):HANDLE(Strong):161100:Root:02913dac(System.Threading.Thread)- 0b93e034(System.Object[][])- 0b93e048(System.Object[])- 223edd34(System.Collections.Generic.List`1[[Microsoft.Scripting.Runtime.Dynami

Re: [IronPython] IronPython with CherryPy through WSGI Memory issue

2010-04-02 Thread Dino Viehland
Jeff wrote: I hate to ask the ETA for 2.7 is - fall, probably? End of year is what we've been saying. ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Re: [IronPython] IronPython with CherryPy through WSGI Memory issue

2010-04-02 Thread Dino Viehland
Jeff wrote: This is 2.6.0. It looks like its one of the server's worker threads (I'm just using the built-in VS webserver), at least from a random sample of objects. Are the fixes in 2.6.1 RC1? Yes there are some fixes in 2.6.1 RC1 but obviously they're not working. Can you clear the

Re: [IronPython] IronPython Tools for Visual Studio

2010-04-08 Thread Dino Viehland
It's not yet publicly available - the preview was given out exclusively to PyCon attendees on a CD. We'll be putting out an updated version within a couple of weeks after VS 2010 launches which is April 12th. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com]

Re: [IronPython] IronPython Tools for Visual Studio

2010-04-08 Thread Dino Viehland
[A] R.A.Dvorského 601, Praha 10 [A] 10900, Czech Republic, Europe Dino Viehland wrote: It’s not yet publicly available – the preview was given out exclusively to PyCon attendees on a CD. We’ll be putting out an updated version within a couple of weeks after VS 2010 launches which is April 12^th

Re: [IronPython] IronPython.Runtime.Types.PythonType Is not marked as Serializable Exception

2010-04-12 Thread Dino Viehland
() { Console.WriteLine(Did it virtually {0}, AppDomain.CurrentDomain.Idhttp://appdomain.currentdomain.id/); } public void DoIt() { Console.WriteLine(Did it {0}, AppDomain.CurrentDomain.Idhttp://appdomain.currentdomain.id/); } } On Tue, Mar 30, 2010 at 10:12 PM, Dino Viehland di

Re: [IronPython] Building via AST

2010-04-12 Thread Dino Viehland
Nope – the DLR doesn’t have any support for building .NET types – dynamic or otherwise. If you’d like to just build an object which behaves dynamically I’d suggest looking at DynamicObject. You can just subclass it and override various Try* methods and you’ll have a dynamic object. If you

Re: [IronPython] Building via AST

2010-04-12 Thread Dino Viehland
and load them via MEF (by means of the Export attribute). Is this just the wrong way to be thinking about this entirely? Or am I just missing something? On Mon, Apr 12, 2010 at 3:33 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: Nope – the DLR doesn’t have any support

Re: [IronPython] Building via AST

2010-04-12 Thread Dino Viehland
such that it is possible. On Mon, Apr 12, 2010 at 5:20 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: Yes – there is the TypeGen class but really it’s just a thin wrapper around TypeBuilder w/ some helper APIs. If we were to implement it today it might just be extension

Re: [IronPython] 2.6.1 implements ssl module, but it crash...

2010-04-13 Thread Dino Viehland
qiuyin...@sohu.com wrote: import imaplib c = imaplib.IMAP4_SSL('imap.sohu.com', 993) c.login(myusername, mypassword) ipy.exe memory footprint increase to 170M... and crash soon. 2.6.1 and 2.6.1with.NET4 has the same problem Any idea what the crash is? Is it popping up the normal windows

Re: [IronPython] is the performance gap between C and CPython a decent comparision between the performance gap between C# and IronPython?

2010-04-14 Thread Dino Viehland
It's certainly true that we both inherit a lot of characteristics from our underlying platform. For example we get a JIT which we can use to compile Python code whenever we want it and they get a highly optimizing ahead of time compiling which they can use for optimized data structure

Re: [IronPython] Building via AST

2010-04-14 Thread Dino Viehland
...@gmail.com wrote: Awesome. I will thanks. On Apr 12, 2010 7:49 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: This might be possible. If you wrap this all up in a PythonAst object (calling the constructor which takes a CompilerContext), call Bind on it then you should get

Re: [IronPython] Building via AST

2010-04-14 Thread Dino Viehland
) On Wed, Apr 14, 2010 at 3:32 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: The problem here is just that you actually have a nested code context when for the top-level code you just need a single global context. Replace the line: var

Re: [IronPython] 2.6.1 implements ssl module, but it crash...

2010-04-14 Thread Dino Viehland
My guess is that the exception we’re reporting is either of the wrong type or doesn’t have the right information. ssl.SSLSocket.read is catching SSLError and it looks like we’d probably throw a socket.SocketError instead. I’ve opened this bug:

Re: [IronPython] ssl server mode issue

2010-04-14 Thread Dino Viehland
Could you include the Python code which is doing the connections? Are you doing an IronPython to IronPython connection? Or are you connecting to a server or localhost running a server outside of IronPython? -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-

Re: [IronPython] IronPython code to call IronRuby fails; equivalent? C# code works

2010-04-16 Thread Dino Viehland
Is this IronPython 2.6.1 and IronRuby 1.0? From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of john.caw...@rkeng.com Sent: Friday, April 16, 2010 2:20 PM To: Users@lists.ironpython.com Subject: [IronPython] IronPython code to call IronRuby fails;

[IronPython] License change?

2010-04-19 Thread Dino Viehland
Hello IronPython community, As you probably know IronPython has a long history of releasing our source code under permissive licenses. Initially IronPython was released under a specific IronPython license which was quite similar to the Microsoft Public License (PS-Pl) we ship under today. We

Re: [IronPython] Bad performance calling .NET method

2010-04-20 Thread Dino Viehland
I assume something is going horribly wrong with our type checks. Can you attach the repro? Or at least are these just classes, or are any structs, or maybe weird classes like delegates? And is this on .NET 2.0 or .NET 4.0? From: users-boun...@lists.ironpython.com

Re: [IronPython] Bad performance calling .NET method

2010-04-20 Thread Dino Viehland
...@lists.ironpython.com [users-boun...@lists.ironpython.com] on behalf of Dino Viehland [di...@microsoft.com] Sent: Tuesday, April 20, 2010 11:34 AM To: Discussion of IronPython Subject: Re: [IronPython]Bad performance calling .NET method I assume something is going horribly wrong with our type checks

Re: [IronPython] IronPython Tools for Visual Studio 2010

2010-04-20 Thread Dino Viehland
Ted wrote: Looking forward to this release. Will the pycon version install with VS 2010 final? I suppose I can try. I haven't tried myself but I've heard that it doesn't work. ___ Users mailing list Users@lists.ironpython.com

Re: [IronPython] Still stuck on rich editor with IronPython and Silverlight

2010-04-22 Thread Dino Viehland
Ok, I know what's going on here, but I don't know the exact solution. I'm hoping one of you two know the solution. The good news is there's no bug, the rich text box isn't supposed to work! :) What's going on is that quirks mode is disabling the creation of the rich text box. This appears to

Re: [IronPython] Bad performance calling .NET method

2010-04-22 Thread Dino Viehland
() From: users-boun...@lists.ironpython.com [users-boun...@lists.ironpython.com] on behalf of Dino Viehland [di...@microsoft.com] Sent: Tuesday, April 20, 2010 12:51 PM To: Discussion of IronPython Subject: Re: [IronPython]Bad performance calling .NET method Is the perf problem only

Re: [IronPython] Calling a Python function with passed in args/kwargs from C#

2010-04-23 Thread Dino Viehland
Jeff wrote: I'm trying to call a Python function from C# using args/kwargs from the C# function, like so: public void Frob(CodeContext context, [ParamDictionary]IDictionary kwargs, params object[] args) { context.LanguageContext.Operations.Invoke(foo, args, kwargs); }

Re: [IronPython] Default-valued arguments to C# functions

2010-04-23 Thread Dino Viehland
Jeff wrote: I've got some functions implemented in C# that need to have optional, defaulted parameters. So far I've been declaring them similar to: public object cursor(CodeContext context, [Optional][DefaultValue(null)]object factory) However, if factory is not specified, instead of

Re: [IronPython] Convert a PythonBuffer to a byte[]

2010-04-26 Thread Dino Viehland
Jeff wrote: I can't seem to find any easy to convert a PythonBuffer (created in Python and passed to C#) to a byte[]. The best solution I've found so far is to call __getslice__ to get a string and convert that to a byte[]. Is there a better way to so this? If not, will __getslice__ always

Re: [IronPython] Advantage Database ado.net provider difficulties

2010-04-27 Thread Dino Viehland
My initial guess would be that you want your string literal to be a raw string literal. That is it should have the r prefix such as rdata source= I'm guessing the C# code might have been doing @data source=... because of the \n in the connection string. From:

Re: [IronPython] IronPython Tools for Visual Studio

2010-04-27 Thread Dino Viehland
] On Behalf Of Prasanna Jaganathan Sent: Tuesday, April 27, 2010 8:13 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython Tools for Visual Studio Hi Is this available now? Two weeks are up! :-) Prasanna On Thu, Apr 8, 2010 at 11:29 PM, Dino Viehland di...@microsoft.commailto:di

Re: [IronPython] Ironpython reload assembly/dll from console

2010-04-28 Thread Dino Viehland
Unfortunately the CLR doesn't have any support for reloading. But you should be able to do clr.AddReferenceToFile instead of just clr.AddReference. IronPython will then update the types which are available for import so they're the new types. There may be some issues around CLR loader

Re: [IronPython] pyc.py error compiling decimal.py

2010-04-29 Thread Dino Viehland
Lukas wrote: Is the following error the same as in http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=26593 C:\Dos\IronPython-2.6.1ipy.exe Tools\Scripts\pyc.py /target:dll Lib\decimal.py Input Files: Lib\decimal.py Output: decimal Target: Dll

Re: [IronPython] Dealing with exceptions in an extension module

2010-04-30 Thread Dino Viehland
Jeff wrote: I'm trying to fix up the exceptions for the _sqlite3 module I'm implementing. The dbapi spec (PEP 249) requires a very specific exception hierarchy, including exceptions derived from StandardError. My initial version just used C# Exception classes, but StandardError is not a

Re: [IronPython] Writing a Python iterator in C#?

2010-04-30 Thread Dino Viehland
Jeff wrote: I'm trying to implement a Python iterator in C# without also implementing IEnumerator/IEnumerable (I'm also assuming it's even possible, of course). When trying to use the class in a for loop (`cu` is a Cursor instance): for row in cu: print cu TypeError: Unable

Re: [IronPython] Dealing with custom sequence/mapping types from C#

2010-04-30 Thread Dino Viehland
Jeff wrote: Given the following types (from sqlite3's tests): class L(object): def __len__(self): return 1 def __getitem__(self, x): assert x == 0 return foo class D(dict): def __missing__(self, key):

Re: [IronPython] Calling explicitly-implemented interface methods

2010-04-30 Thread Dino Viehland
Michael wrote: On 30/04/2010 23:58, Dino Viehland wrote: Michael wrote: On 30/04/2010 23:32, Dino Viehland wrote: Michael wrote: Hey all, I'm porting the dotnet-integration document that comes with IronPython to Try Python. The following example doesn't work, because

[IronPython] Announcing IronPython Tools for Visual Studio

2010-04-30 Thread Dino Viehland
Hello Python Community, We are happy to announce the first broadly available release of IronPython Tools for Visual Studiohttp://www.ironpython.net/tools/. IronPython Tools for Visual Studio (IPyTools) is a set of extensions available for Visual Studio 2010 which supports development of

Re: [IronPython] Can't install IronPython Tools for Visual Studio

2010-05-02 Thread Dino Viehland
Lukáš Duběda wrote: Oh, ok, thanks for pointing that out Michael. Now, does the Isolated Shell (I don't really know the difference), provide a visual designer for Windows Forms and WPF? It does include the drag and drop designers - only the WPF designer works w/ IronPython though (WinForms

Re: [IronPython] Can't install IronPython Tools for Visual Studio

2010-05-02 Thread Dino Viehland
Lukáš Duběda wrote: Ok, I'm a little lost here. I previously installed the C# Visual Studio Express version. Then I installed the Visual Studio Isolated Shell and since I have no previous experience with VS, how do I make the IPy tools extension to install via the Isolated Shell? And also,

Re: [IronPython] IronPy Tools for VS - Projects

2010-05-02 Thread Dino Viehland
Brian wrote: On Sat, May 1, 2010 at 23:45, Steve Dower s.j.do...@gmail.com wrote: My own 'Python tools' (for VS2008, never made it beyond private use) automatically adds the package name to the caption of __init__.py files (as shown in

Re: [IronPython] IronPy Tools for VS - Projects

2010-05-02 Thread Dino Viehland
Steve wrote: So, love having IronPy Tools (download from www.ironpython.net/tools/ for those who missed it) and very keen to help make it the best Python IDE out there (and frankly, it's almost there already IMHO). My first issue is with the project setup. While I really like it

Re: [IronPython] Can't install IronPython Tools for Visual Studio

2010-05-03 Thread Dino Viehland
Lukáš Duběda wrote: Thanks for pointing that out, Curt, now, for such a trivial function I can imagine substituting it with a Lambda, however, how would I use a more complex function? I found out exactly that when not passing any arguments the function works like this: def

Re: [IronPython] IronPy Tools for VS - Projects

2010-05-03 Thread Dino Viehland
Steve Dower wrote: There were some bugs here and I thought we fixed them all.  Can you give a little more detail? It seems somewhat unpredictable. The outlining regions occasionally don't fully appear when either the start or the end of the region is not visible (maybe my functions are

Re: [IronPython] IronPy Tools for VS - Projects

2010-05-03 Thread Dino Viehland
Steve wrote: The code snippet below does it. The region for class A goes all the way to the next class/EOF (actually, 3 lines before EOF, unless there's whitespace on the third- or second-last lines), the region for funca goes from the def to the line 'def funcb(self):' inclusive and the

Re: [IronPython] Events button?

2010-05-05 Thread Dino Viehland
We still definitely have a lot of work to do on the designer integration - right now the current level of support is that you can use the XAML designer and load the XAML. We already have intellisense support on the todo list but we'll add these suggestions as well. Thanks! From:

Re: [IronPython] XAML attribute edit = Unhandled Exception

2010-05-05 Thread Dino Viehland
Thanks for reporting this. This repros for me as well - I'm not sure what's going on here yet but I'm trying to figure out it now. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Hank Fay Sent: Tuesday, May 04, 2010 7:09 PM To: Discussion of

Re: [IronPython] XAML attribute edit = Unhandled Exception

2010-05-05 Thread Dino Viehland
I've got a fix for this and so it'll be in the next release. Earlier during the investigation I was thinking you might be able to work around it by getting the right set of MSBuild includes in our .pyproj files - but I ran into a later bug in MPFProj

Re: [IronPython] IronPy Tools for VS - Bugs

2010-05-05 Thread Dino Viehland
Steve wrote: I've been collating some little things into a single email rather than spamming the list. These are roughly organised in order of annoyance, and none are show-stoppers by any measure. Bulk is nice and thanks for the reports! When completion auto-commits (Ctrl+Space -- word is

Re: [IronPython] IronPy Tools for VS - Bugs

2010-05-06 Thread Dino Viehland
Steve wrote: Judging from the text colour, strings aren't recognised until there is both an opening and closing quote. I am not in the habit of putting both quotes immediately and then typing within them (I put the first one, type the string and then close it) and so until I reach the end of

Re: [IronPython] Newbie question about importing from System.Windows

2010-05-07 Thread Dino Viehland
Matt wrote: I'm running IronPython 2.6.1 for .NET 4.0, and have installed Visual Studio 2010 and Silverlight 4SP2. I tried to import System.Windows.Controls, but got an error that Windows does not exist. Trying to run ipy from the command line and running this: import System

Re: [IronPython] Formating Decimal numbers / re.match bug

2010-05-07 Thread Dino Viehland
Thanks for the report - I think I have a fix for this, we're simply not recognizing \A as meaning match at the start of input (which both Python and .NET recognize so it's just a matter of letting us pass it through). From: users-boun...@lists.ironpython.com

Re: [IronPython] IronPython unichr() problem with values greater than 65536

2010-05-11 Thread Dino Viehland
Can Gencer wrote: I am having some problems with the unichr() built in function in IronPython. It only seems to support unicode characters up to 2 bytes, not the extended unicode characters. You can simply try a command like unichr(66363) and it will give a ValueError, saying that the

Re: [IronPython] Some More Newbie Questions

2010-05-11 Thread Dino Viehland
Matt Funke: In IronPython Tools for Visual Studio 2010, how do you make it clear where the location of a file to be included is? I have this line that trips up the execution: from avalon import * ... even though avalon.py is in the same directory, and that directory is pointed to by the

Re: [IronPython] Eventhandling in the IDE: Who is the audience?

2010-05-12 Thread Dino Viehland
This is great feedback and I've added it to a designer TODO list. I'll spend some time in the (hopefully near) future going through and improving the designer experience. If you have any other thoughts on things we should do in that space (or shouldn't do :)) I'd love to hear it and I'll add

Re: [IronPython] IronPy Tools for VS - Bugs #2

2010-05-12 Thread Dino Viehland
Thanks for reporting these and sorry for the delay in the response - it's been a busy week so far! I now have fixes for all of these except for the completion cannot be committed issue checked in so they'll be in the next release. I'll keep an eye out for the completion not committing issue as

Re: [IronPython] Problems with 'unbound-class-instance' method

2010-05-17 Thread Dino Viehland
Can you try the typedproxy class which is on this bug: http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=470 ? It should work to wrap the object and let you access the various attributes that you want to by calling through the type (in this case the interface type - you'd pass

Re: [IronPython] IronPy Tools for VS - Projects

2010-05-17 Thread Dino Viehland
Here's my simple summary: tl;dr: I don't think the directory based projects are useful, they might even not work correctly in a bunch of places, and they'll probably be a bug farm. I actually think the only thing I really disagree about is that there will always be lingering crashing bugs. We

Re: [IronPython] IronPy Tools for VS - Projects

2010-05-17 Thread Dino Viehland
Jeff wrote: The only thing I'd hate to lose is the ability to point VS at a folder full of Python code and have it open and allow me to start hacking on it. For the foreseeable future, most Python projects are not going to include .pyproj files to make it easy. It doesn't matter how that's

Re: [IronPython] IronPy Tools for VS - Projects

2010-05-17 Thread Dino Viehland
Steve wrote: Is it possible to have the directory based projects 'implied' when a single file is opened (TextMate http://macromates.com/ style)? Because I agree with Jeff here that loading existing projects is dead simple when you can just add a pyproj. Though the '...from existing code'

Re: [IronPython] IronPy Tools for VS - Projects

2010-05-18 Thread Dino Viehland
Steve wrote: Is it possible to have the directory based projects 'implied' when a single file is opened (TextMate http://macromates.com/ style)? Because I agree with Jeff here that loading existing projects is dead simple when you can just add a pyproj. Though the '...from existing code'

Re: [IronPython] Add reference to .dll located in above directory

2010-05-20 Thread Dino Viehland
Instead of sys.path.append('root') can you append the full path to sys.path? That seems to work for me, I have: Directory of F:\Product\1\Dlr\x 05/20/2010 10:34 AMDIR . 05/20/2010 10:34 AMDIR .. 05/20/2010 10:30 AMDIR module 05/20/2010 10:30 AM

Re: [IronPython] Add reference to .dll located in above directory

2010-05-20 Thread Dino Viehland
Lukáš wrote: Yes, the above works for me too, but the following one does not: F:\Product\1\Dlr\x\module ipy foo.py Even with the full path added to sys.path instead of the relative path? Because this one works for me as well. ___ Users

Re: [IronPython] Add reference to .dll located in above directory

2010-05-20 Thread Dino Viehland
: [IronPython] Add reference to .dll located in above directory Dino Viehland wrote: Lukáš wrote: Yes, the above works for me too, but the following one does not: F:\Product\1\Dlr\x\module ipy foo.py Even with the full path added to sys.path instead of the relative path? Because

Re: [IronPython] IronPython Tools and standard library

2010-05-24 Thread Dino Viehland
I don't think there's a way to do this right now other than copying the standard library (or site-packages) into your project :( I'll add it to the list of bugs and try and come up with a fix. And ultimately we also want some form of caching of the intellisense data so we don't need to

Re: [IronPython] Performance str.replace in Silverlight

2010-05-27 Thread Dino Viehland
Yikes! I'll take a look at this next Tuesday (the entire team is on vacation Until then) - a quick look over the code doesn't show us doing anything too stupid so I'm not sure what the problem is :( But feel free to open a bug in the mean time. -Original Message- From:

Re: [IronPython] Willing to pay for help

2010-05-27 Thread Dino Viehland
Another way to do this, and one I think you were trying to accomplish, and is probably superior, would be to move this to another thread. In your code you have: #t = Thread(ThreadStart(CreateZip(zipname, fname))) #t.Start()

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Dino Viehland
Jeff wrote: On Mon, Jun 7, 2010 at 7:14 AM, Christos Pavlides ncich...@gmail.com wrote: I am thinking that it could be better if the ScriptEngine and CompiledCode are thread safe, and if I create one static engine an one static CompliledCode then this will minimize the compile time since

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Dino Viehland
Jeff wrote: On Mon, Jun 7, 2010 at 9:53 AM, Dino Viehland di...@microsoft.com wrote: This is correct and is definitely the recommended way to do this.  The only reason to separate it out into separate ScriptEngine instances is if you want isolation between the script engines themselves

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Dino Viehland
Christos wrote: Thanks Jeff, This is the recommendation I was expecting to get. I will run a high concurrency test on a single engine and single compiled code, with new scopes for each request and see where it takes me. Do I need any locks on the engine itself when Getting the scope (which

Re: [IronPython] Question about IronPython tools for Visual Studio

2010-06-07 Thread Dino Viehland
There's currently no way to do this - we should add this to the TODO list and make it an option in Tools-Options. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Ashley Abraham Sent: Monday, June 07, 2010 3:16 PM To: Discussion of IronPython

Re: [IronPython] deepcopy

2010-06-10 Thread Dino Viehland
Is there a DBNull value somewhere in your object? DBNull is a singleton and I'd guess we'd need to add some custom logic which says the way we deserialize it is by pulling the singleton from DBNull.Value. You can probably use copy_reg.pickle to register something which will handle objects of

Re: [IronPython] Debugging IronPython script using IronPython tools for Visual Studio(CP2)

2010-06-13 Thread Dino Viehland
I'm assuming the problem here is that this is exiting w/ a non-zero exit code indicating something went wrong. But what went wrong really depends on what the last exception is - there appears to be some failure to import something. The other exceptions are expected as the standard library

Re: [IronPython] Debugging IronPython script using IronPython tools for Visual Studio(CP2)

2010-06-15 Thread Dino Viehland
and continue after these) and see what the last exception is? Sorry, I am not familiar how to do this. I search for some tutorial, but if you have some wiki out there I can use, I can probably give it a try. Regards, Yngipy On Mon, Jun 14, 2010 at 3:33 AM, Dino Viehland di

Re: [IronPython] Convert between python array and .NET Array

2010-06-15 Thread Dino Viehland
Can I make a different recommendation? Rather than doing a Marshal.Copy you could use ctypes.memmove. That would look like: import ctypes ctypes.memmove(bmData.Scan0, bytes.buffer_info()[0], total_bytes) If Scan0 is actually an IntPtr youa may need to do a .ToInt32() or .ToInt64() on it (I

Re: [IronPython] Convert between python array and .NET Array

2010-06-15 Thread Dino Viehland
Marcel wrote: Thanks Dino, the ctypes.memmove does work! I wasn't aware that ctypes could be used in IronPython. Do they marshal to unmanaged code under the hood? There's not really any unmanaged code on *our* side involved at all. It all turns into .NET's support for interop. So we'll

Re: [IronPython] Modules in hosted enviroment

2010-06-22 Thread Dino Viehland
Jeff wrote: Hi Ross, It sounds like you want Dino's suggestion IAttributesCollection, which will give you much more flexibility. I've never done that, but it looks fairly straightforward. An unrelated issue I have with ScriptScope is I can't figure out to add overloaded functions with

Re: [IronPython] TryGetMember is called for methods instead of TryInvokeMember

2010-06-22 Thread Dino Viehland
Calling TryGetMember is actually the correct thing to do. Different languages have different semantics for when you do “a.Foo();” Some languages turn this into an InvokeMember while other languages separate this out into a get and invoke. In Python we separate this out into a get and invoke

Re: [IronPython] Modules in hosted enviroment

2010-06-23 Thread Dino Viehland
that I can't do what I described I will use on of the many other methods indicated. Thanks for the help -- From: Dino Viehland di...@microsoft.com Sent: Tuesday, June 22, 2010 6:56 PM To: Discussion of IronPython users@lists.ironpython.com

Re: [IronPython] IronPython 2.6 CodePlex Source Update

2010-06-24 Thread Dino Viehland
But I think we do intend to ensure that we still build on .NET 3.5 and above - we just won't be releasing those binaries ourselves. .NET 2.0 SP1 will be dropped completely and we won't be doing our normal extensive test passes on .NET 3.5. -Original Message- From:

Re: [IronPython] Implementing Greenlets API in IronPython

2010-06-28 Thread Dino Viehland
. It needs to store the context and uses the inherent context switching built into Python to do it. == End Response == Ideas? Tristan On Mon, May 31, 2010 at 1:28 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: You'll want to first look at GeneratorRewriter.cs - it's

Re: [IronPython] IronPython 2.6 CodePlex Source Update

2010-06-29 Thread Dino Viehland
http://knowbody.livejournal.com/20751.html :) Thanks, Dave -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Dino Viehland Sent: Thursday, June 24, 2010 10:57 AM To: Discussion of IronPython Subject: Re

[IronPython] Announcing IronPython Tools for Visual Studio CTP3

2010-07-01 Thread Dino Viehland
Hello Python Community, We are happy to announce a minor update to the IronPython Tools for Visual Studio. IronPython Tools for Visual Studio (IPyTools) is a set of extensions available for Visual Studio 2010 which supports development of IronPython applications. This release is our 3rd

Re: [IronPython] Conflicting information with Ironpython and MapWindowGIS interop

2010-07-01 Thread Dino Viehland
My guess is you need to change: shapefile1 = MapWinGIS.Shapefile To: shapefile1 = MapWinGIS.Shapefile() You've just gotten a reference to the class whereas the C# code has created an instance of that class. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users-

Re: [IronPython] Conflicting information with Ironpython and MapWindowGIS interop

2010-07-02 Thread Dino Viehland
): File stdin, line 1, in module ValueError: Could not convert argument 0 for call to Open. I guess its time to add IronPython in Action back to my Safari account and read the C# stuff I skipped over before. On Thu, Jul 1, 2010 at 9:34 PM, Dino Viehland di...@microsoft.com wrote: My guess

Re: [IronPython] IronPython Tools for existing project

2010-07-05 Thread Dino Viehland
We should definitely be adding relative paths so this is just a bug and I'll take a look at fixing it. -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Michael Foord Sent: Monday, July 05, 2010 8:12 AM To:

Re: [IronPython] IronPython Tools for existing project

2010-07-05 Thread Dino Viehland
Michael wrote: On 05/07/2010 21:20, Dino Viehland wrote: We should definitely be adding relative paths so this is just a bug and I'll take a look at fixing it. Cool - any ideas on the Chiron issue? (Why it isn't building our xap file and if it is possible for me to tell it about

Re: [IronPython] IronPython Tools for existing project

2010-07-07 Thread Dino Viehland
Michael wrote: A further problem I forgot to mention is that when I add / create items through the ui it puts absolute paths in the project file rather than relative ones. This makes it problematic to keep the project files under version control where different users will have different paths.

Re: [IronPython] IronPython Tools for existing project

2010-07-07 Thread Dino Viehland
There's definitely some problems w/ this - for example it appears that rename doesn't work with this right now. I'm not sure what else would be broken when using that syntax but I'm guessing that it's generally not supported by MPFProj. We do successfully bring up all the files though into

Re: [IronPython] GUI programming / IronPython

2010-07-08 Thread Dino Viehland
Michael wrote: On 08/07/2010 17:38, Marcin Krol wrote: Hello everyone, I'm a relatively long-time Python user and need to develop a GUI application with Python. I'm waffling between PyQT and IronPython. PyQT has multiplatform capability that is going for it. On the plus side,

Re: [IronPython] Dynamic-ish programming, or MissingMemberException

2010-07-08 Thread Dino Viehland
Marcin wrote: Michael Foord wrote: Don't use IronPython Studio - it is *very* unstable and uses IronPython 1 which is years out of date. Yikes. Use IronPython Tools for Visual Studio 2010: http://ironpython.net/ironpython/tools/ Basically you shouldn't use __slots__ because

Re: [IronPython] System.MissingMemberException

2010-07-09 Thread Dino Viehland
Marcin wrote: Hello everyone, Ok I found the cause, the __init__ filled in from the template is exactly one space to the left from where it should be: class MyForm(Form): def __init__(self): ... def func(self, x): return x If I shift def __init__.. one space

Re: [IronPython] System.MissingMemberException

2010-07-09 Thread Dino Viehland
Marcin wrote: Hello everyone, I have stumbled upon what's probably an idiotic newbie problem: if I add any method to a class, I get System.MissingMemberException. E.g. import clr clr.AddReference('System.Windows.Forms') from System.Windows.Forms import * class MyForm(Form):

Re: [IronPython] Tracebacks

2010-07-09 Thread Dino Viehland
Rob wrote: Hi This might be the wrong list for this, but when I run python apps in an ide (like wing) I get nice exception tracebacks with line numbers, yet in visualstudio with ironpython tools these are missing, instead I get a dialog that isn't very useful unless I copy the details to

Re: [IronPython] sys._getframe(0).f_lineno always returns 1

2010-07-09 Thread Dino Viehland
This is definitely a bug. If you'd open a bug on CodePlex that'd be great. Currently we only track the line information locally but in -X:Frames mode we should hoist that information into the frame. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On

Re: [IronPython] Unable to find assembly 'Microsoft.Dynamic

2010-07-09 Thread Dino Viehland
Can you bring the interactive window up normally using Alt-I or View-Other Windows-IronPython Interactive? -Original Message- From: users-boun...@lists.ironpython.com [mailto:users- boun...@lists.ironpython.com] On Behalf Of Marcin Krol Sent: Friday, July 09, 2010 9:24 AM To:

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Dino Viehland
Marcin wrote: Hello Michael and everyone, Michael Foord wrote: I recommend using the Visual Studio C# designer and then subclass the classes it generates from IronPython. I set out to do just that and stumbled upon a problem: I generated Windows form in C#, compiled into assembly

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Dino Viehland
Marcin wrote: Dino Viehland wrote: Is there some way of simply overriding methods in Python so that they do get called by form events? In both of these cases there are no methods to be overridden. You're just defining methods which you want to use for the event handlers. You need

Re: [IronPython] Unable to find assembly 'Microsoft.Dynamic

2010-07-09 Thread Dino Viehland
Marcin wrote: Dino Viehland wrote: Can you bring the interactive window up normally using Alt-I or View-Other Windows-IronPython Interactive? Sure -- you mean that I run the program via execfile()? Here's result, it's an exception but different one this time: execfile('Program.py

Re: [IronPython] overriding methods from C# classes

2010-07-09 Thread Dino Viehland
Marcin wrote: Curt Hagenlocher wrote: Yes. It's universally true in the CLR that you can't override a function in a derived class unless the function was marked as virtual in the base class. IronPython is no different than C# in this regard. One thing that would be *nice* for C# noobs

Re: [IronPython] using XAML in IronPython

2010-07-09 Thread Dino Viehland
The next release of Ipy Tools (and IronPython 2.7) will greatly simplify this. You'll be able to call clr.LoadComponent and point at your XAML file and your Window subclass. It'll then automatically add all of the x:Name (and Name'd) elements onto your Window subclass so you can just do

Re: [IronPython] using XAML in IronPython

2010-07-09 Thread Dino Viehland
release date for that :D On Fri, Jul 9, 2010 at 3:28 PM, Dino Viehland di...@microsoft.commailto:di...@microsoft.com wrote: The next release of Ipy Tools (and IronPython 2.7) will greatly simplify this. You'll be able to call clr.LoadComponent and point at your XAML file and your Window subclass

Re: [IronPython] VisualStudio tools

2010-07-10 Thread Dino Viehland
If you're using tabs instead of spaces there's still some issues w/ auto-indent not respecting the tabs vs spaces settings. I would suggest either disabling smart indent or changing to insert spaces in Tools-Options-Text Editor-IronPython- Tabs. -Original Message- From:

Re: [IronPython] script c# application

2010-07-12 Thread Dino Viehland
Aaron wrote: Hello! I have a c# application, and I need to make it scriptable for testing purposes. So, what I would like to do is: 1) run my program 2) pop up a window where I could interactively execute IronPython commands, to manipulate the c# classes in my application 3)be able to

<    9   10   11   12   13   14   15   16   17   >