Re: [IronPython] IDE status info
Debugging IP code from VS2005 (not SDK)? You can debug it if you call your IP code from a .NET application... (or can you debug it from VS also writting an IP stand alone app?). But, always, when i tried debugging from VS, it was a little..."confused"... Errors return long and messy code Maybe i'm doing things wrong (and if so, please tell how to do it right ;) ). But, ihmo VS is far from being IP "friendly"... p.s. - Concurr that WingIDE is great! Hope they have at least IP console and code compleation integration soon... -Original Message- From: Michael Foord [EMAIL PROTECTED] To: Discussion of IronPython users@lists.ironpython.com Date: Wed, 30 Aug 2006 23:38:30 +0100 Subject: Re: [IronPython] IDE status info I find Wing IDE to be the best of all the IDEs I have tried, and usually just use print statements for debugging. Certainly in the full Visual Studio 2005 (without the SDK containing IronPython installed) you can debug IronPython programs and set breakpoints. Fuzzyman http://www.voidspace.org.uk/python/index.shtml */Rodolfo Conde [EMAIL PROTECTED]/* wrote:  Hi, i just wanna say that i use SharpDevelop in my dailydevelopment, As it doesnt have IP support, i open an emacs windowsto edit IP codeit would be great to have IP support insideSharpDevelop, as in VS... Cheers... Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. http://us.rd.yahoo.com/mail_us/taglines/postman7/* http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com http://us.rd.yahoo.com/mail_us/taglines/postman7/* http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com http://us.rd.yahoo.com/mail_us/taglines/postman7/* http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] Newbie: using IronPython as a VBA replacement for Outlook scripting?
Ramon, I have been working a bit with IronPython to experiment with rapid development on the .net framework. I have no idea about Outlook customization. If I can assume that you are building some sort of plugin via an exposed interface and can build your own dll, then you can include IronPython in your project. I recommend you seek out the embedding tutorials that come with the IronPython download. Let me know how it goes. Joshua On Aug 25, 2006, at 6:59 PM, Ramon M. Felciano @ Yahoo wrote: Hi -- I'm a Python developer that needs to do some light Outlook 2003 customization and am dreading VBA coding. However, I'm not ready to make a full jump to VisualStudio development environment, tools, etc. Is it possible to use IronPython as an alternative to VBA for this type of scripting (i.e. create a new Outlook toolbar with buttons that call IronPython code to do their stuff)? Sorry if this is a bozo question. I'm not sure I fully understand the relationship btw VBA and other MS languages, so this may be an apples-and-oranges task. But any pointers to explanations or examples would be appreciated. Thanks in advance for your time. Ramon ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] exe version and icon?
What are you using to generate the .exe? What are you compiling your stuff with? On Aug 27, 2006, at 2:59 PM, [EMAIL PROTECTED] wrote: Hello, I'm new to both IronPython and .NET, and I've been trying to generate an exe that has a version number as well as an icon, but I can't. I've spent the last 2 hours googling to no avail. I compile my stuff using a little script I found, which uses IronPython.Hosting.PythonCompiler. ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] Final release packaging
Where can I go to see the golden roots of this conversation? On Aug 30, 2006, at 11:30 PM, Keith J. Farmer wrote: What flame war? As for integration with VS, MSI would be the only packaging I would expect (read: that I know of) for that. For language development, the priorities which are unavoidable start with quality of the language itself. Without it, there is no need to package anything. I don’t know anybody who would disagree with that sentiment. - Keith J. Farmer [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:users- [EMAIL PROTECTED] On Behalf Of S H Yoon Sent: Wednesday, 30 August 2006 21:44 To: Discussion of IronPython Subject: Re: [IronPython] Final release packaging I hate contributing to a flame war. So, let me try to put some water on it. I think the development team is extremely busy dealing with all the bugs prior to the release. I would hate to be caught up with a nasty bug some day and try find a workaround. ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] Final release packaging
http://lists.ironpython.com/pipermail/users-ironpython.com/2006-August/t hread.html - Keith J. Farmer // [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua Kifer Sent: Thursday, 31 August 2006 00:17 To: Discussion of IronPython Subject: Re: [IronPython] Final release packaging Where can I go to see the golden roots of this conversation? On Aug 30, 2006, at 11:30 PM, Keith J. Farmer wrote: What flame war? As for integration with VS, MSI would be the only packaging I would expect (read: that I know of) for that. For language development, the priorities which are unavoidable start with quality of the language itself. Without it, there is no need to package anything. I don't know anybody who would disagree with that sentiment. - Keith J. Farmer [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:users- [EMAIL PROTECTED] On Behalf Of S H Yoon Sent: Wednesday, 30 August 2006 21:44 To: Discussion of IronPython Subject: Re: [IronPython] Final release packaging I hate contributing to a flame war. So, let me try to put some water on it. I think the development team is extremely busy dealing with all the bugs prior to the release. I would hate to be caught up with a nasty bug some day and try find a workaround. ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] Final release packaging
By “quality of the language” I mean, of course, the interpreter and libraries in this case. With .NET, IMHO, we’re already starting pretty high. - Keith J. Farmer [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Keith J. Farmer Sent: Wednesday, 30 August 2006 23:30 To: Discussion of IronPython Subject: Re: [IronPython] Final release packaging What flame war? As for integration with VS, MSI would be the only packaging I would expect (read: that I know of) for that. For language development, the priorities which are unavoidable start with quality of the language itself. Without it, there is no need to package anything. I don’t know anybody who would disagree with that sentiment. - Keith J. Farmer [EMAIL PROTECTED] From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of S H Yoon Sent: Wednesday, 30 August 2006 21:44 To: Discussion of IronPython Subject: Re: [IronPython] Final release packaging I hate contributing to a flame war. So, let me try to put some water on it. I think the development team is extremely busy dealing with all the bugs prior to the release. I would hate to be caught up with a nasty bug some day and try find a workaround. ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] IDE status info
fabio.pliger wrote: Debugging IP code from VS2005 (not SDK)? You can debug it if you call your IP code from a .NET application... (or can you debug it from VS also writting an IP stand alone app?). But, always, when i tried debugging from VS, it was a little...confused... Errors return long and messy code Maybe i'm doing things wrong (and if so, please tell how to do it right ;) ). But, ihmo VS is far from being IP friendly... Open Visual Studio and load the IronPython file you want to debug. Start your IronPython process and attach the debugger to that process. You should then be able to set breakpoints as usual, and control the debugger in the normal way (step through, examine the callstack etc). You will get generated code steps in the call stack, but you will also have the line numbers for your source file - and we have found this useful. I haven't tried it with the Visual Studio Express yet (the free version). Fuzzyman http://www.resolversystems.com http://www.voidspace.org.uk/python/index.shtml p.s. - Concurr that WingIDE is great! Hope they have at least IP console and code compleation integration soon... -Original Message- From: Michael Foord [EMAIL PROTECTED] To: Discussion of IronPython users@lists.ironpython.com Date: Wed, 30 Aug 2006 23:38:30 +0100 Subject: Re: [IronPython] IDE status info I find Wing IDE to be the best of all the IDEs I have tried, and usually just use print statements for debugging. Certainly in the full Visual Studio 2005 (without the SDK containing IronPython installed) you can debug IronPython programs and set breakpoints. Fuzzyman http://www.voidspace.org.uk/python/index.shtml */Rodolfo Conde [EMAIL PROTECTED]/* wrote:  Hi, i just wanna say that i use SharpDevelop in my daily development, As it doesnt have IP support, i open an emacs windows to edit IP codeit would be great to have IP support inside SharpDevelop, as in VS... Cheers... Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. http://us.rd.yahoo.com/mail_us/taglines/postman7/* http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com http://us.rd.yahoo.com/mail_us/taglines/postman7/* http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com http://us.rd.yahoo.com/mail_us/taglines/postman7/* http://us.rd.yahoo.com/evt=39666/*http://messenger.yahoo.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] console startup time: 7s
Typically starting up a 2nd time will be faster because the OS still has a lot of the pages in memory. Ultimately this means we'll not need to go to disk for them.That can include thinks like the unmanaged portions of the CLR, the ngen'd images that IronPython depends upon, and IronPython.dll its self (although that will have to be JITed as it starts, and that won't be re-used). If you already have other managed apps running on your machine then the difference here will be less. 3 seconds is a little long but I suspect it's not longer than RC1. We definitely know we need to do some work in this area but at this point it'll have to wait for post-1.0. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of psi Sent: Sunday, August 27, 2006 6:58 AM To: users@lists.ironpython.com Subject: Re: [IronPython] console startup time: 7s this is on windows, about 3 secs, always the same ( this is after having stripped out some new stuff i was doing since rc2 was installed ), however i'm not now really sure it slowed down from rc1 to rc2, the trouble is, its only my recollection that the startup on rc1 was faster. Q: just interested, warm/cold start?, i can't see anything change after first use of ipy, is there a part of the framework that has expanded resource use or been cached, or doesn't it apply to windows? ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] IronPython interop problem
Nope, the types we generate aren't your typical every day types. For example in the code you created we don't generate any .NET types - instead the class is represented by an instance of OldClass (IronPython.Runtime.Types.OldClass) and when you create an instance of this we create an instance of a OldInstance (IronPython.Runtime.Types.OldInstance). The OldInstance has a reference to its class (and that can change if you change the __class__ property on the instance) and the OldClass has a reference to all of its bases (in this case, there aren't any). The function does of course get created as a real .NET method - but that method is either generated as a DynamicMethod (which the GC can collect and doesn't live on a type) or it gets generated as a method in a module type (if this is getting compiled as part of a module) with a name like Bar$f0. If you create new style classes, eg: class foo(object): def Bar(self, args): print args we will generate a real type, but that real type will be IronPython.NewTypes.System.Object_0 (or some other _number depending on how many new types we've generated). That type also has a reference to a class object (__class__) but this time it's a UserType (IronPython.Runtime.Types.UserType). And that type will also be shared for all types which inherit from object - so if you then do: class baz(object): def Foo(self, args): print args then: import clr baz().GetType() == foo().GetType() So to get anything like the Foo or Bar method you'll actually need to go to the __class__ field, and ask the class for the method (and here the method is stored in the classes dictionary). So unfortunately reflection IronPython classes don't mix. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc-André Belzile Sent: Thursday, August 31, 2006 9:00 AM To: Discussion of IronPython Subject: Re: [IronPython] IronPython interop problem Could the .NET reflection mechanism be an alternative to hosting PythonEngine ? E.g. def class foo: def Bar(self,args): print args; // C# host Assembly asm = Assembly.Load(assemblyName); Type t = asm.GetType(foo, true, true); MethodInfo m = t.GetMethod(Bar); m.Invoke( null, args ); thanks -mab -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Dino Viehland Sent: August 29, 2006 4:10 PM To: Dino Viehland; Discussion of IronPython Subject: Re: [IronPython] IronPython interop problem Sorry, pressed send too soon... The good news is that very soon we'll have full documentation on the hosting APIs which might make it a little more obvious about where to look for these things :). -Original Message- From: Dino Viehland Sent: Tuesday, August 29, 2006 1:09 PM To: Discussion of IronPython Subject: RE: [IronPython] IronPython interop problem We hadn't really considered this and haven't had any requests to do this yet. The problem here is of course that once a type is COM visible you're never allowed to add anything to that type as it'll break the COM clients. What I would imagine we might do in the future would be to define an interface (e.g. IPythonEngine) and then expose that to COM rather than exposing the PythonEngine class to COM clients. That would allow COM clients to interact w/ the engine and allow us to version the interface by adding an IPythonEngine2/IPythonEngineEx interface. One of the best ways we have for interacting w/ delegates is with the CreateMethod and CreateLambda APIs. These allow you to pass in a body of code and get a .NET delegate back out. That .NET delegate for your purposes could be converted into an unmanaged function pointer and called directly from your native code (no COM needed! :) ). You can combine these w/ ExecuteFile which will allow you to use the delegates to call into a module which contains some pre-baked script code if you don't want to pass all the code into this API. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marc-André Belzile Sent: Monday, August 28, 2006 1:25 PM To: Discussion of IronPython Subject: Re: [IronPython] IronPython interop problem Dino, Do you have plans in the future to make IP assemblies COM visible? This would allow us to support .NET assemblies in a uniform manner without having to do a special case for IP. As for the approach you are proposing, it's not obvious how I can use PythonEngine for my scenario. Our plug-ins need to expose a set of functions known by the main app. These functions are called by the app with SDK objects arguments (i.e ActiveX), these objects are used by the callback to perform some actions. I don't see any methods in PythonEngine that would allow me to do such things. Eg PtyhonEngine engine = new PtyhonEngine engine.ExecuteFile(MyModule.ps) ArrayList args; args.Add( obj1 ); args.Add( obj2 ); Boolean retVal; engine.Execute( Foo, args, retVal
Re: [IronPython] custom ConfigurationSection in IronPython
I have another related question. The Item property of System.Configuration.ConfigurationElement (base class for ConfigurationSection) doesn't seem to be accessible from IronPython. Is this because its overloaded by parameter type? Is there a way to access it from IronPython? Thanks - Jason On Aug 30, 2006, at 2:33 PM, Jason Ferrara wrote: I want to write a custon ConfigurationSection in IronPython. So I try... class MySettings(System.Configuration.ConfigurationSection): # custom configuration stuff here c = System.Configuration.ConfigurationManager.OpenExeConfiguration( \ System.Configuration.ConfigurationUserLevel.PerUserRoaming) c.Sections.Add(mysettings,MySettings()) and get... File , line 0, in Add##32 File System.Configuration, line unknown, in Add File System.Configuration, line unknown, in AddConfigurationSection File System.Configuration, line unknown, in GetConstructorWithReflectionPermis sion SystemError: Unable to load type 'IronPython.NewTypes.System.Configuration.ConfigurationSection_2, snippets1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not public. This happened even when the python code is compiled into an assembly. Is there a way to make this work? I saw a post that mentioned an experimental static type compiler. Would I need to use that, and if so how? Thanks. - Jason ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] custom ConfigurationSection in IronPython
The Item property is the default indexer, so you should be able to access it using foo[index]. As for your other question - Martin looked into this but I didn't see a response from him... The problem seems to be that we don't define a parameterless constructor that the configuration section can call. The reason for that is that our objects actually need to receive a DynamicType object which represents the class - without this we wouldn't be able to know your type was MySettings. Unfortunately I think this might make it impossible for you to define this class in IronPython. You could define a stub in C# that calls into your Python using the engine APIs but that might be more work than it's worth. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Ferrara Sent: Thursday, August 31, 2006 12:56 PM To: Discussion of IronPython Subject: Re: [IronPython] custom ConfigurationSection in IronPython I have another related question. The Item property of System.Configuration.ConfigurationElement (base class for ConfigurationSection) doesn't seem to be accessible from IronPython. Is this because its overloaded by parameter type? Is there a way to access it from IronPython? Thanks - Jason On Aug 30, 2006, at 2:33 PM, Jason Ferrara wrote: I want to write a custon ConfigurationSection in IronPython. So I try... class MySettings(System.Configuration.ConfigurationSection): # custom configuration stuff here c = System.Configuration.ConfigurationManager.OpenExeConfiguration( \ System.Configuration.ConfigurationUserLevel.PerUserRoaming) c.Sections.Add(mysettings,MySettings()) and get... File , line 0, in Add##32 File System.Configuration, line unknown, in Add File System.Configuration, line unknown, in AddConfigurationSection File System.Configuration, line unknown, in GetConstructorWithReflectionPermis sion SystemError: Unable to load type 'IronPython.NewTypes.System.Configuration.ConfigurationSection_2, snippets1, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' because it is not public. This happened even when the python code is compiled into an assembly. Is there a way to make this work? I saw a post that mentioned an experimental static type compiler. Would I need to use that, and if so how? Thanks. - Jason ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] custom ConfigurationSection in IronPython
On Aug 31, 2006, at 4:00 PM, Dino Viehland wrote: The Item property is the default indexer, so you should be able to access it using foo[index]. Thats what I thought, but it doesn't work. And if I do dir() on ConfigurationElement I don't see a __getitem__ or __setitem__, though with other .NET classes that have the Item property I do. As for your other question - Martin looked into this but I didn't see a response from him... The problem seems to be that we don't define a parameterless constructor that the configuration section can call. The reason for that is that our objects actually need to receive a DynamicType object which represents the class - without this we wouldn't be able to know your type was MySettings. Unfortunately I think this might make it impossible for you to define this class in IronPython. You could define a stub in C# that calls into your Python using the engine APIs but that might be more work than it's worth. -Original Message- From: [EMAIL PROTECTED] [mailto:users- [EMAIL PROTECTED] On Behalf Of Jason Ferrara Sent: Thursday, August 31, 2006 12:56 PM To: Discussion of IronPython Subject: Re: [IronPython] custom ConfigurationSection in IronPython I have another related question. The Item property of System.Configuration.ConfigurationElement (base class for ConfigurationSection) doesn't seem to be accessible from IronPython. Is this because its overloaded by parameter type? Is there a way to access it from IronPython? Thanks - Jason ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] custom ConfigurationSection in IronPython
Ahh, you're right - currently it looks like we won't ever get non-public indexers (this one is family or assembly, which is protected internal in C# speak). This is a bug, I've opened CodePlex bug #2766 for this (http://www.codeplex.com/WorkItem/List.aspx?ProjectName=IronPython). A simple workaround would be to write a class in C# that derives from this and exposes these publicly, and then use that class from IronPython. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Ferrara Sent: Thursday, August 31, 2006 1:14 PM To: Discussion of IronPython Subject: Re: [IronPython] custom ConfigurationSection in IronPython On Aug 31, 2006, at 4:00 PM, Dino Viehland wrote: The Item property is the default indexer, so you should be able to access it using foo[index]. Thats what I thought, but it doesn't work. And if I do dir() on ConfigurationElement I don't see a __getitem__ or __setitem__, though with other .NET classes that have the Item property I do. As for your other question - Martin looked into this but I didn't see a response from him... The problem seems to be that we don't define a parameterless constructor that the configuration section can call. The reason for that is that our objects actually need to receive a DynamicType object which represents the class - without this we wouldn't be able to know your type was MySettings. Unfortunately I think this might make it impossible for you to define this class in IronPython. You could define a stub in C# that calls into your Python using the engine APIs but that might be more work than it's worth. -Original Message- From: [EMAIL PROTECTED] [mailto:users- [EMAIL PROTECTED] On Behalf Of Jason Ferrara Sent: Thursday, August 31, 2006 12:56 PM To: Discussion of IronPython Subject: Re: [IronPython] custom ConfigurationSection in IronPython I have another related question. The Item property of System.Configuration.ConfigurationElement (base class for ConfigurationSection) doesn't seem to be accessible from IronPython. Is this because its overloaded by parameter type? Is there a way to access it from IronPython? Thanks - Jason ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com ___ users mailing list users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com