Thank you for the answer! I conclude, that I have to read up carefully on python modules and imports.
Yes! IronPython studio generates really bad code. The studio is not at all mature. Serious refactoring have to be done, before it is a good start point for Python beginners like me. This is the third major issue I encountered using IronPython Studio. First it uses __slots__. You can not add variables to the form class and keep to design the form. The __slots__ content is only and only for the the added window controls. Secondly it has confused me about import and bad namespace structuring using classes. Thirdly the editor creates compiler errors .The tabs are not handled carefully, so the editor shows wrong indents resulting in indention compiler errors. The problem became smaller after I set up all tabs to be spaces and set the tabs to 60 spaces. Then it was easy to see, where the bad tabulated indents were. An upcoming issue is the appartment model for ActiveX and COM- components. I have seen flashes of error messages notifying about wrong appartment for the webbrowser control. It came, when I try to start a worker thread beside the main window thread running Application.Run(..). The project and file handling is as usual excellent for Visual Studio's and you can very easy design windows form layouts. I copy the form designs to another python console application project deleting the __slots__, namespace classes and review the imports. The studio is a magnet for beginners used to work with Visual Studio for Basic, C# and other language. I have posted these isues to the IronPython project on Codeplex. Regards Pjerrot On 6 Apr., 02:13, Michael Foord <[EMAIL PROTECTED]> wrote: > Hello Pjerrot, > > Unfortunately the layout of code created by Visual Studio IronPython (do > you mean IronPython Studio or Visual Studio Professional?) is a > *terrible* way to write Python. > > It effectively matches the semantics of C#, but you should not replicate > it yourself - do not contain your classes inside a namespace class. > Additionally, do not use the 'from XXX import *' - but instead > explicitly import the names you want to use. > > I don't say the last point out of dogma - I think if you make that > change you will immediately see what is wrong with the code. > > All the best, > > Michael Foordhttp://www.ironpythoninaction.com/ > > > _______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
