Re: [IronPython] Snippets in Trackback
This works for me once I fix the mismatched XML tag (and the mail-induced line breaks). And when I don't, I get pretty explicit error messages as the text of the exception: SystemError: The 'DockPanel' start tag on line 4 does not match the end tag of 'DockPanelTest'. Line 5, position 3. -or- SyntaxError: EOL while scanning single-quoted string What was the exception that you were getting? On Sat, Mar 29, 2008 at 11:42 PM, Davy Mitchell [EMAIL PROTECTED] wrote: This has the desired effect: import clr clr.AddReference(System.Xml) clr.AddReference(PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) clr.AddReference(PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) from System.IO import StringReader from System.Xml import XmlReader from System.Windows.Markup import XamlReader, XamlWriter from System.Windows import Window, Application xaml = Window xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation; Title=Test Width=600 Height=400 DockPanel /DockPanelTest /Window xr = XmlReader.Create(StringReader(xaml)) win = XamlReader.Load(xr) Application().Run(win) On Sat, Mar 29, 2008 at 8:34 PM, Curt Hagenlocher [EMAIL PROTECTED] wrote: The snippets represent executable code that's generated dynamically by the DLR from your Python source. Do you have a small piece of sample code that reproduces the failure? On Sat, Mar 29, 2008 at 1:28 PM, Davy Mitchell [EMAIL PROTECTED] wrote: Hi All, IPY2.0 B1 Vista SP1 I keep seeing reference to 'Snippets' in IP Tracebacks on different bits of code. Can't find anything on codeplex so assume it *probably* something wrong this end. I don't have a 'Snippets' module AFAIK. Typical example C:\Code\OSProjectsipy wpf5.py Traceback (most recent call last): File Snippets, line unknown, in Initialize File PresentationFramework, line unknown, in Load Is it just me or :-) -- Davy Mitchell Blog - http://www.latedecember.co.uk/sites/personal/davy/ Twitter - http://twitter.com/daftspaniel Skype - daftspaniel needgod.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 -- Davy Mitchell Blog - http://www.latedecember.co.uk/sites/personal/davy/ Twitter - http://twitter.com/daftspaniel Skype - daftspaniel needgod.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] Snippets in Trackback
Hi Curt, Yeah the errors are pretty trivial to fix - usually XAML typos and the .Net detail is fine to fix it. I was just a little confused about Snippets in the traceback but no reference to my 'test.py' file. A better example is the single line 'self.test' saved to to test2.py python test2.py C:\Code\OSProjectspython test2.py Traceback (most recent call last): File test2.py, line 1, in module self.test NameError: name 'self' is not defined ipy test2.py C:\Code\OSProjectsipy test2.py Traceback (most recent call last): File Snippets, line unknown, in Initialize NameError: name 'self' is not defined Cpython does a bit better there in callstack detail :-) Davy On Sun, Mar 30, 2008 at 12:41 PM, Curt Hagenlocher [EMAIL PROTECTED] wrote: This works for me once I fix the mismatched XML tag (and the mail-induced line breaks). And when I don't, I get pretty explicit error messages as the text of the exception: SystemError: The 'DockPanel' start tag on line 4 does not match the end tag of 'DockPanelTest'. Line 5, position 3. -or- SyntaxError: EOL while scanning single-quoted string What was the exception that you were getting? On Sat, Mar 29, 2008 at 11:42 PM, Davy Mitchell [EMAIL PROTECTED] wrote: This has the desired effect: import clr clr.AddReference(System.Xml) clr.AddReference(PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) clr.AddReference(PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) from System.IO import StringReader from System.Xml import XmlReader from System.Windows.Markup import XamlReader, XamlWriter from System.Windows import Window, Application xaml = Window xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation; Title=Test Width=600 Height=400 DockPanel /DockPanelTest /Window xr = XmlReader.Create(StringReader(xaml)) win = XamlReader.Load(xr) Application().Run(win) On Sat, Mar 29, 2008 at 8:34 PM, Curt Hagenlocher [EMAIL PROTECTED] wrote: The snippets represent executable code that's generated dynamically by the DLR from your Python source. Do you have a small piece of sample code that reproduces the failure? On Sat, Mar 29, 2008 at 1:28 PM, Davy Mitchell [EMAIL PROTECTED] wrote: Hi All, IPY2.0 B1 Vista SP1 I keep seeing reference to 'Snippets' in IP Tracebacks on different bits of code. Can't find anything on codeplex so assume it *probably* something wrong this end. I don't have a 'Snippets' module AFAIK. Typical example C:\Code\OSProjectsipy wpf5.py Traceback (most recent call last): File Snippets, line unknown, in Initialize File PresentationFramework, line unknown, in Load Is it just me or :-) -- Davy Mitchell Blog - http://www.latedecember.co.uk/sites/personal/davy/ Twitter - http://twitter.com/daftspaniel Skype - daftspaniel needgod.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 -- Davy Mitchell Blog - http://www.latedecember.co.uk/sites/personal/davy/ Twitter - http://twitter.com/daftspaniel Skype - daftspaniel needgod.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 -- Davy Mitchell Blog - http://www.latedecember.co.uk/sites/personal/davy/ Twitter - http://twitter.com/daftspaniel Skype - daftspaniel needgod.com ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] Snippets in Trackback
On Sun, Mar 30, 2008 at 5:20 AM, Davy Mitchell [EMAIL PROTECTED] wrote: A better example is the single line 'self.test' saved to to test2.py ipy test2.py C:\Code\OSProjectsipy test2.py Traceback (most recent call last): File Snippets, line unknown, in Initialize NameError: name 'self' is not defined I imagine this is just a temporary glitch in 2.0b1, as IronPython 1.1.1 shows the right line: PS F:\IPCE-r7\ipy .\ipy.exe test2.py Traceback (most recent call last): File F:\IPCE-r7\ipy\test2.py, line 1, in Initialize NameError: name 'self' not defined -- Curt Hagenlocher [EMAIL PROTECTED] ___ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
Re: [IronPython] Snippets in Trackback
The snippets represent executable code that's generated dynamically by the DLR from your Python source. Do you have a small piece of sample code that reproduces the failure? On Sat, Mar 29, 2008 at 1:28 PM, Davy Mitchell [EMAIL PROTECTED] wrote: Hi All, IPY2.0 B1 Vista SP1 I keep seeing reference to 'Snippets' in IP Tracebacks on different bits of code. Can't find anything on codeplex so assume it *probably* something wrong this end. I don't have a 'Snippets' module AFAIK. Typical example C:\Code\OSProjectsipy wpf5.py Traceback (most recent call last): File Snippets, line unknown, in Initialize File PresentationFramework, line unknown, in Load Is it just me or :-) -- Davy Mitchell Blog - http://www.latedecember.co.uk/sites/personal/davy/ Twitter - http://twitter.com/daftspaniel Skype - daftspaniel needgod.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