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 r"data source=...". I'm guessing the C# code might have been doing @"data source=..." because of the "\n" in the connection string. From: users-boun...@lists.iro

Re: [IronPython] IronPython Tools for Visual Studio

2010-04-27 Thread Dino Viehland
m] 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 mailto:di...@microsoft.com>

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 contex

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.1>ipy.exe Tools\Scripts\pyc.py /target:dll > Lib\decimal.py > Input Files: > Lib\decimal.py > Output: > decimal > Target: > Dl

Re: [IronPython] Load an Ironpython dump

2010-04-30 Thread Dino Viehland
You might changing the except to “except Exception:” to see if an exception other than SocketException is being thrown. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of jon vs. python Sent: Friday, April 30, 2010 2:57 AM To: Discussion of IronPyth

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

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 > > TypeErro

Re: [IronPython] Calling explicitly-implemented interface methods

2010-04-30 Thread Dino Viehland
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 RegistryKey > isn't available on Silverlight. Can anyone suggest a good alternative of > an explicitly implemented interface method on a

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

2010-04-30 Thread Dino Viehland
Jeff wrote: > On Fri, Apr 30, 2010 at 4:19 PM, Dino Viehland wrote: > > That's definitely a bug.  We usually check for the interfaces first and > > we have a code path that's assuming we have a user-defined object when > > we're not an enumerable/enumera

Re: [IronPython] Calling explicitly-implemented interface methods

2010-04-30 Thread Dino Viehland
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,

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, > >>>> >

[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 Studio. IronPython Tools for Visual Studio (IPyTools) is a set of extensions available for Visual Studio 2010 which supports development of IronP

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 (WinF

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

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 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 > > http://zooba.byteclub.net/files/2010/05/ipytool-initname.png) th

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 > automa

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 fu

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

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: users-boun...

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 Iro

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 (http://mpfproj10.codeplex.com/WorkItem/Vie

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 --> wo

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 >

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 [mailto:users-boun...@lists.ironpyth

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

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 i

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 we

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 IEvent

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 ca

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 th

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] .Net attributes/decorators

2010-05-18 Thread Dino Viehland
The answer is kind of both. When it comes to the core language grammar we are (and I believe will always be) an equivalent set. That's rather important in that any code which is .NET specific can still be parsed by other Python implementations and therefore you can do various if I'm running on

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

2010-05-18 Thread Dino Viehland
ne 50, in # print EventManager.GetAllEventTypes() # File "bvms.py", line 15, in __getattribute__ # return getattr(proxyType, attr).__get__(obj, proxyType) # TypeError: expected IEventManager, got MarshalByRefObject On Mon, May 17, 2010 at 10:03 PM, Dino Viehland mailto

Re: [IronPython] Cannot import module from .dll directly

2010-05-18 Thread Dino Viehland
Jeff wrote: > When CPython is searching for modules to import, it will check all the > folders in sys.path for .py, .pyc/.pyo, and .pyd/.dll files that match > the requested import. For IronPython, .py is obviously supported, > .pyc/.pyo are obviously(?) not, and neither are .pyd/.dll. Is there > a

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 AM . 05/20/2010 10:34 AM .. 05/20/2010 10:30 AM module 05/20/2010 10:30 AM64

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 mai

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

2010-05-20 Thread Dino Viehland
on Subject: Re: [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 p

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-scan

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: users-boun.

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() Which

Re: [IronPython] ctypes on Mono

2010-05-30 Thread Dino Viehland
On OS/X I believe you need to use Mono's DllMap feature (http://www.mono-project.com/Config_DllMap) to map from the Linux library name (libdl.so) to the Mac OS/X library which exports dlopen. I actually have no clue what exports it and I don't see one listed over here: http://gemma.apple.com/m

Re: [IronPython] Implementing Greenlets API in IronPython

2010-05-31 Thread Dino Viehland
You'll want to first look at GeneratorRewriter.cs - it's responsible for taking a DLR AST and re-writing it so that it can re-start at an arbitrary location and so that it's stackless. There's one of these for debugging and one that's used for IronPython's generators, you can probably adapt eit

Re: [IronPython] ctypes on Mono

2010-06-01 Thread Dino Viehland
nternalInvoke (System.Reflection.MonoMethod*,object,object[],System.Exception&) at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0] in :0 On Sun,

Re: [IronPython] Uninformative Type Error

2010-06-01 Thread Dino Viehland
This is caused by having the same assembly loaded into 2 different loader contexts at once (loader contexts are a part of the CLR loading infrastructure). Adding references to assemblies by file can be tricky. One possible solution might be to install both assemblies into the GAC and then do

Re: [IronPython] possible bug with __delattr__ in Ipy 2.6

2010-06-01 Thread Dino Viehland
This is definitely a bug - I've filed this as http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=27247 Thanks for the report! From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.ironpython.com] On Behalf Of Idan Zaltzberg Sent: Sunday, May 30, 2010 6:50 AM To: Discuss

Re: [IronPython] Performance str.replace in Silverlight

2010-06-01 Thread Dino Viehland
Michael wrote: > I just tracked down a really nasty performance bug in our Silverlight > application. It turned out that doing a simple string replace in a 400 > character string was taking 700ms. As we actually do two replaces and > the text is usually substantially longer this was a real problem.

Re: [IronPython] clr.CompileModules fails on some python standard lib modules

2010-06-02 Thread Dino Viehland
Lukáš wrote: > This is a known issue > (http://ironpython.codeplex.com/workitem/26593?ProjectName=ironpython) > and as Dino mentioned recently it is already fixed in the main. > > Which brings a question - when is IronPython 2.6.2 scheduled for release? We haven't quite scheduled it yet - we've

Re: [IronPython] WPF Controls with Ipy

2010-06-04 Thread Dino Viehland
Ted wrote: > Trying to use third party controls with VS Tools for Ipy with WPF is not > working as expected. I can add a third party control if the language is c#, > but when I try and do the same thing using IronPython with WPF, the third > party controls do not get added to the designer as I exp

Re: [IronPython] IronPy Tools - updates?

2010-06-04 Thread Dino Viehland
Steve wrote: > Just wondering what the outlook is for an update to IronPy Tools for > VS? Normally I don't bug developers about this, but my motivation for > asking this time is that I've actually stopped using it. > > I've been working on a Word document that's in my project root folder > (-1 for

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Dino Viehland
Jeff wrote: > On Mon, Jun 7, 2010 at 7:14 AM, Christos Pavlides > 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 the > rule

Re: [IronPython] Multi threaded engine

2010-06-07 Thread Dino Viehland
Jeff wrote: > On Mon, Jun 7, 2010 at 9:53 AM, Dino Viehland > 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 scr

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 (

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 Sub

Re: [IronPython] Checking for Python exception in C#

2010-06-08 Thread Dino Viehland
You can just use a normal try/catch. IronPython has a mapping between .NET exceptions and Python exceptions. We actually have documentation on this over here http://ironpython.codeplex.com/wikipage?title=Exception%20Model. But apparently it's out of date for StopIteration. For that we now de

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 t

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 thro

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

2010-06-15 Thread Dino Viehland
thon Exception: WindowsError A first chance exception of type 'IronPython.Runtime.Exceptions.ImportException' occurred in IronPython.dll Additional information: No module named sitecustomize A first chance exception of type 'IronPython.Runtime.Exceptions.ImportException'

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 don'

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
Alternately you could implement IAttributesCollection and execute the Python code against a scope which is backed by the IAC. This would let you lazily provide the values to the script on-demand. If you have a fixed set of members I like Jeff's suggestion more but this is good if the members are

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

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 b

Re: [IronPython] Modules in hosted enviroment

2010-06-23 Thread Dino Viehland
were static method. After > re-evaluating what I want I can see why it might not be possible. So if it > ends up that I can't do what I described I will use on of the many other > methods indicated. > > Thanks for the help > > ---

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: users-boun...@lists

Re: [IronPython] Implementing Greenlets API in IronPython

2010-06-28 Thread Dino Viehland
ack so that it can resume later from that point. 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 mailto:di...@microsoft.com>> wrote: You'll want to first

Re: [IronPython] IronPython 2.6 CodePlex Source Update

2010-06-29 Thread Dino Viehland
\IronPython.sln" > >> > >> Just out of curiosity, how many people out there care about building > >> IronPython against .NET 2.0/.NET 3.5?  I'd hope not too many considering > the > >> improvements you'll get by running .NET 4.0 based IronPython ass

[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 Commu

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

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

2010-07-02 Thread Dino Viehland
ifferent error. > > >>> s=MapWinGIS.ShapefileClass() > >>> tst = s.Open(a,None) > Traceback (most recent call last): > File "", line 1, in > ValueError: Could not convert argument 0 for call to Open. > > I guess its time to add IronPython i

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: Discu

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 x

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 pat

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 pro

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 t

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 _

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__

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(Fo

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

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 Behalf

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 as

Re: [IronPython] Compiling so that IronPython libraries are recognized?

2010-07-09 Thread Dino Viehland
I can think of 1 of 2 things causing this: 1. IRONPYTHONPATH is set somewhere and causing us to search in directories we shouldn't be a. You can just clear this env var if that's the problem 2. There's something in site-packages which is causing this to be messed up. a.

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

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'

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#

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 "self.

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 mailto: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: users-bou

Re: [IronPython] using XAML in IronPython

2010-07-10 Thread Dino Viehland
on Tools release? I'm looking forward to both, Tristan On Fri, Jul 9, 2010 at 6:44 PM, Dino Viehland mailto:di...@microsoft.com>> wrote: It should be sometime this month. From: users-boun...@lists.ironpython.com<mailto:users-boun...@lists.ironpython.com> [mailto:users

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

Re: [IronPython] compiling an executable with the standard library

2010-07-12 Thread Dino Viehland
socket is actually a built-in in IronPython. So you really only need threading. But threading depends upon functools, and collections, and traceback. I'm not sure how far the transitive closure goes so let's just assume you'll need to compile the entire standard library. You can actually co

Re: [IronPython] compiling an executable with the standard library

2010-07-12 Thread Dino Viehland
Microsoft.Scripting.dll Microsoft.Scripting.ExtensionAttribute.dll p2pChat.dll p2pChat.exe p2pChat.py p2pChat.xaml stdlib.dll Any ideas cheers Andrew On Mon, Jul 12, 2010 at 11:13 AM, Dino Viehland mailto:di...@microsoft.com>> wr

Re: [IronPython] Version issue in IronPython.codeplex.com

2010-07-13 Thread Dino Viehland
I think for simplicity of building the MSI it doesn't mention the version. The download from the site that says it's 2.6.1 for .NET 4.0 is indeed 2.6.1 for .NET 4. > -Original Message- > From: users-boun...@lists.ironpython.com [mailto:users- > boun...@lists.ironpython.com] On Behalf

Re: [IronPython] Will clrtype.py eventually be completely combined with the clr module?

2010-07-15 Thread Dino Viehland
The idea is to pull clrtype.py in at some point after we feel like it's been pretty well vetted and has an API surface people like. I'm not sure quite when it'll happen (probably not 2.7 at this point) but at some point. From: users-boun...@lists.ironpython.com [mailto:users-boun...@lists.iron

Re: [IronPython] Embedded IronPython engine, access to heap objects

2010-07-16 Thread Dino Viehland
;Discussion of IronPython' Subject: RE: Uninformative Type Error Thank you very much Dino, I added the folders that contain my assemblies to sys.path and then used clr.AddReference to add a reference to them. The type error no longer exists. Matt Bakalar From: Dino Viehland [mailto:di..

<    7   8   9   10   11   12   13   14   15   16   >