From fishburn at gmail.com Wed Jan 2 19:55:30 2013 From: fishburn at gmail.com (Matt Fishburn) Date: Wed, 2 Jan 2013 13:55:30 -0500 Subject: [Ironpython-users] Unable to correctly resolve function in a module when using ImportModule Message-ID: Hi, I would like to call some functions in the scipy.linalg package from C#, however I think the ImportModule function from the ScriptRuntime object is not working correctly for modules with dots in the name. To setup the project, I followed the instructions at https://www.enthought.com/repo/.iron/ and then I created a C# console app, added references to IronPython, Microsoft.CSharp and Microsoft.Scripting. When I run the code below, the GetVariable method of the ScriptScope object that is supposed to be associated with scipy.linalg appears to be resolving to the scipy namespace instead. I also tried the code below with version 2.7.3 of IronPython downloaded from ironpython.codeplex.com, but the code failed with an identical result. Am I doing something wrong, or missing something obvious here? Cheers, Matt using System; using System.Collections.Generic; using IronPython.Hosting; using Microsoft.Scripting.Hosting; namespace IronPythonFromCSharp { internal class Program { private static void Main(string[] args) { var options = new Dictionary(); options["Frames"] = true; options["FullFrames"] = true; ScriptRuntime pyRuntime = Python.CreateRuntime(options); dynamic sys = pyRuntime.GetSysModule(); sys.path.append(@"c:\Program Files (x86)\IronPython 2.7"); sys.path.append(@"c:\Program Files (x86)\IronPython 2.7\DLLs"); sys.path.append(@"c:\Program Files (x86)\IronPython 2.7\Lib"); sys.path.append(@"c:\Program Files (x86)\IronPython 2.7\Lib\site-packages"); dynamic clr = pyRuntime.GetClrModule(); clr.AddReference("mtrand.dll"); dynamic linalg = pyRuntime.ImportModule("scipy.linalg"); dynamic builtin = pyRuntime.GetBuiltinModule(); dynamic numpy = pyRuntime.ImportModule("numpy"); //getting std function (which is in scipy, not scipy.linalg) call will succeed object std = linalg.GetVariable("std"); //can invoke std with a list dynamic l = builtin.list(); l.append(1); l.append(2); l.append(3); object stdDev = linalg.std(l); Console.WriteLine(stdDev); // writes out the type of stdDev //trying to get inv, which is in scipy.linalg, will throw an error object inv = linalg.GetVariable("inv"); } } } -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Wed Jan 2 20:45:57 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 2 Jan 2013 11:45:57 -0800 Subject: [Ironpython-users] Unable to correctly resolve function in a module when using ImportModule In-Reply-To: References: Message-ID: It's definitely supposed to be handling dots (the code is in Languages/IronPython/IronPython/Runtime/Importer.cs), so I'm not sure why it would be failing in this case. Can you try it without SciPy involved (just create a couple of nested packages with trivial Python files)? - Jeff On Wed, Jan 2, 2013 at 10:55 AM, Matt Fishburn wrote: > Hi, > > I would like to call some functions in the scipy.linalg package from C#, > however I think the ImportModule function from the ScriptRuntime object is > not working correctly for modules with dots in the name. > > To setup the project, I followed the instructions at > > https://www.enthought.com/repo/.iron/ > > and then I created a C# console app, added references to IronPython, > Microsoft.CSharp and Microsoft.Scripting. When I run the code below, the > GetVariable method of the ScriptScope object that is supposed to be > associated with scipy.linalg appears to be resolving to the scipy namespace > instead. I also tried the code below with version 2.7.3 of IronPython > downloaded from ironpython.codeplex.com, but the code failed with an > identical result. > > Am I doing something wrong, or missing something obvious here? > > Cheers, > Matt > > > using System; > using System.Collections.Generic; > using IronPython.Hosting; > using Microsoft.Scripting.Hosting; > > namespace IronPythonFromCSharp > { > internal class Program > { > private static void Main(string[] args) > { > var options = new Dictionary(); > options["Frames"] = true; > options["FullFrames"] = true; > > ScriptRuntime pyRuntime = Python.CreateRuntime(options); > > dynamic sys = pyRuntime.GetSysModule(); > > sys.path.append(@"c:\Program Files (x86)\IronPython 2.7"); > sys.path.append(@"c:\Program Files (x86)\IronPython 2.7\DLLs"); > sys.path.append(@"c:\Program Files (x86)\IronPython 2.7\Lib"); > sys.path.append(@"c:\Program Files (x86)\IronPython > 2.7\Lib\site-packages"); > > dynamic clr = pyRuntime.GetClrModule(); > clr.AddReference("mtrand.dll"); > > dynamic linalg = pyRuntime.ImportModule("scipy.linalg"); > dynamic builtin = pyRuntime.GetBuiltinModule(); > dynamic numpy = pyRuntime.ImportModule("numpy"); > > //getting std function (which is in scipy, not scipy.linalg) > call will succeed > object std = linalg.GetVariable("std"); > > //can invoke std with a list > dynamic l = builtin.list(); > l.append(1); > l.append(2); > l.append(3); > object stdDev = linalg.std(l); > Console.WriteLine(stdDev); // writes out the type of stdDev > > //trying to get inv, which is in scipy.linalg, will throw an > error > object inv = linalg.GetVariable("inv"); > } > } > } > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From pablodalma93 at hotmail.com Thu Jan 3 14:29:39 2013 From: pablodalma93 at hotmail.com (Pablo Dalmazzo) Date: Thu, 3 Jan 2013 10:29:39 -0300 Subject: [Ironpython-users] Functools in IronPython 2.0 In-Reply-To: References: Message-ID: Hi there, is it possible to use functools in IronPython 2.0? Im trying to import it and I get "no module named functools" but in this reference to IronPython 2.0 mentions it http://www.ironpythoninaction.com/magic-methods.html#id18 Any way to have it availabe in IP 2.0 without having to move to another version? Greetings -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Thu Jan 3 14:36:18 2013 From: slide.o.mix at gmail.com (Slide) Date: Thu, 3 Jan 2013 06:36:18 -0700 Subject: [Ironpython-users] Functools in IronPython 2.0 In-Reply-To: References: Message-ID: Did you copy the std lib over? Why are you stuck with 2.0? It is a very old version. On Thu, Jan 3, 2013 at 6:29 AM, Pablo Dalmazzo wrote: > Hi there, > > is it possible to use functools in IronPython 2.0? Im trying to import it > and I get "no module named functools" but in this reference to IronPython > 2.0 mentions it > > http://www.ironpythoninaction.com/magic-methods.html#id18 > > Any way to have it availabe in IP 2.0 without having to move to another > version? > > Greetings > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at peter-schwalm.de Thu Jan 3 15:34:55 2013 From: ps at peter-schwalm.de (Peter Schwalm) Date: Thu, 03 Jan 2013 15:34:55 +0100 Subject: [Ironpython-users] ironpython and windows services Message-ID: <50E5970F.6070602@peter-schwalm.de> Hello, I am trying to convert an Ironpython filewatcher program into a windows service. I started by translating a c# example to ipy. I tried to simply use System.ServiceProcess.ServiceBased, and received a message "AttributeError: attribute 'ServiceProcess' of 'namespace#' object is read-only" I also failed to import System.ServiceProcess. I also tried to add a Reference to System.ServiceProcess.dll, and even that did not work. Here are the code snippets ... # coding: latin-1 import System import clr #clr.AddReference("System.ServiceProcess.dll") # fails #import System.ServiceProcess # fails from System import Array class Program: @staticmethod def Main(): x = System.ServiceProcess.ServiceBase # fails print dir(x) ServicesToRun = System.Array[System.ServiceProcess.ServiceBase]( [ FolderWatch() ]) ServiceBase.Run(ServicesToRun); prg = Program() prg.Main() Does anyone have an idea, how to accomplish that or - more generally - how to make an windows service out of an ipy program? Thanks in advance Peter Schwalm From curt at hagenlocher.org Thu Jan 3 15:39:28 2013 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Thu, 3 Jan 2013 06:39:28 -0800 Subject: [Ironpython-users] ironpython and windows services In-Reply-To: <50E5970F.6070602@peter-schwalm.de> References: <50E5970F.6070602@peter-schwalm.de> Message-ID: When you add a reference to something in the GAC, don't add ".dll" to the name. That is, clr.AddReference('System.ServiceProcess') On Thu, Jan 3, 2013 at 6:34 AM, Peter Schwalm wrote: > Hello, > I am trying to convert an Ironpython filewatcher program into a windows > service. I started by translating a c# example to ipy. I tried to simply > use System.ServiceProcess.**ServiceBased, and received a message > > "AttributeError: attribute 'ServiceProcess' of 'namespace#' object is > read-only" > > I also failed to import System.ServiceProcess. > > I also tried to add a Reference to System.ServiceProcess.dll, and even > that did not work. > > Here are the code snippets ... > > # coding: latin-1 > import System > import clr > #clr.AddReference("System.**ServiceProcess.dll") # fails > #import System.ServiceProcess # fails > from System import Array > > class Program: > @staticmethod > def Main(): > x = System.ServiceProcess.**ServiceBase # fails > print dir(x) > ServicesToRun = System.Array[System.** > ServiceProcess.ServiceBase]( > [ > FolderWatch() > ]) > ServiceBase.Run(ServicesToRun)**; > > prg = Program() > prg.Main() > > Does anyone have an idea, how to accomplish that or - more generally - how > to make an windows service out of an ipy program? > > Thanks in advance > Peter Schwalm > > > ______________________________**_________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/**mailman/listinfo/ironpython-**users > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at peter-schwalm.de Thu Jan 3 17:49:29 2013 From: ps at peter-schwalm.de (Peter Schwalm) Date: Thu, 03 Jan 2013 17:49:29 +0100 Subject: [Ironpython-users] ironpython and windows services In-Reply-To: References: <50E5970F.6070602@peter-schwalm.de> Message-ID: <50E5B699.805@peter-schwalm.de> Thank you for your help! Peter From Raheel.Shaikh at baesystems.com Thu Jan 3 11:32:59 2013 From: Raheel.Shaikh at baesystems.com (Shaikh, Raheel) Date: Thu, 3 Jan 2013 10:32:59 +0000 Subject: [Ironpython-users] Calling Python script from windows form Message-ID: <73E240587DC2724EB3736EE2AE2CDA5D012CDF@RHBARMEX02.purple.zebra.ad> I'm an IronPython novice and would like some help. I have a windows form that I have created in Visual Basic 2010 Express, which contains two text-boxes ('txtNumber' and 'txtResult') and a button ('btnSquare'). What I want to do is be able to call the below Python script ('Square.py') on clicking the button on the form; class SquarePython: def __init__(self, number): self.sq = number*number This script should square the number that is input in to 'txtNumber' and then output the result in to 'txtResult'. I know this is almost too simple, but I just need to know the basics. Here's what I have so far in my VB code; Imports Microsoft.Scripting.Hosting Imports IronPython.Hosting Imports IronPython.Runtime.Types Public Class Square Private Sub btnSquare_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSquare.Click Dim runtime As ScriptRuntime = Python.CreateRuntime Dim scope As ScriptScope = runtime.ExecuteFile("Square.py") End Sub End Class Thanks in advance. Raheel Shaikh ****************************************************************************** The information contained in this communication may be commercially sensitive and/or legally privileged. If you have received this message in error please notify the sender or a member of the Communications team immediately by reply e-mail and then delete this message from your system. You must not disclose it to any other person or third party who is not on the original distribution. BAE SYSTEMS MARINE Limited. Registered number is 00229770. Registered Office: Warwick House, PO Box 87, Farnborough Aerospace Centre, Farnborough, Hampshire, GU14 6YU ****************************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From slide.o.mix at gmail.com Thu Jan 3 18:58:14 2013 From: slide.o.mix at gmail.com (Slide) Date: Thu, 3 Jan 2013 10:58:14 -0700 Subject: [Ironpython-users] Calling Python script from windows form In-Reply-To: <73E240587DC2724EB3736EE2AE2CDA5D012CDF@RHBARMEX02.purple.zebra.ad> References: <73E240587DC2724EB3736EE2AE2CDA5D012CDF@RHBARMEX02.purple.zebra.ad> Message-ID: This might help, its an article I wrote with some example code. http://earl-of-code.com/2012/02/testing-with-ironpython/ Thanks, slide On Thu, Jan 3, 2013 at 3:32 AM, Shaikh, Raheel wrote: > ** > I'm an IronPython novice and would like some help. I have a windows form > that I have created in Visual Basic 2010 Express, which contains two > text-boxes ('txtNumber' and 'txtResult') and a button ('btnSquare'). What > I want to do is be able to call the below Python script ('Square.py') on > clicking the button on the form; > > > class SquarePython: > > def __init__(self, number): > > self.sq = number*number > This script should square the number that is input in to 'txtNumber' and > then output the result in to 'txtResult'. I know this is almost too > simple, but I just need to know the basics. Here's what I have so far in > my VB code; > > Imports > Microsoft.Scripting.Hosting > > Imports > IronPython.Hosting > > Imports > IronPython.Runtime.Types > > Public > Class Square > > Private Sub btnSquare_Click(ByVal sender As System.Object, ByVal e AsSystem. > EventArgs) Handles btnSquare.Click > > Dim runtime As ScriptRuntime = Python.CreateRuntime > > Dim scope As ScriptScope = runtime.ExecuteFile("Square.py") > > End Sub > > End Class > > Thanks in advance. > > *Raheel Shaikh* > > > ****************************************************************************** > > The information contained in this communication may be commercially > sensitive > > and/or legally privileged. If you have received this message in error > please > > notify the sender or a member of the Communications team immediately by > reply > > e-mail and then delete this message from your system. You must not > disclose > > it to any other person or third party who is not on the original > distribution. > > > > BAE SYSTEMS MARINE Limited. Registered number is 00229770. > > Registered Office: Warwick House, PO Box 87, > > Farnborough Aerospace Centre, Farnborough, Hampshire, GU14 6YU > > > ****************************************************************************** > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From JackieSproat at smarttech.com Thu Jan 3 20:24:01 2013 From: JackieSproat at smarttech.com (Jackie Sproat) Date: Thu, 3 Jan 2013 19:24:01 +0000 Subject: [Ironpython-users] ipy.exe hangs after closing IronPython WFP application Message-ID: <927A025C392E9746A0DE744619AE6B01087B2253@CALMAIL-MBX3.smarttech.inc> Here is the IronPython code I use to start and stop my app: Perhaps the ShutdownMode has something to do with ipy.exe hanging (which seems to suggest app is not shutting down properly!)? def Run_App_Threaded(): global evt evt = AutoResetEvent(False) print "initializing..." thrd = Thread(ThreadStart(thread_start)) thrd.ApartmentState = ApartmentState.STA thrd.IsBackground = True thrd.Start() evt.WaitOne() clr.SetCommandDispatcher(DispatchConsoleCommand) def thread_start(): try: global app app = Application() global mywin mywin = WpfApp1() mywin.Show() app.Startup += on_startup #app.ShutdownMode = ShutdownMode.OnExplicitShutdown app.ShutdownMode = ShutdownMode.OnMainWindowClose app.Run() finally: clr.SetCommandDispatcher(None) print "finally" itLives = Thread.CurrentThread.IsAlive print itLives print "hi" #if itLives: Thread.CurrentThread.Abort() print "Abort" #app.Exit(0) #exception: BoundEvent is not callable #app.Shutdown(0) #System.Environment.Exit(0) #this is the easy way to prevent it from hanging but, I want to do it RIGHT;) def on_startup(*args): print "on_startup" global dispatcher dispatcher = Dispatcher.FromThread(Thread.CurrentThread) evt.Set() def Close_App(): #not on background thread, so we need to call Invoke print "invoking dispatcher" dispatcher.Invoke(Close_App_Delegate) def Close_App_Delegate(): mywin.Close_Window() app.Exit app.Shutdown() >> Here is the output: Finally True hi >>Conclusion: CurrentThread is Alive, but Abort doesn't work; ipy.exe hangs with or without this call to Abort()??? Why isn't ipy.exe not exiting? -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruno.gallart at orange.fr Thu Jan 3 23:38:59 2013 From: bruno.gallart at orange.fr (bruno gallart) Date: Thu, 03 Jan 2013 23:38:59 +0100 Subject: [Ironpython-users] [Newbee] - Ironpython and .Net - Problem of encoding accented characters Message-ID: <50E60883.7070104@orange.fr> Hi, First, I wish you a Good Year and a Good Health. For me I begin the year with a little stupid encoding's problem : I am doing a spellchecker with the Hunspell ' library for .Net -- > Nhunspell for a language of south of Europe with many accented characters. The spellchecker works fine with the words without accented characters but if there is some I have strange problem, exemple : /self.mySpellChecker = NHunspell.Hunspell("xx_FR.aff","xx_FR.dic")// //self.suggestions = self.mySpellChecker.Suggest("ome") / If I give directly the word " ome" that is wrong version for "?me" "the man" the result, (self.suggestions) shall give me "?me" , "the man" and "?me" , "the hymn"... it is very good. But if I take all the words of an Word's document 2007 I have created, when the loop is at the level of "ome" the self.suggestions give nothing. I think it comes from the character accented. The difference maybe comes from the /"self.theWords.Item(self.ltItemsErreurs[self.index]).Text)/" that gives the word wrong but in a String's format. In .Net if I remember well the String's object is an Unicode ? I have tried to do unicode, decode, encode in iso-8859-15, my xx_FR.dic and xx_FR.aff are in UTF8, the Word's document is a 2007 version etc... I don't understand now, I am drowned in my error. Somebody can gives me some trails ???? Thanks if somebody can give me some advice and sorry for my poor english, And, this week, I am going to buy the book " IronPython in Action", I think that it will be better. Cheers, Bruno _Suggestion's part of the program_/ self.theWords.Item(self.ltItemsErrors[self.index]).Font.Color= 255// // self.suggestions = self.mySpellChecker.Suggest(self.theWords.Item(self.ltItemsErreurs[self.index]).Text)// //// // if self.suggestions:// // for sug in self.suggestions:// // self._ltSuggestions.Items.Add(sug)// // else:// // self._ltSuggestions.Items.Add("No proposition")// // # the word before en black // ////if self.index >= 1:// //self.theWords.Item(self.ltItemsErreurs[self.index-1]).Font.Color = 000// //// // if self.index == len(self.ltItemsErreurs)-1:// // self._ltSuggestions.Items.Add("End of tractament")// //self.theWords.Item(self.ltItemsErreurs[self.index]).Font.Color = 000// // self.index = 0//// // else:// // self.index = self.index + 1/ _Little part of code to charge all the words and spell them:_ /ltItemsErreurs = []/ / self.doc = self.word_application.Documents.Open("c:\\test\\LeTestUltime_2007.docx")/ / self.lesMots = self.doc.Content.Words// // self.nbrMots = self.doc.Content.Words.Count// // for n in xrange(1, self.nbrMots):// // if self.lesMots.Item(n).Text.strip() not in self.ltLettresAEviter:// // existe = self.monCorrecteur.Spell(self.lesMots.Item(n).Text.strip())// // if not existe:// ////self.ltItemsErreurs.append(n)/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at peter-schwalm.de Fri Jan 4 00:07:16 2013 From: ps at peter-schwalm.de (Peter Schwalm) Date: Fri, 04 Jan 2013 00:07:16 +0100 Subject: [Ironpython-users] [Newbee] - Ironpython and .Net - Problem of encoding accented characters In-Reply-To: <50E60883.7070104@orange.fr> References: <50E60883.7070104@orange.fr> Message-ID: <50E60F24.10703@peter-schwalm.de> Hello bruno, I dont't expect that to be a solution, but I see a little problem in your code for loading the word doc. You write: /for n in xrange(1, self.nbrMots):/ ... If /self.lesMots.Item(...) is indexed starting with 1 (I don't if that is true), you will miss the last word, if is indexed starting with 0, you will miss the first word. That is because ranges in python asymmetric, i.e. in "range(a,b)/" b does not belong the elements of the range; the last element is (b-1). So I think you will have to use either range(0, nbrMots) # 0 .. or range(1, nbrMots + 1) # 1 .. Good luck. Peter Am 03.01.2013 23:38, schrieb bruno gallart: > Hi, > > First, I wish you a Good Year and a Good Health. > For me I begin the year with a little stupid encoding's problem : > > I am doing a spellchecker with the Hunspell ' library for .Net -- > > Nhunspell for a language of south of Europe with many accented > characters. The spellchecker works fine with the words without > accented characters but if there is some I have strange problem, exemple : > > /self.mySpellChecker = NHunspell.Hunspell("xx_FR.aff","xx_FR.dic")// > //self.suggestions = self.mySpellChecker.Suggest("ome") / > > If I give directly the word " ome" that is wrong version for "?me" > "the man" the result, (self.suggestions) shall give me "?me" , "the > man" and "?me" , "the hymn"... it is very good. > > But if I take all the words of an Word's document 2007 I have created, > when the loop is at the level of "ome" the self.suggestions give > nothing. I think it comes from the character accented. > > The difference maybe comes from the > /"self.theWords.Item(self.ltItemsErreurs[self.index]).Text)/" that > gives the word wrong but in a String's format. In .Net if I remember > well the String's object is an Unicode ? I have tried to do unicode, > decode, encode in iso-8859-15, my xx_FR.dic and xx_FR.aff are in UTF8, > the Word's document is a 2007 version etc... I don't understand now, I > am drowned in my error. Somebody can gives me some trails ???? > > Thanks if somebody can give me some advice and sorry for my poor english, > > And, this week, I am going to buy the book " IronPython in Action", I > think that it will be better. > Cheers, > Bruno > > > _Suggestion's part of the program_/ > self.theWords.Item(self.ltItemsErrors[self.index]).Font.Color= 255// > // self.suggestions = > self.mySpellChecker.Suggest(self.theWords.Item(self.ltItemsErreurs[self.index]).Text)// > //// > // if self.suggestions:// > // for sug in self.suggestions:// > // self._ltSuggestions.Items.Add(sug)// > // else:// > // self._ltSuggestions.Items.Add("No proposition")// > // > # the word before en black // > ////if self.index >= 1:// > //self.theWords.Item(self.ltItemsErreurs[self.index-1]).Font.Color = 000// > //// > // if self.index == len(self.ltItemsErreurs)-1:// > // self._ltSuggestions.Items.Add("End of tractament")// > //self.theWords.Item(self.ltItemsErreurs[self.index]).Font.Color = 000// > // self.index = 0//// > // else:// > // self.index = self.index + 1/ > > _Little part of code to charge all the words and spell them:_ > > /ltItemsErreurs = []/ > / self.doc = > self.word_application.Documents.Open("c:\\test\\LeTestUltime_2007.docx")/ > / self.lesMots = self.doc.Content.Words// > // self.nbrMots = self.doc.Content.Words.Count// > // for n in xrange(1, self.nbrMots):// > // if self.lesMots.Item(n).Text.strip() not in > self.ltLettresAEviter:// > // existe = > self.monCorrecteur.Spell(self.lesMots.Item(n).Text.strip())// > // if not existe:// > ////self.ltItemsErreurs.append(n)/ > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruno.gallart at orange.fr Fri Jan 4 11:26:25 2013 From: bruno.gallart at orange.fr (bruno gallart) Date: Fri, 04 Jan 2013 11:26:25 +0100 Subject: [Ironpython-users] [Resolved ]Re: [Newbee] - Ironpython and .Net - Problem of encoding accented characters In-Reply-To: <50E60F24.10703@peter-schwalm.de> References: <50E60883.7070104@orange.fr> <50E60F24.10703@peter-schwalm.de> Message-ID: <50E6AE51.4000601@orange.fr> Thanks Peter, It is true that I test only in the beginning of the text. Maybe I am going to have problem for the end. I am going to see my algorythm but ...I have resolved my problem ! I must to say that I am a newbee but more, a stupid newbee. My problem was that the word coming from Word's Document some have space at the end. When I did /wrongWord = //self.theWords.Item(self.ltItemsErreurs[self.index]).Text /I have to write .strip() to clean my string /. /Conclusion :/ /To have the SpellCkecker's suggestions in a right way I must write/: / //self.suggestions = self.mySpellChecker.Suggest( wrongWord.strip() ) //IronPython is very good//! Cheers, Bruno /// / Le 04/01/2013 00:07, Peter Schwalm a ?crit : > Hello bruno, > I dont't expect that to be a solution, but I see a little problem in > your code for loading the word doc. You write: > > /for n in xrange(1, self.nbrMots):/ > ... > If /self.lesMots.Item(...) is indexed starting with 1 (I don't if that > is true), you will miss the last word, if is indexed starting with 0, > you will miss the first word. That is because ranges in python > asymmetric, i.e. in "range(a,b)/" b does not belong the elements of > the range; the last element is (b-1). > > So I think you will have to use either > > range(0, nbrMots) # 0 .. > > or > > range(1, nbrMots + 1) # 1 .. > > Good luck. > Peter > > > > Am 03.01.2013 23:38, schrieb bruno gallart: >> Hi, >> >> First, I wish you a Good Year and a Good Health. >> For me I begin the year with a little stupid encoding's problem : >> >> I am doing a spellchecker with the Hunspell ' library for .Net -- > >> Nhunspell for a language of south of Europe with many accented >> characters. The spellchecker works fine with the words without >> accented characters but if there is some I have strange problem, >> exemple : >> >> /self.mySpellChecker = NHunspell.Hunspell("xx_FR.aff","xx_FR.dic")// >> //self.suggestions = self.mySpellChecker.Suggest("ome") / >> >> If I give directly the word " ome" that is wrong version for "?me" >> "the man" the result, (self.suggestions) shall give me "?me" , "the >> man" and "?me" , "the hymn"... it is very good. >> >> But if I take all the words of an Word's document 2007 I have >> created, when the loop is at the level of "ome" the self.suggestions >> give nothing. I think it comes from the character accented. >> >> The difference maybe comes from the >> /"self.theWords.Item(self.ltItemsErreurs[self.index]).Text)/" that >> gives the word wrong but in a String's format. In .Net if I remember >> well the String's object is an Unicode ? I have tried to do unicode, >> decode, encode in iso-8859-15, my xx_FR.dic and xx_FR.aff are in >> UTF8, the Word's document is a 2007 version etc... I don't understand >> now, I am drowned in my error. Somebody can gives me some trails ???? >> >> Thanks if somebody can give me some advice and sorry for my poor english, >> >> And, this week, I am going to buy the book " IronPython in Action", I >> think that it will be better. >> Cheers, >> Bruno >> >> >> _Suggestion's part of the program_/ >> self.theWords.Item(self.ltItemsErrors[self.index]).Font.Color= 255// >> // self.suggestions = >> self.mySpellChecker.Suggest(self.theWords.Item(self.ltItemsErreurs[self.index]).Text)// >> //// >> // if self.suggestions:// >> // for sug in self.suggestions:// >> // self._ltSuggestions.Items.Add(sug)// >> // else:// >> // self._ltSuggestions.Items.Add("No proposition")// >> // >> # the word before en black // >> ////if self.index >= 1:// >> //self.theWords.Item(self.ltItemsErreurs[self.index-1]).Font.Color = >> 000// >> //// >> // if self.index == len(self.ltItemsErreurs)-1:// >> // self._ltSuggestions.Items.Add("End of tractament")// >> //self.theWords.Item(self.ltItemsErreurs[self.index]).Font.Color = 000// >> // self.index = 0//// >> // else:// >> // self.index = self.index + 1/ >> >> _Little part of code to charge all the words and spell them:_ >> >> /ltItemsErreurs = []/ >> / self.doc = >> self.word_application.Documents.Open("c:\\test\\LeTestUltime_2007.docx")/ >> / self.lesMots = self.doc.Content.Words// >> // self.nbrMots = self.doc.Content.Words.Count// >> // for n in xrange(1, self.nbrMots):// >> // if self.lesMots.Item(n).Text.strip() not in >> self.ltLettresAEviter:// >> // existe = >> self.monCorrecteur.Spell(self.lesMots.Item(n).Text.strip())// >> // if not existe:// >> ////self.ltItemsErreurs.append(n)/ >> >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From ps at peter-schwalm.de Fri Jan 4 16:04:22 2013 From: ps at peter-schwalm.de (Peter Schwalm) Date: Fri, 04 Jan 2013 16:04:22 +0100 Subject: [Ironpython-users] embedding and compiling Message-ID: <50E6EF76.6050101@peter-schwalm.de> Hello, I want to use the embedding feature of ipy for implementing an ipy program as a windows service. I hope I can benefit from the good support of Visual Studio and C# for the installation of services (installUtil.exe). My question is: is it possible to use pyc-compiled programs with the embedding features? My plan is to code like this using IronPython.Hosting; using IronPython.Runtime; using Microsoft.Scripting.Hosting; ... ipyRt = Python.CreateRuntime() dynamic testPy = ipyRt.UseFile("program....py"); ... testPy.function() Is it possible to use compiled modules instead of "program....py" with .UseFile? Thanks in advance Peter From ps at peter-schwalm.de Mon Jan 7 01:37:07 2013 From: ps at peter-schwalm.de (Peter Schwalm) Date: Mon, 07 Jan 2013 01:37:07 +0100 Subject: [Ironpython-users] embedding and compiling In-Reply-To: <50E6EF76.6050101@peter-schwalm.de> References: <50E6EF76.6050101@peter-schwalm.de> Message-ID: <50EA18B3.6060909@peter-schwalm.de> Hello, I could figure it out myself now, not for a service yet, but for a c# console program. If anybody is interested here is the code snippet: class Program { static int Main(string[] args) { int rv = 0; // load the dll that results from ipy-compilation string AssemblyName = "outputMgrSvc1"; Assembly assembly = Assembly.Load(AssemblyName); Dictionary options = new Dictionary(); options["FullFrames"] = true; options["Frames"] = true; options["Tracing"] = true; ScriptRuntime runtime = Python.CreateRuntime(options); ScriptEngine engine = runtime.GetEngine("py"); runtime.LoadAssembly(assembly); // initialize the script module ScriptScope scope = engine.CreateScope(); string sourceString = @"from outputMgrSvc1 import *"; ScriptSource source = engine.CreateScriptSourceFromString(sourceString, Microsoft.Scripting.SourceCodeKind.Statements); try { var x = source.Execute(scope); } catch (IronPython.Runtime.Exceptions.SystemExitException exc) { object other; rv = exc.GetExitCode(out other); return rv; } // execute main procedure of script ObjectOperations ops = engine.Operations; dynamic names = scope.GetVariableNames(); // look at module data/procs dynamic proc = scope.GetVariable("scriptMain"); try { rv = proc(); } catch (IronPython.Runtime.Exceptions.SystemExitException exc) { object other; rv = exc.GetExitCode(out other); } return rv; } } Thank you Peter Am 04.01.2013 16:04, schrieb Peter Schwalm: > Hello, > I want to use the embedding feature of ipy for implementing an ipy > program as a windows service. I hope I can benefit from the good > support of Visual Studio and C# for the installation of services > (installUtil.exe). > > My question is: is it possible to use pyc-compiled programs with the > embedding features? > > My plan is to code like this > > using IronPython.Hosting; > using IronPython.Runtime; > using Microsoft.Scripting.Hosting; > ... > > ipyRt = Python.CreateRuntime() > dynamic testPy = ipyRt.UseFile("program....py"); > ... > testPy.function() > > Is it possible to use compiled modules instead of "program....py" with > .UseFile? > > Thanks in advance > Peter > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From jdhardy at gmail.com Mon Jan 7 17:05:20 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Mon, 7 Jan 2013 08:05:20 -0800 Subject: [Ironpython-users] embedding and compiling In-Reply-To: <50EA18B3.6060909@peter-schwalm.de> References: <50E6EF76.6050101@peter-schwalm.de> <50EA18B3.6060909@peter-schwalm.de> Message-ID: I'm pretty sure this is the best way to do it right now. It might be possible to use the import machinery directly, but I'm not sure off the top of my head. - Jeff On Sun, Jan 6, 2013 at 4:37 PM, Peter Schwalm wrote: > Hello, > > I could figure it out myself now, not for a service yet, but for a c# > console program. If anybody is interested here is the code snippet: > > class Program > { > static int Main(string[] args) > { > int rv = 0; > // load the dll that results from ipy-compilation > string AssemblyName = "outputMgrSvc1"; > Assembly assembly = Assembly.Load(AssemblyName); > Dictionary options = new Dictionary object>(); > options["FullFrames"] = true; > options["Frames"] = true; > options["Tracing"] = true; > ScriptRuntime runtime = Python.CreateRuntime(options); > ScriptEngine engine = runtime.GetEngine("py"); > runtime.LoadAssembly(assembly); > > // initialize the script module > ScriptScope scope = engine.CreateScope(); > string sourceString = @"from outputMgrSvc1 import *"; > ScriptSource source = > engine.CreateScriptSourceFromString(sourceString, > Microsoft.Scripting.SourceCodeKind.Statements); > try > { > var x = source.Execute(scope); > } > catch (IronPython.Runtime.Exceptions.SystemExitException exc) > { > object other; > rv = exc.GetExitCode(out other); > return rv; > } > > // execute main procedure of script > ObjectOperations ops = engine.Operations; > dynamic names = scope.GetVariableNames(); // look at module > data/procs > dynamic proc = scope.GetVariable("scriptMain"); > try > { > rv = proc(); > } > catch (IronPython.Runtime.Exceptions.SystemExitException exc) > { > object other; > rv = exc.GetExitCode(out other); > } > return rv; > } > } > > Thank you > Peter > > Am 04.01.2013 16:04, schrieb Peter Schwalm: > >> Hello, >> I want to use the embedding feature of ipy for implementing an ipy program >> as a windows service. I hope I can benefit from the good support of Visual >> Studio and C# for the installation of services (installUtil.exe). >> >> My question is: is it possible to use pyc-compiled programs with the >> embedding features? >> >> My plan is to code like this >> >> using IronPython.Hosting; >> using IronPython.Runtime; >> using Microsoft.Scripting.Hosting; >> ... >> >> ipyRt = Python.CreateRuntime() >> dynamic testPy = ipyRt.UseFile("program....py"); >> ... >> testPy.function() >> >> Is it possible to use compiled modules instead of "program....py" with >> .UseFile? >> >> Thanks in advance >> Peter >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users From ps at peter-schwalm.de Wed Jan 9 12:04:52 2013 From: ps at peter-schwalm.de (Peter Schwalm) Date: Wed, 09 Jan 2013 12:04:52 +0100 Subject: [Ironpython-users] sitecustomize and compiled ironpython Message-ID: <50ED4ED4.70306@peter-schwalm.de> Hello, I have a problem concerning the default encoding in ironpython console programs. In german windows editions there is a difference between the codepage in gui programs und console programs. Console programs use OEM encoding. In the ironpython environment there happen implicit conversions between byte encoded files and unicode strings inside the program. If I read textfiles containing german umlauts they are implicitly converted using the default encoding, in console programs OEM. If the text files are encoded using a different codepage (ANSI, cp1252), then conversion errors will happen if the file contains umlauts. Normally I solve this problem by changing the default encoding in sitecustomize.py which is automatically called by site.py during program initialization. Now I have detected, that this mechanism will not work in ipy-compiled programs. It looks as if sitecustomize.py is not called in this environment. Does anybody have an idea how to achieve an equally general solution for this problem? Is there perhaps a sort of stub-.py-file used by pyc-compilation where I can place the necessary call to sys.setdefaultencoding? My ironpython version 2.7.1. Thanks in advance Peter Schwalm From zsidoz at innodev.hu Wed Jan 9 14:54:53 2013 From: zsidoz at innodev.hu (=?iso-8859-2?Q?Zsid=F3_Zolt=E1n?=) Date: Wed, 09 Jan 2013 14:54:53 +0100 Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation Message-ID: <478B4630361A43BEA481D28D38F32170@ZsidozPC> Hi, We are using IronPython and Windows 8 long time, but now we have an exception that only occurs on windows 8 64 bit. (We did not test on Windows 8 32 bit but tested on Windows 7 32/64 bit where it is ok.) The application crashes at the first ironpython expression evaluating. I think it is important to note that we are using IronPython from a background thread. We cannot debug it on windows 8. If this exception is similar to you please help us. Thanks, Zoltan the stack trace: System.TypeInitializationException: The type initializer for 'IronPython.Runtime.Converter' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object. at IronPython.Runtime.Converter.MakeConvertSite[T](ConversionResultKind kind) at IronPython.Runtime.Converter.MakeExplicitConvertSite[T]() at IronPython.Runtime.Converter..cctor() --- End of inner exception stack trace --- at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type fromType, Type toType) at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type toType, NarrowingLevel allowNarrowing) at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type fromType, Type toType, Boolean toNotNullable, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, NarrowingLevel level) at IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, CallFailure& failure) at Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 candidates, NarrowingLevel level, List`1& failures) at Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver resolver, IList`1 targets, BindingRestrictions restrictions, String name, NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target) at IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] newArgs) at IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject function, DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions functionRestriction, Func`2 bind) at IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder pythonInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject context, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder binder, Int32 compilationThreshold, Object[] args) at Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder binder, Object[] args, Int32 compilationThreshold) at IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 site, PythonInvokeBinder binder, CodeContext state, Object[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at CGS.CGS.ExecuteAssign(AssignAbs assign) at CGS.CGS.ModelPool_PropertyRead(Object sender, PropertyEventArgs e) m: at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type fromType, Type toType) at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type toType, NarrowingLevel allowNarrowing) at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type fromType, Type toType, Boolean toNotNullable, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, NarrowingLevel level) at IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, CallFailure& failure) at Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 candidates, NarrowingLevel level, List`1& failures) at Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver resolver, IList`1 targets, BindingRestrictions restrictions, String name, NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target) at IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] newArgs) at IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject function, DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions functionRestriction, Func`2 bind) at IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder pythonInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject context, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder binder, Int32 compilationThreshold, Object[] args) at Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder binder, Object[] args, Int32 compilationThreshold) at IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 site, PythonInvokeBinder binder, CodeContext state, Object[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) -------------- next part -------------- An HTML attachment was scrubbed... URL: From rome at Wintellect.com Wed Jan 9 18:26:13 2013 From: rome at Wintellect.com (Keith Rome) Date: Wed, 9 Jan 2013 17:26:13 +0000 Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation In-Reply-To: <478B4630361A43BEA481D28D38F32170@ZsidozPC> References: <478B4630361A43BEA481D28D38F32170@ZsidozPC> Message-ID: <4C554C3A47C5024ABDE00E94DA17BC4D2D7D07DC@BN1PRD0712MB633.namprd07.prod.outlook.com> Are you able to narrow down the problem to a small script that reproduces it? The code pointed to in that call stack doesn't really have many ways of failing in that way (null reference). The most likely thing is that DefaultContext.DefaultPythonContext is not being set. But I think that is done for you when the scripting runtime is initialized. How are you creating the script runtime? Running from a background thread shouldn't have any bearing on it, unless this were a race issue. And since the crash is happening in a static ctor, that pretty much rules out thread races. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | krome at wintellect.com www.wintellect.com From: Ironpython-users [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Zsid? Zolt?n Sent: Wednesday, January 9, 2013 8:55 AM To: ironpython-users at python.org Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation Hi, We are using IronPython and Windows 8 long time, but now we have an exception that only occurs on windows 8 64 bit. (We did not test on Windows 8 32 bit but tested on Windows 7 32/64 bit where it is ok.) The application crashes at the first ironpython expression evaluating. I think it is important to note that we are using IronPython from a background thread. We cannot debug it on windows 8. If this exception is similar to you please help us. Thanks, Zoltan the stack trace: System.TypeInitializationException: The type initializer for 'IronPython.Runtime.Converter' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object. at IronPython.Runtime.Converter.MakeConvertSite[T](ConversionResultKind kind) at IronPython.Runtime.Converter.MakeExplicitConvertSite[T]() at IronPython.Runtime.Converter..cctor() --- End of inner exception stack trace --- at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type fromType, Type toType) at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type toType, NarrowingLevel allowNarrowing) at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type fromType, Type toType, Boolean toNotNullable, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, NarrowingLevel level) at IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, CallFailure& failure) at Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 candidates, NarrowingLevel level, List`1& failures) at Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver resolver, IList`1 targets, BindingRestrictions restrictions, String name, NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target) at IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] newArgs) at IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject function, DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions functionRestriction, Func`2 bind) at IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder pythonInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject context, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder binder, Int32 compilationThreshold, Object[] args) at Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder binder, Object[] args, Int32 compilationThreshold) at IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 site, PythonInvokeBinder binder, CodeContext state, Object[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at CGS.CGS.ExecuteAssign(AssignAbs assign) at CGS.CGS.ModelPool_PropertyRead(Object sender, PropertyEventArgs e) m: at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type fromType, Type toType) at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type toType, NarrowingLevel allowNarrowing) at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type fromType, Type toType, Boolean toNotNullable, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, NarrowingLevel level) at IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, CallFailure& failure) at Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 candidates, NarrowingLevel level, List`1& failures) at Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver resolver, IList`1 targets, BindingRestrictions restrictions, String name, NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target) at IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] newArgs) at IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject function, DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions functionRestriction, Func`2 bind) at IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder pythonInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject context, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder binder, Int32 compilationThreshold, Object[] args) at Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder binder, Object[] args, Int32 compilationThreshold) at IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 site, PythonInvokeBinder binder, CodeContext state, Object[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) -------------- next part -------------- An HTML attachment was scrubbed... URL: From fwierzbicki at gmail.com Wed Jan 9 18:36:06 2013 From: fwierzbicki at gmail.com (fwierzbicki at gmail.com) Date: Wed, 9 Jan 2013 09:36:06 -0800 Subject: [Ironpython-users] Any IronPython core devs in the bay area? Message-ID: Hi all, People who should know (including Jeff Hardy) doubt it, but just to be complete: Do any core IronPython devs live in the bay area? A local group (PyLadies) is having a panel discussion with representation from CPython, Jython and PyPy. It would be nice to have a FePy presence as well :) -Frank From jdhardy at gmail.com Wed Jan 9 21:42:28 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 9 Jan 2013 12:42:28 -0800 Subject: [Ironpython-users] sitecustomize and compiled ironpython In-Reply-To: <50ED4ED4.70306@peter-schwalm.de> References: <50ED4ED4.70306@peter-schwalm.de> Message-ID: Are you using pyc to build an exe? If so, I don't think there is. Can you not call sys.setdefaultencoding() at the start of your program, from Python? If not, you may need to look at the Python codecs library to manually handle file encodings. - Jeff On Wed, Jan 9, 2013 at 3:04 AM, Peter Schwalm wrote: > Hello, > I have a problem concerning the default encoding in ironpython console > programs. In german windows editions there is a difference between the > codepage in gui programs und console programs. Console programs use OEM > encoding. > > In the ironpython environment there happen implicit conversions between byte > encoded files and unicode strings inside the program. > > If I read textfiles containing german umlauts they are implicitly converted > using the default encoding, in console programs OEM. If the text files are > encoded using a different codepage (ANSI, cp1252), then conversion errors > will happen if the file contains umlauts. > > Normally I solve this problem by changing the default encoding in > sitecustomize.py which is automatically called by site.py during program > initialization. Now I have detected, that this mechanism will not work in > ipy-compiled programs. It looks as if sitecustomize.py is not called in this > environment. > > Does anybody have an idea how to achieve an equally general solution for > this problem? Is there perhaps a sort of stub-.py-file used by > pyc-compilation where I can place the necessary call to > sys.setdefaultencoding? > > My ironpython version 2.7.1. > > Thanks in advance > Peter Schwalm > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users From no_reply at codeplex.com Thu Jan 10 22:29:45 2013 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 10 Jan 2013 13:29:45 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 1/9/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New issue] GetEncodings called in StringOps.cs fails using Mono 2. [New comment] GetEncodings called in StringOps.cs fails using Mono ---------------------------------------------- ISSUES 1. [New issue] GetEncodings called in StringOps.cs fails using Mono http://ironpython.codeplex.com/workitem/33646 User TRJG has proposed the issue: "I have submitted this verified bug to Mono because its technically their implementation of Text.GetEncodings() that is extremely flawed (and absolutely does not work). Since I have submitted it I have not seen much interest to fix it even though it absolutely does not return supported encodings. I figured I would let you guys know about it, and how IronPython's only call to this method ends up throwing an uncaught exception. The GetEncodings() call I am referring to is in StringOps in the function MakeCodecsDict. What happen is when this calls is made, an array of hardcoded encoding names are returned. When called, the encodings fail and throw an exception that is not caught in IronPython. Normally when GetEncodings() is called in .NET only supported encodings are returned, however is not the case with MONO. In fact, I'd argue that at this point GetEncodings() is pretty much guaranteed to fail on alot, if not most systems. (As a note, I am using OpenSuse 64 bit) I'm not 100% sure but wrapping a try catch around "NormalizeEncodingName" might just fix the problem. Thanks, Trjg"----------------- 2. [New comment] GetEncodings called in StringOps.cs fails using Mono http://ironpython.codeplex.com/workitem/33646 User TRJG has commented on the issue: "I have just confirmed that this technique works. Out of 95 encodings provided, 72 failed on my machine while 23 passed. Here is the simple code I used to check this. static void Main() { Console.WriteLine("Getting Encodings"); var encodings = Encoding.GetEncodings(); int successful = 0; int failed = 0; foreach(var encoding in encodings) { try { var name = encoding.Name; Console.WriteLine(string.Format("Encoding name is {0}",name)); ++successful; } catch(Exception e) { Console.WriteLine("Got error."); ++failed; } } Console.WriteLine(string.Format("Successful {0}",successful)); Console.WriteLine(string.Format("Failed {0}",failed)); } I modded my personal source code of IronPython but have not yet personally tested it against the massive code base that I wrote and am looking to port to Linux. Mono's GetEncodings, and IronPython's call to it have been hanging me up thus far. Thanks for the stellar library, Mike" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From zsidoz at innodev.hu Fri Jan 11 08:43:10 2013 From: zsidoz at innodev.hu (=?UTF-8?Q?Zsid=C3=B3_Zolt=C3=A1n?=) Date: Fri, 11 Jan 2013 08:43:10 +0100 Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation In-Reply-To: <4C554C3A47C5024ABDE00E94DA17BC4D2D7D07DC@BN1PRD0712MB633.namprd07.prod.outlook.com> References: <478B4630361A43BEA481D28D38F32170@ZsidozPC> <4C554C3A47C5024ABDE00E94DA17BC4D2D7D07DC@BN1PRD0712MB633.namprd07.prod.outlook.com> Message-ID: <4D60BB1D64864DC2BB35678DC45B39D9@ZsidozPC> Keith, you are absolutely right. Not the background thread causes this error. I tried to make a simpler application that throws the same exception but I was not able to do it. Then I tried to debug it in Visual Studio 2010 but if I debug then the error does not appears. I cannot post the full application source code so we will give up it, because it is not reproduceable. As a last word I would like to note that we have two windows 8 64 bit computer and on both pc the software crashes. Regards, Zoltan From: Keith Rome Sent: Wednesday, January 09, 2013 6:26 PM To: Zsid? Zolt?n ; ironpython-users at python.org Subject: RE: [Ironpython-users] crash on Win8 64bit at IronPython expressionevaluation Are you able to narrow down the problem to a small script that reproduces it? The code pointed to in that call stack doesn?t really have many ways of failing in that way (null reference). The most likely thing is that DefaultContext.DefaultPythonContext is not being set. But I think that is done for you when the scripting runtime is initialized. How are you creating the script runtime? Running from a background thread shouldn?t have any bearing on it, unless this were a race issue. And since the crash is happening in a static ctor, that pretty much rules out thread races. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | mailto:rome at wintellect.com www.wintellect.com From: Ironpython-users [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Zsid? Zolt?n Sent: Wednesday, January 9, 2013 8:55 AM To: ironpython-users at python.org Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation Hi, We are using IronPython and Windows 8 long time, but now we have an exception that only occurs on windows 8 64 bit. (We did not test on Windows 8 32 bit but tested on Windows 7 32/64 bit where it is ok.) The application crashes at the first ironpython expression evaluating. I think it is important to note that we are using IronPython from a background thread. We cannot debug it on windows 8. If this exception is similar to you please help us. Thanks, Zoltan the stack trace: System.TypeInitializationException: The type initializer for 'IronPython.Runtime.Converter' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object. at IronPython.Runtime.Converter.MakeConvertSite[T](ConversionResultKind kind) at IronPython.Runtime.Converter.MakeExplicitConvertSite[T]() at IronPython.Runtime.Converter..cctor() --- End of inner exception stack trace --- at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type fromType, Type toType) at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type toType, NarrowingLevel allowNarrowing) at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type fromType, Type toType, Boolean toNotNullable, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, NarrowingLevel level) at IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, CallFailure& failure) at Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 candidates, NarrowingLevel level, List`1& failures) at Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver resolver, IList`1 targets, BindingRestrictions restrictions, String name, NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target) at IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] newArgs) at IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject function, DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions functionRestriction, Func`2 bind) at IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder pythonInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject context, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder binder, Int32 compilationThreshold, Object[] args) at Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder binder, Object[] args, Int32 compilationThreshold) at IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 site, PythonInvokeBinder binder, CodeContext state, Object[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at CGS.CGS.ExecuteAssign(AssignAbs assign) at CGS.CGS.ModelPool_PropertyRead(Object sender, PropertyEventArgs e) m: at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type fromType, Type toType) at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type toType, NarrowingLevel allowNarrowing) at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type fromType, Type toType, Boolean toNotNullable, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, NarrowingLevel level) at IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, CallFailure& failure) at Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 candidates, NarrowingLevel level, List`1& failures) at Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver resolver, IList`1 targets, BindingRestrictions restrictions, String name, NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target) at IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] newArgs) at IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject function, DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions functionRestriction, Func`2 bind) at IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder pythonInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject context, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder binder, Int32 compilationThreshold, Object[] args) at Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder binder, Object[] args, Int32 compilationThreshold) at IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 site, PythonInvokeBinder binder, CodeContext state, Object[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) --------------------------------------------------------------------------------------------------- Ezt a sz?veget a Panda IS 2013 csatolta : Amenyiben ez egy k?retlen e-mail ?zenet (SPAM), kattintson a k?vetkez? linkre ?s min?s?tse ?jra: Ez egy SPAM! --------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From Piotr.Nestorow at systemverification.com Fri Jan 11 09:59:15 2013 From: Piotr.Nestorow at systemverification.com (Piotr Nestorow) Date: Fri, 11 Jan 2013 09:59:15 +0100 Subject: [Ironpython-users] IronPython 2.7.3 with .NET 4.5 Message-ID: <90CF25803C44814EA1B29B33259679C601E0BB312D@sr01259> Hi Are there any known problems/issues when using IronPython 2.7.3 on a Windows system with .NET 4.5 ? Best Regards Piotr -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Fri Jan 11 11:41:10 2013 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 11 Jan 2013 02:41:10 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 1/10/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] GetEncodings called in StringOps.cs fails using Mono 2. [New issue] DAQMX Code which works fine with "Python 2.7.3" giving issue with IRONPYTHON 3. [New issue] DAQmxCreateDOChan() code which works in python does not works with ironpython 4. [New issue] Importing & reloading module leaks memory ---------------------------------------------- ISSUES 1. [New comment] GetEncodings called in StringOps.cs fails using Mono http://ironpython.codeplex.com/workitem/33646 User jdhardy has commented on the issue: "If you do get it working, a github pull request or a patch on here is the easiest way for me to incorporate the fix."----------------- 2. [New issue] DAQMX Code which works fine with "Python 2.7.3" giving issue with IRONPYTHON http://ironpython.codeplex.com/workitem/33648 User suma_putani has proposed the issue: "Hello, We are using National Instruments (NI) Driver 6501 for switch Testing. Below is the code which is written in Python 2.7.3. The same code does not work with Iron Python. import ctypes import numpy import sys import os import time #------------- Functions ------------------------------------------ # Error Writing module. def WriteError(ErrorCode): if ErrorCode < 0: BufSize = 1000 Buf = ctypes.create_string_buffer('\000' * BufSize) nidaq.DAQmxGetErrorString(ErrorCode, ctypes.byref(Buf), BufSize) raise RuntimeError('nidaq call failed with error %d: %s'%(ErrorCode,repr(Buf.value))) return ErrorCode #------------- Functions ------------------------------ int32 = ctypes.c_long uint8 = ctypes.c_uint8 uInt32 = ctypes.c_ulong uInt64 = ctypes.c_ulonglong float64 = ctypes.c_double TaskHandle = uInt32 Port = uInt32 ChannelValue = Port(0x77) # load DLL nidaq = ctypes.windll.nicaiu DAQmx_Val_GroupByChannel = 0 DAQmx_Val_ChanForAllLines = 1 taskHandle0 = TaskHandle(0) CreateChan = "Dev5/port0/line7:0" Data = numpy.zeros((8,),dtype=numpy.uint8) nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle0)) Result = WriteError(nidaq.DAQmxCreateDOChan(taskHandle0,CreateChan,"", DAQmx_Val_ChanForAllLines)) Result = WriteError(nidaq.DAQmxWriteDigitalU32(taskHandle0,1,1,float64(10.0),DAQmx_Val_GroupByChannel, ctypes.byref(ChannelValue),None,None)) Result = WriteError(nidaq.DAQmxReadDigitalLines(taskHandle0,-1,float64(10.0),DAQmx_Val_GroupByChannel,Data.ctypes.data, 8,None,None,None)) print Data str1 = Data[0:8] str2 = "" for i in str1: str2 = str2+str(i) print hex(int(str2,2)) #time.sleep(10) nidaq.DAQmxStopTask(taskHandle0) nidaq.DAQmxClearTask(taskHandle0) --------------------------------------------------------------------------------------- Output in Python 2.7.3 : [0 1 1 1 0 1 1 1] 0x77 Output in IronPython 2.7.3 : C:\IronPython 2.7>IPY read.py Traceback (most recent call last): File "read.py", line 33, in File "read.py", line 12, in WriteError RuntimeError: nidaq call failed with error -200170: 'Physical channel specified does not exist on this device.\n\nRefer to the documentation for channels availa ble on this device.' I don't think it is something to do with Physical Channel as the same code works fine for Python 2.7.3. Let me know if this is a Iron Python Issue. If so how to resolve it. Or If I need to refer to Ctypes variable in a different way."----------------- 3. [New issue] DAQmxCreateDOChan() code which works in python does not works with ironpython http://ironpython.codeplex.com/workitem/33649 User jayprakash has proposed the issue: "My this line of code works well when i execute it in python: nidaq.DAQmxCreateDOChan(taskHandle0,CreateChan,"", DAQmx_Val_ChanForAllLines) But when i execute the same come in ironpython i get an error code -200170(physical channel specified does not exist on this device) I am clueless about how to solve this issue."----------------- 4. [New issue] Importing & reloading module leaks memory http://ironpython.codeplex.com/workitem/33650 User ripedbone has proposed the issue: "When I'm importing a module with __import__ and then reloading it with reload, it seems to leave the whole module into memory. Here's a simple example code how to reproduce this. It's just importing and reloading a module which has two classes and the other one has a long list of methods just to get the module size bigger. Garbage collection doesn't do anything with the memory until memory usage is ~600 Mb, which is quite strange. Furthermore, this maximum memory size is directly linked to the size of the imported module. Does anyone have an idea why? Or should I do the importing and reloading differently? Just run attached import_test.py to reproduce the problem." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From pawel.jasinski at gmail.com Fri Jan 11 15:37:03 2013 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Fri, 11 Jan 2013 15:37:03 +0100 Subject: [Ironpython-users] importing .net assembly as module in a package Message-ID: hi, I am looking for a way to use module created as .net assembly as part of the package So instead of having: import clr clr.AddReferenceToFileAndPath(".\maplookup.dll") import maplookup I prefer: import clr clr.AddReferenceToFileAndPath(".\maplookup.dll") import xmldiff.maplookup Is there any way to accomplish it? Thanks --Pawel -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Jan 11 16:54:31 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 11 Jan 2013 07:54:31 -0800 Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation In-Reply-To: <4D60BB1D64864DC2BB35678DC45B39D9@ZsidozPC> References: <478B4630361A43BEA481D28D38F32170@ZsidozPC> <4C554C3A47C5024ABDE00E94DA17BC4D2D7D07DC@BN1PRD0712MB633.namprd07.prod.outlook.com> <4D60BB1D64864DC2BB35678DC45B39D9@ZsidozPC> Message-ID: What version of .NET is installed on the Windows 7 machines? I wonder if this is a .NET 4.5 vs. .NET 4 issue and not a Win8 vs Win7 issue. - Jeff On Thu, Jan 10, 2013 at 11:43 PM, Zsid? Zolt?n wrote: > Keith, you are absolutely right. Not the background thread causes this > error. > > I tried to make a simpler application that throws the same exception but I > was not able to do it. > > Then I tried to debug it in Visual Studio 2010 but if I debug then the > error does not appears. > > I cannot post the full application source code so we will give up it, > because it is not reproduceable. > > As a last word I would like to note that we have two windows 8 64 bit > computer and on both pc the software crashes. > > > > Regards, > > > > Zoltan > > *From:* Keith Rome > *Sent:* Wednesday, January 09, 2013 6:26 PM > *To:* Zsid? Zolt?n ; ironpython-users at python.org > *Subject:* RE: [Ironpython-users] crash on Win8 64bit at IronPython > expressionevaluation > > > Are you able to narrow down the problem to a small script that reproduces > it?**** > > **** > > The code pointed to in that call stack doesn?t really have many ways of > failing in that way (null reference). The most likely thing is that > DefaultContext.DefaultPythonContext is not being set. But I think that is > done for you when the scripting runtime is initialized.**** > > **** > > How are you creating the script runtime?**** > > **** > > Running from a background thread shouldn?t have any bearing on it, unless > this were a race issue. And since the crash is happening in a static ctor, > that pretty much rules out thread races.**** > > **** > > **** > > *Keith Rome* > > *Senior Consultant and Architect* > > MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS**** > > Wintellect | 770.617.4016 | mailto:rome at wintellect.com > **** > > www.wintellect.com**** > > **** > > *From:* Ironpython-users [mailto:ironpython-users-bounces+rome= > wintellect.com at python.org] *On Behalf Of *Zsid? Zolt?n > *Sent:* Wednesday, January 9, 2013 8:55 AM > *To:* ironpython-users at python.org > *Subject:* [Ironpython-users] crash on Win8 64bit at IronPython > expression evaluation**** > > **** > > Hi,**** > > **** > > We are using IronPython and Windows 8 long time, but now we have an > exception that only occurs on windows 8 64 bit. (We did not test on Windows > 8 32 bit but tested on Windows 7 32/64 bit where it is ok.)**** > > The application crashes at the first ironpython expression evaluating.**** > > I think it is important to note that we are using IronPython from a > background thread. We cannot debug it on windows 8. If this exception is > similar to you please help us.**** > > **** > > Thanks,**** > > Zoltan**** > > **** > > the stack trace:**** > > System.TypeInitializationException: The type initializer for > 'IronPython.Runtime.Converter' threw an exception. ---> > System.NullReferenceException: Object reference not set to an instance of > an object.**** > > at IronPython.Runtime.Converter.MakeConvertSite[T](ConversionResultKind > kind)**** > > at IronPython.Runtime.Converter.MakeExplicitConvertSite[T]()**** > > at IronPython.Runtime.Converter..cctor()**** > > --- End of inner exception stack trace ---**** > > at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type > fromType, Type toType)**** > > at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type > toType, NarrowingLevel allowNarrowing)**** > > at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type > fromType, Type toType, Boolean toNotNullable, NarrowingLevel level)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type > fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, > NarrowingLevel level)**** > > at > IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type > fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, > NarrowingLevel level)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate > candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, > CallFailure& failure)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 > candidates, NarrowingLevel level, List`1& failures)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet > targetSet)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String > methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel > maxLevel)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String > methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel > maxLevel)**** > > at > Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver > resolver, IList`1 targets, BindingRestrictions restrictions, String name, > NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target)** > ** > > at > IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] > newArgs)**** > > at > IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder > call, Expression codeContext, DynamicMetaObject function, > DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions > functionRestriction, Func`2 bind)**** > > at > IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder > call, Expression codeContext, DynamicMetaObject[] args)**** > > at > IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder > call, Expression codeContext, DynamicMetaObject[] args)**** > > at > IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder > pythonInvoke, Expression codeContext, DynamicMetaObject target, > DynamicMetaObject[] args)**** > > at > IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject > context, DynamicMetaObject target, DynamicMetaObject[] args)**** > > at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject > target, DynamicMetaObject[] args)**** > > at > Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder > binder, Int32 compilationThreshold, Object[] args)**** > > at > Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder > binder, Object[] args, Int32 compilationThreshold)**** > > at > IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 > site, PythonInvokeBinder binder, CodeContext state, Object[] args)**** > > at > IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 > site, Object[] args)**** > > at > System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, > Object[] args)**** > > at > System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2)**** > > at > Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame > frame)**** > > at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame > frame)**** > > at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 > arg0, T1 arg1)**** > > at > IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction > function, Object arg0)**** > > at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext > context, Object func, T0 arg0)**** > > at > System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2)**** > > at > Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame > frame)**** > > at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame > frame)**** > > at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 > arg0, T1 arg1)**** > > at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)**** > > at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx)*** > * > > at IronPython.Compiler.PythonScriptCode.Run(Scope scope)**** > > at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)**** > > at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)**** > > at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink > errorSink)**** > > at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)* > *** > > at CGS.CGS.ExecuteAssign(AssignAbs assign)**** > > at CGS.CGS.ModelPool_PropertyRead(Object sender, PropertyEventArgs e) > m: at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type > fromType, Type toType)**** > > at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type > toType, NarrowingLevel allowNarrowing)**** > > at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type > fromType, Type toType, Boolean toNotNullable, NarrowingLevel level)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type > fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, > NarrowingLevel level)**** > > at > IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type > fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, > NarrowingLevel level)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate > candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, > CallFailure& failure)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 > candidates, NarrowingLevel level, List`1& failures)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet > targetSet)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String > methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel > maxLevel)**** > > at > Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String > methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel > maxLevel)**** > > at > Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver > resolver, IList`1 targets, BindingRestrictions restrictions, String name, > NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target)** > ** > > at > IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] > newArgs)**** > > at > IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder > call, Expression codeContext, DynamicMetaObject function, > DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions > functionRestriction, Func`2 bind)**** > > at > IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder > call, Expression codeContext, DynamicMetaObject[] args)**** > > at > IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder > call, Expression codeContext, DynamicMetaObject[] args)**** > > at > IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder > pythonInvoke, Expression codeContext, DynamicMetaObject target, > DynamicMetaObject[] args)**** > > at > IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject > context, DynamicMetaObject target, DynamicMetaObject[] args)**** > > at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject > target, DynamicMetaObject[] args)**** > > at > Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder > binder, Int32 compilationThreshold, Object[] args)**** > > at > Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder > binder, Object[] args, Int32 compilationThreshold)**** > > at > IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 > site, PythonInvokeBinder binder, CodeContext state, Object[] args)**** > > at > IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 > site, Object[] args)**** > > at > System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, > Object[] args)**** > > at > System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2)**** > > at > Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame > frame)**** > > at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame > frame)**** > > at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 > arg0, T1 arg1)**** > > at > IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction > function, Object arg0)**** > > at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext > context, Object func, T0 arg0)**** > > at > System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite > site, T0 arg0, T1 arg1, T2 arg2)**** > > at > Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame > frame)**** > > at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame > frame)**** > > at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 > arg0, T1 arg1)**** > > at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)**** > > at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx)*** > * > > at IronPython.Compiler.PythonScriptCode.Run(Scope scope)**** > > at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)**** > > at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)**** > > at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink > errorSink)**** > > at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)* > *** > > **** > ** > > --------------------------------------------------------------------------------------------------- > *Ezt a sz?veget a Panda IS 2013 csatolta :* > > Amenyiben ez egy k?retlen e-mail ?zenet (SPAM), kattintson a k?vetkez? > linkre ?s min?s?tse ?jra: Ez egy SPAM! > > --------------------------------------------------------------------------------------------------- > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Jan 11 16:56:03 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 11 Jan 2013 07:56:03 -0800 Subject: [Ironpython-users] IronPython 2.7.3 with .NET 4.5 In-Reply-To: <90CF25803C44814EA1B29B33259679C601E0BB312D@sr01259> References: <90CF25803C44814EA1B29B33259679C601E0BB312D@sr01259> Message-ID: Not that I know of, but I don't think I've ever run the full test suite on a .NET 4.5 machine. The basic stuff works, but that doesn't mean it doesn't have some weird corner cases. - Jeff On Fri, Jan 11, 2013 at 12:59 AM, Piotr Nestorow < Piotr.Nestorow at systemverification.com> wrote: > Hi > Are there any known problems/issues when using IronPython 2.7.3 on a > Windows system with .NET 4.5 ? > > Best Regards > Piotr > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jdhardy at gmail.com Fri Jan 11 17:02:47 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Fri, 11 Jan 2013 08:02:47 -0800 Subject: [Ironpython-users] importing .net assembly as module in a package In-Reply-To: References: Message-ID: On Fri, Jan 11, 2013 at 6:37 AM, Pawel Jasinski wrote: > > hi, > > > I am looking for a way to use module created as .net assembly as part of the package > > So instead of having: > > import clr > clr.AddReferenceToFileAndPath(".\maplookup.dll") > import maplookup > > I prefer: > > import clr > clr.AddReferenceToFileAndPath(".\maplookup.dll") > import xmldiff.maplookup > > Is there any way to accomplish it? What is xmldiff? Is it an existing Python package? Also, is maplookup just a .NET class, or is it actually a PythonModule class? - Jeff From pawel.jasinski at gmail.com Fri Jan 11 18:00:34 2013 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Fri, 11 Jan 2013 18:00:34 +0100 Subject: [Ironpython-users] Fwd: importing .net assembly as module in a package In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Pawel Jasinski Date: Fri, Jan 11, 2013 at 5:58 PM Subject: Re: [Ironpython-users] importing .net assembly as module in a package To: Jeff Hardy On Fri, Jan 11, 2013 at 5:02 PM, Jeff Hardy wrote: > On Fri, Jan 11, 2013 at 6:37 AM, Pawel Jasinski > wrote: > > > > hi, > > > > > > I am looking for a way to use module created as .net assembly as part of > the package > > > > So instead of having: > > > > import clr > > clr.AddReferenceToFileAndPath(".\maplookup.dll") > > import maplookup > > > > I prefer: > > > > import clr > > clr.AddReferenceToFileAndPath(".\maplookup.dll") > > import xmldiff.maplookup > > > > Is there any way to accomplish it? > > What is xmldiff? Is it an existing Python package? > xmldiff is located in site-packages > > Also, is maplookup just a .NET class, or is it actually a PythonModule > class? > this is PythonModule class but compiled separately from IronPython [assembly: PythonModule("maplookup", typeof(maplookup.maplookup))] namespace maplookup { public static class maplookup { public const string __doc__ = "test string"; ... } I owe the explanation here. xmldiff is a python package with one module implemented as C extension What I am trying to do, is to port this C extension as .NET class. This would be analog to porting build-in C modules into .NET but outside of the IronPython. > > - Jeff > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvanderkolff at gmail.com Fri Jan 11 21:07:30 2013 From: mvanderkolff at gmail.com (Michael van der Kolff) Date: Sat, 12 Jan 2013 07:07:30 +1100 Subject: [Ironpython-users] Fwd: importing .net assembly as module in a package In-Reply-To: References: Message-ID: Why not just add xmldiff to maplookup's namespace? i.e. instead of namespace maplookup { public static class maplookup { public const string __doc__ = "test string"; ... } Write: namespace xmldiff.maplookup { public static class maplookup { public const string __doc__ = "test string"; ... } On Sat, Jan 12, 2013 at 4:00 AM, Pawel Jasinski wrote: > > > ---------- Forwarded message ---------- > From: Pawel Jasinski > Date: Fri, Jan 11, 2013 at 5:58 PM > Subject: Re: [Ironpython-users] importing .net assembly as module in a > package > To: Jeff Hardy > > > > > > On Fri, Jan 11, 2013 at 5:02 PM, Jeff Hardy wrote: >> >> On Fri, Jan 11, 2013 at 6:37 AM, Pawel Jasinski >> wrote: >> > >> > hi, >> > >> > >> > I am looking for a way to use module created as .net assembly as part of >> > the package >> > >> > So instead of having: >> > >> > import clr >> > clr.AddReferenceToFileAndPath(".\maplookup.dll") >> > import maplookup >> > >> > I prefer: >> > >> > import clr >> > clr.AddReferenceToFileAndPath(".\maplookup.dll") >> > import xmldiff.maplookup >> > >> > Is there any way to accomplish it? >> >> What is xmldiff? Is it an existing Python package? > > > xmldiff is located in site-packages > >> >> >> Also, is maplookup just a .NET class, or is it actually a PythonModule >> class? > > > > this is PythonModule class but compiled separately from IronPython > > [assembly: PythonModule("maplookup", typeof(maplookup.maplookup))] > > namespace maplookup { > public static class maplookup { > public const string __doc__ = "test string"; > ... > } > > I owe the explanation here. xmldiff is a python package with one module > implemented as C extension > What I am trying to do, is to port this C extension as .NET class. > This would be analog to porting build-in C modules into .NET but outside of > the IronPython. > >> >> >> - Jeff > > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > From pawel.jasinski at gmail.com Sat Jan 12 00:30:33 2013 From: pawel.jasinski at gmail.com (Pawel Jasinski) Date: Sat, 12 Jan 2013 00:30:33 +0100 Subject: [Ironpython-users] Fwd: importing .net assembly as module in a package In-Reply-To: References: Message-ID: Thanks for the idea The following appears to work as long as it is the only thing in xmldiff. [assembly: PythonModule("maplookup", typeof(xmldiff.maplookup))] namespace xmldiff { public static class maplookup { ... } however, if it try to mix it with other parts of the xmldiff package which are pure python, it is not visible anymore. for now the workaround is to create maplookup.py inside the xmldiff package and load things indirectly [assembly: PythonModule("_maplookup", typeof(xmldiff.maplookup))] namespace xmldiff { internal static class maplookup { ... } import sys if sys.platform=="cli": import os import clr clr.AddReferenceToFileAndPath(os.path.join(os.path.dirname(__file__),r'maplookup.dll')) from _maplookup import * On Fri, Jan 11, 2013 at 9:07 PM, Michael van der Kolff < mvanderkolff at gmail.com> wrote: > Why not just add xmldiff to maplookup's namespace? i.e. instead of > namespace maplookup { > public static class maplookup { > public const string __doc__ = "test string"; > ... > } > Write: > namespace xmldiff.maplookup { > public static class maplookup { > public const string __doc__ = "test string"; > ... > } > > On Sat, Jan 12, 2013 at 4:00 AM, Pawel Jasinski > wrote: > > > > > > ---------- Forwarded message ---------- > > From: Pawel Jasinski > > Date: Fri, Jan 11, 2013 at 5:58 PM > > Subject: Re: [Ironpython-users] importing .net assembly as module in a > > package > > To: Jeff Hardy > > > > > > > > > > > > On Fri, Jan 11, 2013 at 5:02 PM, Jeff Hardy wrote: > >> > >> On Fri, Jan 11, 2013 at 6:37 AM, Pawel Jasinski > >> wrote: > >> > > >> > hi, > >> > > >> > > >> > I am looking for a way to use module created as .net assembly as part > of > >> > the package > >> > > >> > So instead of having: > >> > > >> > import clr > >> > clr.AddReferenceToFileAndPath(".\maplookup.dll") > >> > import maplookup > >> > > >> > I prefer: > >> > > >> > import clr > >> > clr.AddReferenceToFileAndPath(".\maplookup.dll") > >> > import xmldiff.maplookup > >> > > >> > Is there any way to accomplish it? > >> > >> What is xmldiff? Is it an existing Python package? > > > > > > xmldiff is located in site-packages > > > >> > >> > >> Also, is maplookup just a .NET class, or is it actually a PythonModule > >> class? > > > > > > > > this is PythonModule class but compiled separately from IronPython > > > > [assembly: PythonModule("maplookup", typeof(maplookup.maplookup))] > > > > namespace maplookup { > > public static class maplookup { > > public const string __doc__ = "test string"; > > ... > > } > > > > I owe the explanation here. xmldiff is a python package with one module > > implemented as C extension > > What I am trying to do, is to port this C extension as .NET class. > > This would be analog to porting build-in C modules into .NET but outside > of > > the IronPython. > > > >> > >> > >> - Jeff > > > > > > > > > > _______________________________________________ > > Ironpython-users mailing list > > Ironpython-users at python.org > > http://mail.python.org/mailman/listinfo/ironpython-users > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Sat Jan 12 11:02:01 2013 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 12 Jan 2013 02:02:01 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 1/11/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] DAQMX Code which works fine with "Python 2.7.3" giving issue with IRONPYTHON 2. [New comment] DAQmxCreateDOChan() code which works in python does not works with ironpython 3. [New comment] Importing & reloading module leaks memory ---------------------------------------------- ISSUES 1. [New comment] DAQMX Code which works fine with "Python 2.7.3" giving issue with IRONPYTHON http://ironpython.codeplex.com/workitem/33648 User jdhardy has commented on the issue: "I'm guessing it's a ctypes issue (IronPython's ctypes is not 100%). What's the value of taskHandle0?"----------------- 2. [New comment] DAQmxCreateDOChan() code which works in python does not works with ironpython http://ironpython.codeplex.com/workitem/33649 User jdhardy has commented on the issue: "Is this the same issue as http://ironpython.codeplex.com/workitem/33648?"----------------- 3. [New comment] Importing & reloading module leaks memory http://ironpython.codeplex.com/workitem/33650 User MarkusSchaber has commented on the issue: "This issue _might_ be related to https://ironpython.codeplex.com/workitem/31764, but not sure about it..." ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvanderkolff at gmail.com Tue Jan 15 04:30:46 2013 From: mvanderkolff at gmail.com (Michael van der Kolff) Date: Tue, 15 Jan 2013 14:30:46 +1100 Subject: [Ironpython-users] super() with classmethod - deviation from CPython 2.7 behaviour Message-ID: Using the following script: class A(object): @classmethod def x(cls): print cls.__name__ class B(A): @classmethod def x(cls): super(B,cls).x() class C(B): pass class D(B): @classmethod def x(cls): super(D,cls).x() if __name__ == "__main__": B.x() C.x() D.x() using CPython 2.7.3 (win32 build), I get the following: B C D Under IronPython 2.7.3 (64 & 32 bit builds), I get the following: B B B This also occurs for other class properties, e.g. __doc__ or other classmethods - i.e. super() is improperly changing which class object is passed in. Cheers, Michael From slide.o.mix at gmail.com Tue Jan 15 05:04:12 2013 From: slide.o.mix at gmail.com (Slide) Date: Mon, 14 Jan 2013 21:04:12 -0700 Subject: [Ironpython-users] super() with classmethod - deviation from CPython 2.7 behaviour In-Reply-To: References: Message-ID: Can you file an issue on codeplex please? On Mon, Jan 14, 2013 at 8:30 PM, Michael van der Kolff < mvanderkolff at gmail.com> wrote: > Using the following script: > class A(object): > @classmethod > def x(cls): > print cls.__name__ > > class B(A): > @classmethod > def x(cls): > super(B,cls).x() > > class C(B): > pass > > class D(B): > @classmethod > def x(cls): > super(D,cls).x() > > if __name__ == "__main__": > B.x() > C.x() > D.x() > > using CPython 2.7.3 (win32 build), I get the following: > B > C > D > > Under IronPython 2.7.3 (64 & 32 bit builds), I get the following: > B > B > B > > This also occurs for other class properties, e.g. __doc__ or other > classmethods - i.e. super() is improperly changing which class object > is passed in. > > Cheers, > > > Michael > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvanderkolff at gmail.com Tue Jan 15 05:59:38 2013 From: mvanderkolff at gmail.com (Michael van der Kolff) Date: Tue, 15 Jan 2013 15:59:38 +1100 Subject: [Ironpython-users] super() with classmethod - deviation from CPython 2.7 behaviour In-Reply-To: References: Message-ID: http://ironpython.codeplex.com/workitem/33663 Cheers, Michael On Tue, Jan 15, 2013 at 3:04 PM, Slide wrote: > Can you file an issue on codeplex please? > > > On Mon, Jan 14, 2013 at 8:30 PM, Michael van der Kolff > wrote: >> >> Using the following script: >> class A(object): >> @classmethod >> def x(cls): >> print cls.__name__ >> >> class B(A): >> @classmethod >> def x(cls): >> super(B,cls).x() >> >> class C(B): >> pass >> >> class D(B): >> @classmethod >> def x(cls): >> super(D,cls).x() >> >> if __name__ == "__main__": >> B.x() >> C.x() >> D.x() >> >> using CPython 2.7.3 (win32 build), I get the following: >> B >> C >> D >> >> Under IronPython 2.7.3 (64 & 32 bit builds), I get the following: >> B >> B >> B >> >> This also occurs for other class properties, e.g. __doc__ or other >> classmethods - i.e. super() is improperly changing which class object >> is passed in. >> >> Cheers, >> >> >> Michael >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users > > > > > -- > Website: http://earl-of-code.com From zsidoz at innodev.hu Tue Jan 15 12:51:06 2013 From: zsidoz at innodev.hu (=?windows-1252?Q?Zsid=F3_Zolt=E1n?=) Date: Tue, 15 Jan 2013 12:51:06 +0100 Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation In-Reply-To: References: <478B4630361A43BEA481D28D38F32170@ZsidozPC> <4C554C3A47C5024ABDE00E94DA17BC4D2D7D07DC@BN1PRD0712MB633.namprd07.prod.outlook.com> <4D60BB1D64864DC2BB35678DC45B39D9@ZsidozPC> Message-ID: <36440CB205794BC880E3C27BC30B9824@ZsidozPC> Hi Jeff, You were right. On windows 7 I managed to reproduce the error when I installed .net 4.5. Unfortunately I still cannot make a simpler application that can reproduce it. And if I debug it then it works on Windows 7. I have found that .net 4.0 and 4.5 cannot work side-by-side, so my next step will be downgrading my application to 3.5. Or do you have better idea? Zoltan From: Jeff Hardy Sent: Friday, January 11, 2013 4:54 PM To: Zsid? Zolt?n Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation What version of .NET is installed on the Windows 7 machines? I wonder if this is a .NET 4.5 vs. .NET 4 issue and not a Win8 vs Win7 issue. - Jeff On Thu, Jan 10, 2013 at 11:43 PM, Zsid? Zolt?n wrote: Keith, you are absolutely right. Not the background thread causes this error. I tried to make a simpler application that throws the same exception but I was not able to do it. Then I tried to debug it in Visual Studio 2010 but if I debug then the error does not appears. I cannot post the full application source code so we will give up it, because it is not reproduceable. As a last word I would like to note that we have two windows 8 64 bit computer and on both pc the software crashes. Regards, Zoltan From: Keith Rome Sent: Wednesday, January 09, 2013 6:26 PM To: Zsid? Zolt?n ; ironpython-users at python.org Subject: RE: [Ironpython-users] crash on Win8 64bit at IronPython expressionevaluation Are you able to narrow down the problem to a small script that reproduces it? The code pointed to in that call stack doesn?t really have many ways of failing in that way (null reference). The most likely thing is that DefaultContext.DefaultPythonContext is not being set. But I think that is done for you when the scripting runtime is initialized. How are you creating the script runtime? Running from a background thread shouldn?t have any bearing on it, unless this were a race issue. And since the crash is happening in a static ctor, that pretty much rules out thread races. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | mailto:rome at wintellect.com www.wintellect.com From: Ironpython-users [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Zsid? Zolt?n Sent: Wednesday, January 9, 2013 8:55 AM To: ironpython-users at python.org Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation Hi, We are using IronPython and Windows 8 long time, but now we have an exception that only occurs on windows 8 64 bit. (We did not test on Windows 8 32 bit but tested on Windows 7 32/64 bit where it is ok.) The application crashes at the first ironpython expression evaluating. I think it is important to note that we are using IronPython from a background thread. We cannot debug it on windows 8. If this exception is similar to you please help us. Thanks, Zoltan the stack trace: System.TypeInitializationException: The type initializer for 'IronPython.Runtime.Converter' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object. at IronPython.Runtime.Converter.MakeConvertSite[T](ConversionResultKind kind) at IronPython.Runtime.Converter.MakeExplicitConvertSite[T]() at IronPython.Runtime.Converter..cctor() --- End of inner exception stack trace --- at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type fromType, Type toType) at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type toType, NarrowingLevel allowNarrowing) at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type fromType, Type toType, Boolean toNotNullable, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, NarrowingLevel level) at IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, CallFailure& failure) at Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 candidates, NarrowingLevel level, List`1& failures) at Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver resolver, IList`1 targets, BindingRestrictions restrictions, String name, NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target) at IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] newArgs) at IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject function, DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions functionRestriction, Func`2 bind) at IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder pythonInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject context, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder binder, Int32 compilationThreshold, Object[] args) at Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder binder, Object[] args, Int32 compilationThreshold) at IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 site, PythonInvokeBinder binder, CodeContext state, Object[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at CGS.CGS.ExecuteAssign(AssignAbs assign) at CGS.CGS.ModelPool_PropertyRead(Object sender, PropertyEventArgs e) m: at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type fromType, Type toType) at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type toType, NarrowingLevel allowNarrowing) at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type fromType, Type toType, Boolean toNotNullable, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, NarrowingLevel level) at IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, CallFailure& failure) at Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 candidates, NarrowingLevel level, List`1& failures) at Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver resolver, IList`1 targets, BindingRestrictions restrictions, String name, NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target) at IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] newArgs) at IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject function, DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions functionRestriction, Func`2 bind) at IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder pythonInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject context, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder binder, Int32 compilationThreshold, Object[] args) at Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder binder, Object[] args, Int32 compilationThreshold) at IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 site, PythonInvokeBinder binder, CodeContext state, Object[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) --------------------------------------------------------------------------------------------------- Ezt a sz?veget a Panda IS 2013 csatolta : Amenyiben ez egy k?retlen e-mail ?zenet (SPAM), kattintson a k?vetkez? linkre ?s min?s?tse ?jra: Ez egy SPAM! --------------------------------------------------------------------------------------------------- _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users --------------------------------------------------------------------------------------------------- Ezt a sz?veget a Panda IS 2013 csatolta : Amenyiben ez egy k?retlen e-mail ?zenet (SPAM), kattintson a k?vetkez? linkre ?s min?s?tse ?jra: Ez egy SPAM! --------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From no_reply at codeplex.com Tue Jan 15 13:16:10 2013 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 15 Jan 2013 04:16:10 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 1/14/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] GetEncodings called in StringOps.cs fails using Mono 2. [New issue] super() does not preserve class ---------------------------------------------- ISSUES 1. [New comment] GetEncodings called in StringOps.cs fails using Mono http://ironpython.codeplex.com/workitem/33646 User TRJG has commented on the issue: "I just added a patch for the fix. Line 1885 in StringOps.cs All I did was wrap the encoding name accessing in a try catch. If it fails, continue is called to try the next encoding."----------------- 2. [New issue] super() does not preserve class http://ironpython.codeplex.com/workitem/33663 User mvdk has proposed the issue: "In CPython 2.7.3, the following script: class A(object): """A funny class A""" @classmethod def x(cls): print cls.__doc__ class B(A): """B funny class B""" @classmethod def x(cls): super(B,cls).x() class C(B): """C funny class C""" pass class D(B): """D funny class D""" @classmethod def x(cls): super(D,cls).x() if __name__ == "__main__": B.x() C.x() D.x() produces B C D whereas on IronPython 2.7.3, it produces B B B This is independent of @classmethod: The following also triggers: class A(object): """A funny class A""" def x(cls): print cls.__doc__ class B(A): """B funny class B""" def x(cls): super(B,cls).x() class C(B): """C funny class C""" pass class D(B): """D funny class D""" def x(cls): super(D,cls).x() if __name__ == "__main__": B().x() C().x() D().x() with the same output" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Tue Jan 15 15:44:20 2013 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Tue, 15 Jan 2013 06:44:20 -0800 Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation In-Reply-To: <36440CB205794BC880E3C27BC30B9824@ZsidozPC> References: <478B4630361A43BEA481D28D38F32170@ZsidozPC> <4C554C3A47C5024ABDE00E94DA17BC4D2D7D07DC@BN1PRD0712MB633.namprd07.prod.outlook.com> <4D60BB1D64864DC2BB35678DC45B39D9@ZsidozPC> <36440CB205794BC880E3C27BC30B9824@ZsidozPC> Message-ID: Is it possible to launch the application directly and then attach the debugger to it before the code in question executes? How is the background thread created? On Tue, Jan 15, 2013 at 3:51 AM, Zsid? Zolt?n wrote: > Hi Jeff, > > > > You were right. > > On windows 7 I managed to reproduce the error when I installed .net 4.5. > > Unfortunately I still cannot make a simpler application that can reproduce > it. > > And if I debug it then it works on Windows 7. > > I have found that .net 4.0 and 4.5 cannot work side-by-side, so my next > step will be downgrading my application to 3.5. > > > > Or do you have better idea? > > > > Zoltan > > > *From:* Jeff Hardy > *Sent:* Friday, January 11, 2013 4:54 PM > *To:* Zsid? Zolt?n > *Cc:* ironpython-users at python.org > *Subject:* Re: [Ironpython-users] crash on Win8 64bit at IronPython > expression evaluation > > What version of .NET is installed on the Windows 7 machines? I wonder if > this is a .NET 4.5 vs. .NET 4 issue and not a Win8 vs Win7 issue. > > - Jeff > > > On Thu, Jan 10, 2013 at 11:43 PM, Zsid? Zolt?n wrote: > >> Keith, you are absolutely right. Not the background thread causes this >> error. >> >> I tried to make a simpler application that throws the same exception but >> I was not able to do it. >> >> Then I tried to debug it in Visual Studio 2010 but if I debug then the >> error does not appears. >> >> I cannot post the full application source code so we will give up it, >> because it is not reproduceable. >> >> As a last word I would like to note that we have two windows 8 64 bit >> computer and on both pc the software crashes. >> >> >> >> Regards, >> >> >> >> Zoltan >> >> *From:* Keith Rome >> *Sent:* Wednesday, January 09, 2013 6:26 PM >> *To:* Zsid? Zolt?n ; ironpython-users at python.org >> *Subject:* RE: [Ironpython-users] crash on Win8 64bit at IronPython >> expressionevaluation >> >> >> Are you able to narrow down the problem to a small script that reproduces >> it?**** >> >> **** >> >> The code pointed to in that call stack doesn?t really have many ways of >> failing in that way (null reference). The most likely thing is that >> DefaultContext.DefaultPythonContext is not being set. But I think that is >> done for you when the scripting runtime is initialized.**** >> >> **** >> >> How are you creating the script runtime?**** >> >> **** >> >> Running from a background thread shouldn?t have any bearing on it, unless >> this were a race issue. And since the crash is happening in a static ctor, >> that pretty much rules out thread races.**** >> >> **** >> >> **** >> >> *Keith Rome* >> >> *Senior Consultant and Architect* >> >> MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS**** >> >> Wintellect | 770.617.4016 | mailto:rome at wintellect.com >> **** >> >> www.wintellect.com**** >> >> **** >> >> *From:* Ironpython-users [mailto:ironpython-users-bounces+rome= >> wintellect.com at python.org] *On Behalf Of *Zsid? Zolt?n >> *Sent:* Wednesday, January 9, 2013 8:55 AM >> *To:* ironpython-users at python.org >> *Subject:* [Ironpython-users] crash on Win8 64bit at IronPython >> expression evaluation**** >> >> **** >> >> Hi,**** >> >> **** >> >> We are using IronPython and Windows 8 long time, but now we have an >> exception that only occurs on windows 8 64 bit. (We did not test on Windows >> 8 32 bit but tested on Windows 7 32/64 bit where it is ok.)**** >> >> The application crashes at the first ironpython expression evaluating.*** >> * >> >> I think it is important to note that we are using IronPython from a >> background thread. We cannot debug it on windows 8. If this exception is >> similar to you please help us.**** >> >> **** >> >> Thanks,**** >> >> Zoltan**** >> >> **** >> >> the stack trace:**** >> >> System.TypeInitializationException: The type initializer for >> 'IronPython.Runtime.Converter' threw an exception. ---> >> System.NullReferenceException: Object reference not set to an instance of >> an object.**** >> >> at >> IronPython.Runtime.Converter.MakeConvertSite[T](ConversionResultKind kind) >> **** >> >> at IronPython.Runtime.Converter.MakeExplicitConvertSite[T]()**** >> >> at IronPython.Runtime.Converter..cctor()**** >> >> --- End of inner exception stack trace ---**** >> >> at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type >> fromType, Type toType)**** >> >> at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type >> toType, NarrowingLevel allowNarrowing)**** >> >> at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type >> fromType, Type toType, Boolean toNotNullable, NarrowingLevel level)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type >> fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, >> NarrowingLevel level)**** >> >> at >> IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type >> fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, >> NarrowingLevel level)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate >> candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, >> CallFailure& failure)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 >> candidates, NarrowingLevel level, List`1& failures)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet >> targetSet)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String >> methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel >> maxLevel)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String >> methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel >> maxLevel)**** >> >> at >> Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver >> resolver, IList`1 targets, BindingRestrictions restrictions, String name, >> NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target)* >> *** >> >> at >> IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] >> newArgs)**** >> >> at >> IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder >> call, Expression codeContext, DynamicMetaObject function, >> DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions >> functionRestriction, Func`2 bind)**** >> >> at >> IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder >> call, Expression codeContext, DynamicMetaObject[] args)**** >> >> at >> IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder >> call, Expression codeContext, DynamicMetaObject[] args)**** >> >> at >> IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder >> pythonInvoke, Expression codeContext, DynamicMetaObject target, >> DynamicMetaObject[] args)**** >> >> at >> IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject >> context, DynamicMetaObject target, DynamicMetaObject[] args)**** >> >> at >> IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject >> target, DynamicMetaObject[] args)**** >> >> at >> Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder >> binder, Int32 compilationThreshold, Object[] args)**** >> >> at >> Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder >> binder, Object[] args, Int32 compilationThreshold)**** >> >> at >> IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 >> site, PythonInvokeBinder binder, CodeContext state, Object[] args)**** >> >> at >> IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 >> site, Object[] args)**** >> >> at >> System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, >> Object[] args)**** >> >> at >> System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite >> site, T0 arg0, T1 arg1, T2 arg2)**** >> >> at >> Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame >> frame)**** >> >> at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame >> frame)**** >> >> at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 >> arg0, T1 arg1)**** >> >> at >> IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction >> function, Object arg0)**** >> >> at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, >> CodeContext context, Object func, T0 arg0)**** >> >> at >> System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite >> site, T0 arg0, T1 arg1, T2 arg2)**** >> >> at >> Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame >> frame)**** >> >> at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame >> frame)**** >> >> at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 >> arg0, T1 arg1)**** >> >> at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)**** >> >> at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx)** >> ** >> >> at IronPython.Compiler.PythonScriptCode.Run(Scope scope)**** >> >> at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)**** >> >> at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)**** >> >> at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink >> errorSink)**** >> >> at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) >> **** >> >> at CGS.CGS.ExecuteAssign(AssignAbs assign)**** >> >> at CGS.CGS.ModelPool_PropertyRead(Object sender, PropertyEventArgs e) >> m: at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type >> fromType, Type toType)**** >> >> at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type >> toType, NarrowingLevel allowNarrowing)**** >> >> at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type >> fromType, Type toType, Boolean toNotNullable, NarrowingLevel level)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type >> fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, >> NarrowingLevel level)**** >> >> at >> IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type >> fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, >> NarrowingLevel level)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate >> candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, >> CallFailure& failure)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 >> candidates, NarrowingLevel level, List`1& failures)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet >> targetSet)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String >> methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel >> maxLevel)**** >> >> at >> Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String >> methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel >> maxLevel)**** >> >> at >> Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver >> resolver, IList`1 targets, BindingRestrictions restrictions, String name, >> NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target)* >> *** >> >> at >> IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] >> newArgs)**** >> >> at >> IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder >> call, Expression codeContext, DynamicMetaObject function, >> DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions >> functionRestriction, Func`2 bind)**** >> >> at >> IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder >> call, Expression codeContext, DynamicMetaObject[] args)**** >> >> at >> IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder >> call, Expression codeContext, DynamicMetaObject[] args)**** >> >> at >> IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder >> pythonInvoke, Expression codeContext, DynamicMetaObject target, >> DynamicMetaObject[] args)**** >> >> at >> IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject >> context, DynamicMetaObject target, DynamicMetaObject[] args)**** >> >> at >> IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject >> target, DynamicMetaObject[] args)**** >> >> at >> Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder >> binder, Int32 compilationThreshold, Object[] args)**** >> >> at >> Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder >> binder, Object[] args, Int32 compilationThreshold)**** >> >> at >> IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 >> site, PythonInvokeBinder binder, CodeContext state, Object[] args)**** >> >> at >> IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 >> site, Object[] args)**** >> >> at >> System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, >> Object[] args)**** >> >> at >> System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite >> site, T0 arg0, T1 arg1, T2 arg2)**** >> >> at >> Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame >> frame)**** >> >> at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame >> frame)**** >> >> at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 >> arg0, T1 arg1)**** >> >> at >> IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction >> function, Object arg0)**** >> >> at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, >> CodeContext context, Object func, T0 arg0)**** >> >> at >> System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite >> site, T0 arg0, T1 arg1, T2 arg2)**** >> >> at >> Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame >> frame)**** >> >> at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame >> frame)**** >> >> at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 >> arg0, T1 arg1)**** >> >> at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)**** >> >> at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx)** >> ** >> >> at IronPython.Compiler.PythonScriptCode.Run(Scope scope)**** >> >> at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)**** >> >> at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)**** >> >> at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink >> errorSink)**** >> >> at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) >> **** >> >> **** >> ** >> >> --------------------------------------------------------------------------------------------------- >> *Ezt a sz?veget a Panda IS 2013 csatolta :* >> >> Amenyiben ez egy k?retlen e-mail ?zenet (SPAM), kattintson a k?vetkez? >> linkre ?s min?s?tse ?jra: Ez egy SPAM! >> >> --------------------------------------------------------------------------------------------------- >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> >> > > > > --------------------------------------------------------------------------------------------------- > *Ezt a sz?veget a Panda IS 2013 csatolta :* > > Amenyiben ez egy k?retlen e-mail ?zenet (SPAM), kattintson a k?vetkez? > linkre ?s min?s?tse ?jra: Ez egy SPAM! > > --------------------------------------------------------------------------------------------------- > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruno.gallart at orange.fr Wed Jan 16 17:05:37 2013 From: bruno.gallart at orange.fr (bruno gallart) Date: Wed, 16 Jan 2013 17:05:37 +0100 Subject: [Ironpython-users] Ironpython works with Framework 4 all or framework client profile ? Message-ID: <50F6CFD1.2000707@orange.fr> Hi all, My question is in the title. I should like to be sure. I did a program and I want to install it on another pc that have not framework 4.0 installed. If I install Framework 4.0 client profile (smaller) my program does not work. If I install the Framework full, it works. Conclusion : Ironpython works with the framework full, is it right ? It is not possible to install a smaller version of Microsoft Framework with IronPython like Framework client profile ? Thanks if somebody can give me some informations about that, Cheers, Bruno From m.schaber at codesys.com Wed Jan 16 17:27:25 2013 From: m.schaber at codesys.com (Markus Schaber) Date: Wed, 16 Jan 2013 16:27:25 +0000 Subject: [Ironpython-users] Ironpython works with Framework 4 all or framework client profile ? In-Reply-To: <50F6CFD1.2000707@orange.fr> References: <50F6CFD1.2000707@orange.fr> Message-ID: <727D8E16AE957149B447FE368139F2B50D9FC51C@SERVER10> Hi, Bruno, Von: bruno gallart > My question is in the title. I should like to be sure. > > I did a program and I want to install it on another pc that have not > framework 4.0 installed. > If I install Framework 4.0 client profile (smaller) my program does not > work. If I install the Framework full, it works. > > Conclusion : Ironpython works with the framework full, is it right ? It is > not possible to install a smaller version of Microsoft Framework with > IronPython like Framework client profile ? > > Thanks if somebody can give me some informations about that, What exactly do you mean with "does not work"? Is there any exception? Maybe your program does something which requires the full framework functionality, and it's not necessarily IronPython's fault... Best regards Markus Schaber CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH Inspiring Automation Solutions 3S-Smart Software Solutions GmbH Dipl.-Inf. Markus Schaber | Product Development Core Technology Memminger Str. 151 | 87439 Kempten | Germany Tel. +49-831-54031-979 | Fax +49-831-54031-50 E-Mail: m.schaber at codesys.com | Web: http://www.codesys.com CODESYS internet forum: http://forum.codesys.com Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 From bruno.gallart at orange.fr Wed Jan 16 17:54:48 2013 From: bruno.gallart at orange.fr (bruno gallart) Date: Wed, 16 Jan 2013 17:54:48 +0100 Subject: [Ironpython-users] Ironpython works with Framework 4 all or framework client profile ? In-Reply-To: <727D8E16AE957149B447FE368139F2B50D9FC51C@SERVER10> References: <50F6CFD1.2000707@orange.fr> <727D8E16AE957149B447FE368139F2B50D9FC51C@SERVER10> Message-ID: <50F6DB58.1070309@orange.fr> Sorry , I don't say that it is the fault of Ironpython. More precisions: My program is created with Winforms and with Nhunspell (that is the version of spellchecker Hunspell for Net). My program is a little spellchecker for Word and for this I use the Reference('Microsoft.Office.Interop.Word'). When I run my program it asks to me that it needs the Framework 4.0 "you first must install one of the following version of .Net framework:. Net Framework, version=v4.0" but the FrameWork 4.0 client profile is installed on this PC. I don't think that Winforms and NHunspell need the full Framework 4.0 but maybe the "Microsoft.Office.Interop.Word". Am I right ? Bruno Le 16/01/2013 17:27, Markus Schaber a ?crit : > Hi, Bruno, > > > Von: bruno gallart > >> My question is in the title. I should like to be sure. >> >> I did a program and I want to install it on another pc that have not >> framework 4.0 installed. >> If I install Framework 4.0 client profile (smaller) my program does not >> work. If I install the Framework full, it works. >> >> Conclusion : Ironpython works with the framework full, is it right ? It is >> not possible to install a smaller version of Microsoft Framework with >> IronPython like Framework client profile ? >> >> Thanks if somebody can give me some informations about that, > What exactly do you mean with "does not work"? Is there any exception? > > Maybe your program does something which requires the full framework functionality, and it's not necessarily IronPython's fault... > > > Best regards > > Markus Schaber > > CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH > > Inspiring Automation Solutions > > 3S-Smart Software Solutions GmbH > Dipl.-Inf. Markus Schaber | Product Development Core Technology > Memminger Str. 151 | 87439 Kempten | Germany > Tel. +49-831-54031-979 | Fax +49-831-54031-50 > > E-Mail: m.schaber at codesys.com | Web: http://www.codesys.com > CODESYS internet forum: http://forum.codesys.com > > Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 > -------------- next part -------------- An HTML attachment was scrubbed... URL: From curt at hagenlocher.org Wed Jan 16 18:06:08 2013 From: curt at hagenlocher.org (Curt Hagenlocher) Date: Wed, 16 Jan 2013 09:06:08 -0800 Subject: [Ironpython-users] Ironpython works with Framework 4 all or framework client profile ? In-Reply-To: <50F6DB58.1070309@orange.fr> References: <50F6CFD1.2000707@orange.fr> <727D8E16AE957149B447FE368139F2B50D9FC51C@SERVER10> <50F6DB58.1070309@orange.fr> Message-ID: It's possible that this is a consequence of the TargetFrameworkAttribute that's on the assemblies. It's set to [assembly: TargetFramework(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")] rather than [assembly: TargetFramework(".NETFramework,Version=v4.0,Profile=Client", FrameworkDisplayName = ".NET Framework 4 Client Profile")] On Wed, Jan 16, 2013 at 8:54 AM, bruno gallart wrote: > Sorry , I don't say that it is the fault of Ironpython. > > More precisions: > My program is created with Winforms and with Nhunspell (that is the > version of spellchecker Hunspell for Net). My program is a little > spellchecker for Word and for this I use the Reference( > 'Microsoft.Office.Interop.Word'). > > When I run my program it asks to me that it needs the Framework 4.0 > "you first must install one of the following version of .Net framework:. > Net Framework, version=v4.0" > but the FrameWork 4.0 client profile is installed on this PC. > > I don't think that Winforms and NHunspell need the full Framework 4.0 but > maybe the "Microsoft.Office.Interop.Word". Am I right ? > > Bruno > > > Le 16/01/2013 17:27, Markus Schaber a ?crit : > > Hi, Bruno, > > > Von: bruno gallart > > > My question is in the title. I should like to be sure. > > I did a program and I want to install it on another pc that have not > framework 4.0 installed. > If I install Framework 4.0 client profile (smaller) my program does not > work. If I install the Framework full, it works. > > Conclusion : Ironpython works with the framework full, is it right ? It is > not possible to install a smaller version of Microsoft Framework with > IronPython like Framework client profile ? > > Thanks if somebody can give me some informations about that, > > What exactly do you mean with "does not work"? Is there any exception? > > Maybe your program does something which requires the full framework functionality, and it's not necessarily IronPython's fault... > > > Best regards > > Markus Schaber > > CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH > > Inspiring Automation Solutions > > 3S-Smart Software Solutions GmbH > Dipl.-Inf. Markus Schaber | Product Development Core Technology > Memminger Str. 151 | 87439 Kempten | Germany > Tel. +49-831-54031-979 | Fax +49-831-54031-50 > > E-Mail: m.schaber at codesys.com | Web: http://www.codesys.com > CODESYS internet forum: http://forum.codesys.com > > Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 > > > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruno.gallart at orange.fr Wed Jan 16 18:58:50 2013 From: bruno.gallart at orange.fr (bruno gallart) Date: Wed, 16 Jan 2013 18:58:50 +0100 Subject: [Ironpython-users] [resolved] Ironpython works with Framework 4 all or framework client profile ? In-Reply-To: References: <50F6CFD1.2000707@orange.fr> <727D8E16AE957149B447FE368139F2B50D9FC51C@SERVER10> <50F6DB58.1070309@orange.fr> Message-ID: <50F6EA5A.1060400@orange.fr> Hi Curt, I have developed this program with SharpDevelop. I saw in the xml's file "app.config" this configuration's line and it was this: Well, I am newbee on .Net (I know Python/CPython) i did not paid attention to this line, sorry. I did your modification, it works good. Thanks a lot Curt and Markus, Cheers, Bruno Le 16/01/2013 18:06, Curt Hagenlocher a ?crit : > It's possible that this is a consequence of the > TargetFrameworkAttribute that's on the assemblies. It's set to > [assembly: TargetFramework(".NETFramework,Version=v4.0", > FrameworkDisplayName = ".NET Framework 4")] > > rather than > [assembly: > TargetFramework(".NETFramework,Version=v4.0,Profile=Client", > FrameworkDisplayName = ".NET Framework 4 Client Profile")] > On Wed, Jan 16, 2013 at 8:54 AM, bruno gallart > > wrote: > > Sorry , I don't say that it is the fault of Ironpython. > > More precisions: > My program is created with Winforms and with Nhunspell (that is > the version of spellchecker Hunspell for Net). My program is a > little spellchecker for Word and for this I use the > Reference('Microsoft.Office.Interop.Word'). > > When I run my program it asks to me that it needs the Framework 4.0 > "you first must install one of the following version of .Net > framework:. Net Framework, version=v4.0" > but the FrameWork 4.0 client profile is installed on this PC. > > I don't think that Winforms and NHunspell need the full Framework > 4.0 but maybe the "Microsoft.Office.Interop.Word". Am I right ? > > Bruno > > > Le 16/01/2013 17:27, Markus Schaber a ?crit : >> Hi, Bruno, >> >> >> Von: bruno gallart >> >>> My question is in the title. I should like to be sure. >>> >>> I did a program and I want to install it on another pc that have not >>> framework 4.0 installed. >>> If I install Framework 4.0 client profile (smaller) my program does not >>> work. If I install the Framework full, it works. >>> >>> Conclusion : Ironpython works with the framework full, is it right ? It is >>> not possible to install a smaller version of Microsoft Framework with >>> IronPython like Framework client profile ? >>> >>> Thanks if somebody can give me some informations about that, >> What exactly do you mean with "does not work"? Is there any exception? >> >> Maybe your program does something which requires the full framework functionality, and it's not necessarily IronPython's fault... >> >> >> Best regards >> >> Markus Schaber >> >> CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH >> >> Inspiring Automation Solutions >> >> 3S-Smart Software Solutions GmbH >> Dipl.-Inf. Markus Schaber | Product Development Core Technology >> Memminger Str. 151 | 87439 Kempten | Germany >> Tel.+49-831-54031-979 | Fax+49-831-54031-50 >> >> E-Mail:m.schaber at codesys.com | Web:http://www.codesys.com >> CODESYS internet forum:http://forum.codesys.com >> >> Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 >> > > > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruno.gallart at orange.fr Wed Jan 16 18:59:41 2013 From: bruno.gallart at orange.fr (bruno gallart) Date: Wed, 16 Jan 2013 18:59:41 +0100 Subject: [Ironpython-users] [resolved] Ironpython works with Framework 4 all or framework client profile ? In-Reply-To: <50F6EA5A.1060400@orange.fr> References: <50F6CFD1.2000707@orange.fr> <727D8E16AE957149B447FE368139F2B50D9FC51C@SERVER10> <50F6DB58.1070309@orange.fr> <50F6EA5A.1060400@orange.fr> Message-ID: <50F6EA8D.3060909@orange.fr> Hi Curt, I have developed this program with SharpDevelop. I saw in the xml's file "app.config" this configuration's line and it was this: Well, I am newbee on .Net (I know Python/CPython) i did not paid attention to this line, sorry. I did your modification, it works good. Thanks a lot Curt and Markus, Cheers, Bruno > > > > > Le 16/01/2013 18:06, Curt Hagenlocher a ?crit : >> It's possible that this is a consequence of the >> TargetFrameworkAttribute that's on the assemblies. It's set to >> [assembly: TargetFramework(".NETFramework,Version=v4.0", >> FrameworkDisplayName = ".NET Framework 4")] >> >> rather than >> [assembly: >> TargetFramework(".NETFramework,Version=v4.0,Profile=Client", >> FrameworkDisplayName = ".NET Framework 4 Client Profile")] >> On Wed, Jan 16, 2013 at 8:54 AM, bruno gallart >> > wrote: >> >> Sorry , I don't say that it is the fault of Ironpython. >> >> More precisions: >> My program is created with Winforms and with Nhunspell (that is >> the version of spellchecker Hunspell for Net). My program is a >> little spellchecker for Word and for this I use the >> Reference('Microsoft.Office.Interop.Word'). >> >> When I run my program it asks to me that it needs the Framework 4.0 >> "you first must install one of the following version of .Net >> framework:. Net Framework, version=v4.0" >> but the FrameWork 4.0 client profile is installed on this PC. >> >> I don't think that Winforms and NHunspell need the full Framework >> 4.0 but maybe the "Microsoft.Office.Interop.Word". Am I right ? >> >> Bruno >> >> >> Le 16/01/2013 17:27, Markus Schaber a ?crit : >>> Hi, Bruno, >>> >>> >>> Von: bruno gallart >>> >>>> My question is in the title. I should like to be sure. >>>> >>>> I did a program and I want to install it on another pc that have not >>>> framework 4.0 installed. >>>> If I install Framework 4.0 client profile (smaller) my program does not >>>> work. If I install the Framework full, it works. >>>> >>>> Conclusion : Ironpython works with the framework full, is it right ? It is >>>> not possible to install a smaller version of Microsoft Framework with >>>> IronPython like Framework client profile ? >>>> >>>> Thanks if somebody can give me some informations about that, >>> What exactly do you mean with "does not work"? Is there any exception? >>> >>> Maybe your program does something which requires the full framework functionality, and it's not necessarily IronPython's fault... >>> >>> >>> Best regards >>> >>> Markus Schaber >>> >>> CODESYS(r) a trademark of 3S-Smart Software Solutions GmbH >>> >>> Inspiring Automation Solutions >>> >>> 3S-Smart Software Solutions GmbH >>> Dipl.-Inf. Markus Schaber | Product Development Core Technology >>> Memminger Str. 151 | 87439 Kempten | Germany >>> Tel.+49-831-54031-979 | Fax+49-831-54031-50 >>> >>> E-Mail:m.schaber at codesys.com | Web:http://www.codesys.com >>> CODESYS internet forum:http://forum.codesys.com >>> >>> Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 >>> >> >> >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zsidoz at innodev.hu Thu Jan 24 09:38:23 2013 From: zsidoz at innodev.hu (=?windows-1252?Q?Zsid=F3_Zolt=E1n?=) Date: Thu, 24 Jan 2013 09:38:23 +0100 Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation In-Reply-To: References: <478B4630361A43BEA481D28D38F32170@ZsidozPC> <4C554C3A47C5024ABDE00E94DA17BC4D2D7D07DC@BN1PRD0712MB633.namprd07.prod.outlook.com> <4D60BB1D64864DC2BB35678DC45B39D9@ZsidozPC> <36440CB205794BC880E3C27BC30B9824@ZsidozPC> Message-ID: <3D0ACF135A7B4E57AA4680147A9D03CC@ZsidozPC> Hi Everyone, Thanks a lot of good posts for this thread. We tried a lot of things but they were unsuccessful. At the end we found that the windows update installed some 4.5 update for about a week. Now everything is working. J Zoltan From: Curt Hagenlocher Sent: Tuesday, January 15, 2013 3:44 PM To: Zsid? Zolt?n Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation Is it possible to launch the application directly and then attach the debugger to it before the code in question executes? How is the background thread created? On Tue, Jan 15, 2013 at 3:51 AM, Zsid? Zolt?n wrote: Hi Jeff, You were right. On windows 7 I managed to reproduce the error when I installed .net 4.5. Unfortunately I still cannot make a simpler application that can reproduce it. And if I debug it then it works on Windows 7. I have found that .net 4.0 and 4.5 cannot work side-by-side, so my next step will be downgrading my application to 3.5. Or do you have better idea? Zoltan From: Jeff Hardy Sent: Friday, January 11, 2013 4:54 PM To: Zsid? Zolt?n Cc: ironpython-users at python.org Subject: Re: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation What version of .NET is installed on the Windows 7 machines? I wonder if this is a .NET 4.5 vs. .NET 4 issue and not a Win8 vs Win7 issue. - Jeff On Thu, Jan 10, 2013 at 11:43 PM, Zsid? Zolt?n wrote: Keith, you are absolutely right. Not the background thread causes this error. I tried to make a simpler application that throws the same exception but I was not able to do it. Then I tried to debug it in Visual Studio 2010 but if I debug then the error does not appears. I cannot post the full application source code so we will give up it, because it is not reproduceable. As a last word I would like to note that we have two windows 8 64 bit computer and on both pc the software crashes. Regards, Zoltan From: Keith Rome Sent: Wednesday, January 09, 2013 6:26 PM To: Zsid? Zolt?n ; ironpython-users at python.org Subject: RE: [Ironpython-users] crash on Win8 64bit at IronPython expressionevaluation Are you able to narrow down the problem to a small script that reproduces it? The code pointed to in that call stack doesn?t really have many ways of failing in that way (null reference). The most likely thing is that DefaultContext.DefaultPythonContext is not being set. But I think that is done for you when the scripting runtime is initialized. How are you creating the script runtime? Running from a background thread shouldn?t have any bearing on it, unless this were a race issue. And since the crash is happening in a static ctor, that pretty much rules out thread races. Keith Rome Senior Consultant and Architect MCPD-EAD, MCSD, MCDBA, MCTS-WPF, MCTS-TFS, MCTS-WSS Wintellect | 770.617.4016 | mailto:rome at wintellect.com www.wintellect.com From: Ironpython-users [mailto:ironpython-users-bounces+rome=wintellect.com at python.org] On Behalf Of Zsid? Zolt?n Sent: Wednesday, January 9, 2013 8:55 AM To: ironpython-users at python.org Subject: [Ironpython-users] crash on Win8 64bit at IronPython expression evaluation Hi, We are using IronPython and Windows 8 long time, but now we have an exception that only occurs on windows 8 64 bit. (We did not test on Windows 8 32 bit but tested on Windows 7 32/64 bit where it is ok.) The application crashes at the first ironpython expression evaluating. I think it is important to note that we are using IronPython from a background thread. We cannot debug it on windows 8. If this exception is similar to you please help us. Thanks, Zoltan the stack trace: System.TypeInitializationException: The type initializer for 'IronPython.Runtime.Converter' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object. at IronPython.Runtime.Converter.MakeConvertSite[T](ConversionResultKind kind) at IronPython.Runtime.Converter.MakeExplicitConvertSite[T]() at IronPython.Runtime.Converter..cctor() --- End of inner exception stack trace --- at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type fromType, Type toType) at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type toType, NarrowingLevel allowNarrowing) at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type fromType, Type toType, Boolean toNotNullable, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, NarrowingLevel level) at IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, CallFailure& failure) at Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 candidates, NarrowingLevel level, List`1& failures) at Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver resolver, IList`1 targets, BindingRestrictions restrictions, String name, NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target) at IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] newArgs) at IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject function, DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions functionRestriction, Func`2 bind) at IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder pythonInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject context, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder binder, Int32 compilationThreshold, Object[] args) at Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder binder, Object[] args, Int32 compilationThreshold) at IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 site, PythonInvokeBinder binder, CodeContext state, Object[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at CGS.CGS.ExecuteAssign(AssignAbs assign) at CGS.CGS.ModelPool_PropertyRead(Object sender, PropertyEventArgs e) m: at IronPython.Runtime.Converter.HasImplicitNumericConversion(Type fromType, Type toType) at IronPython.Runtime.Converter.CanConvertFrom(Type fromType, Type toType, NarrowingLevel allowNarrowing) at IronPython.Runtime.Binding.PythonBinder.CanConvertFrom(Type fromType, Type toType, Boolean toNotNullable, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArgument, ParameterWrapper toParameter, NarrowingLevel level) at IronPython.Runtime.Binding.PythonOverloadResolver.CanConvertFrom(Type fromType, DynamicMetaObject fromArg, ParameterWrapper toParameter, NarrowingLevel level) at Microsoft.Scripting.Actions.Calls.OverloadResolver.TryConvertArguments(MethodCandidate candidate, ArgumentBinding namesBinding, NarrowingLevel narrowingLevel, CallFailure& failure) at Microsoft.Scripting.Actions.Calls.OverloadResolver.SelectCandidatesWithConvertibleArgs(List`1 candidates, NarrowingLevel level, List`1& failures) at Microsoft.Scripting.Actions.Calls.OverloadResolver.MakeBindingTarget(CandidateSet targetSet) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.Calls.OverloadResolver.ResolveOverload(String methodName, IList`1 methods, NarrowingLevel minLevel, NarrowingLevel maxLevel) at Microsoft.Scripting.Actions.DefaultBinder.CallMethod(DefaultOverloadResolver resolver, IList`1 targets, BindingRestrictions restrictions, String name, NarrowingLevel minLevel, NarrowingLevel maxLevel, BindingTarget& target) at IronPython.Runtime.Binding.MetaBuiltinFunction.<>c__DisplayClass4.b__3(DynamicMetaObject[] newArgs) at IronPython.Runtime.Types.BuiltinFunction.MakeBuiltinFunctionCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject function, DynamicMetaObject[] args, Boolean hasSelf, BindingRestrictions functionRestriction, Func`2 bind) at IronPython.Runtime.Binding.MetaBuiltinFunction.MakeSelfCall(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.InvokeWorker(DynamicMetaObjectBinder call, Expression codeContext, DynamicMetaObject[] args) at IronPython.Runtime.Binding.MetaBuiltinFunction.Invoke(PythonInvokeBinder pythonInvoke, Expression codeContext, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindWorker(DynamicMetaObject context, DynamicMetaObject target, DynamicMetaObject[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.Bind(DynamicMetaObject target, DynamicMetaObject[] args) at Microsoft.Scripting.Utils.DynamicUtils.GenericInterpretedBinder`1.Bind(DynamicMetaObjectBinder binder, Int32 compilationThreshold, Object[] args) at Microsoft.Scripting.Utils.DynamicUtils.LightBind[T](DynamicMetaObjectBinder binder, Object[] args, Int32 compilationThreshold) at IronPython.Runtime.Types.BuiltinFunction.IronPython.Runtime.Binding.IFastInvokable.MakeInvokeBinding[T](CallSite`1 site, PythonInvokeBinder binder, CodeContext state, Object[] args) at IronPython.Runtime.Binding.PythonInvokeBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget1(PythonFunction function, Object arg0) at IronPython.Runtime.FunctionCaller`1.Call1(CallSite site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at Microsoft.Scripting.Interpreter.DynamicInstruction`4.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1) at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.EvalWrapper(CodeContext ctx) at IronPython.Compiler.PythonScriptCode.Run(Scope scope) at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope) at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope) at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) --------------------------------------------------------------------------------------------------- Ezt a sz?veget a Panda IS 2013 csatolta : Amenyiben ez egy k?retlen e-mail ?zenet (SPAM), kattintson a k?vetkez? linkre ?s min?s?tse ?jra: Ez egy SPAM! --------------------------------------------------------------------------------------------------- _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users --------------------------------------------------------------------------------------------------- Ezt a sz?veget a Panda IS 2013 csatolta : Amenyiben ez egy k?retlen e-mail ?zenet (SPAM), kattintson a k?vetkez? linkre ?s min?s?tse ?jra: Ez egy SPAM! --------------------------------------------------------------------------------------------------- _______________________________________________ Ironpython-users mailing list Ironpython-users at python.org http://mail.python.org/mailman/listinfo/ironpython-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From apprentice_99 at hotmail.com Thu Jan 24 19:50:34 2013 From: apprentice_99 at hotmail.com (Studious Apprentice) Date: Thu, 24 Jan 2013 18:50:34 +0000 Subject: [Ironpython-users] Problems with silverlight chiron and script templates Message-ID: Hi to all! I have tried to create a sample using the files in the Silverlight folder of the IronPython 2.7 distribution but I have met several problems: 1/ When running Chiron.exe on the files in script/templates, it complains about a missing System.Numerics assembly.I copied the associated dll and xml files from the Silverlight 5 sdk, files which are in the folder Silverlight/v5.0/Libraries/Client and now it works. I am just not sure I did the right thing because I also have these files in the Silverlight 4.0 and these files also make chiron work... Could someone please confirm I did the right thing by selecting v5.0 ? 2/ The page loads and the "Welcome to python and silverlight" message appears but a big diagnostic message appears : "MethodAccessException: ?chec de la tentative d'acc?s de la m?thode 'Microsoft.Scripting.Utils.ReflectionUtils.CreateDelegate(System.Reflection.MethodInfo, System.Type, System.Object)' ? la m?thode 'IronPython.Runtime.Types.LateBoundInitBinder+FastInitSite`2.CallTarget(System.Runtime.CompilerServices.CallSite, IronPython.Runtime.CodeContext, System.Object, System.__Canon, System.__Canon)'." with the following traceback:MethodAccessException at System.Delegate.BindToMethodInfo(Object target, IRuntimeMethodInfo method, RuntimeType methodType, DelegateBindingFlags flags) at System.Delegate.CreateDelegateInternal(RuntimeType rtType, RuntimeMethodInfo rtMethod, Object firstArgument, DelegateBindingFlags flags) at System.Delegate.CreateDelegate(Type type, Object firstArgument, MethodInfo method, Boolean throwOnBindFailure) at System.Delegate.CreateDelegate(Type type, Object firstArgument, MethodInfo method) at Microsoft.Scripting.Utils.ReflectionUtils.CreateDelegate(MethodInfo methodInfo, Type delegateType, Object target) at IronPython.Runtime.Types.LateBoundInitBinder.BindDelegate[T](CallSite`1 site, Object[] args) at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at IronPython.Runtime.Types.PythonType.FastTypeSite`2.CallTarget(CallSite site, CodeContext context, Object type, T0 arg0, T1 arg1) at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3) at Microsoft.Scripting.Interpreter.DynamicInstruction`5.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) at Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget2(PythonFunction function, Object arg0, Object arg1) at CallSite.Target(Closure , CallSite , Object , Repl , IReplFormatter ) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at _Scripting_(Object[] , Repl , IReplFormatter ) at Microsoft.Scripting.Silverlight.Repl.GetReplFormatter(Repl instance) And I really dont know what to do about it. I also tried to port the samples from http://www.voidspace.org.uk/ironpython/webide/webide.html but they also generated the same kind of exception. Thanks in advance for helping me. I am a pretty experienced python programmer looking forward to using it to manipulate the DOM but I am at a total loss regarding everything .NET Thyfate -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvanderkolff at gmail.com Mon Jan 28 02:54:47 2013 From: mvanderkolff at gmail.com (Michael van der Kolff) Date: Mon, 28 Jan 2013 12:54:47 +1100 Subject: [Ironpython-users] Fix for #33663 Message-ID: I couldn't make a pull request, so I instead attach a diff. I've put this on the issue, but I figured that I should probably distribute it here as well. -------------- next part -------------- A non-text attachment was scrubbed... Name: 33663fix.diff Type: application/octet-stream Size: 3592 bytes Desc: not available URL: From mvanderkolff at gmail.com Mon Jan 28 03:58:10 2013 From: mvanderkolff at gmail.com (Michael van der Kolff) Date: Mon, 28 Jan 2013 13:58:10 +1100 Subject: [Ironpython-users] Fix for #33663 In-Reply-To: References: Message-ID: Sorry, that broke something else. I've submitted a new and improved fix that first tests that _self == _selfClass. Just pull it :) Cheers, Michael On Mon, Jan 28, 2013 at 12:54 PM, Michael van der Kolff wrote: > I couldn't make a pull request, so I instead attach a diff. I've put > this on the issue, but I figured that I should probably distribute it > here as well. From slide.o.mix at gmail.com Mon Jan 28 03:58:43 2013 From: slide.o.mix at gmail.com (Slide) Date: Sun, 27 Jan 2013 19:58:43 -0700 Subject: [Ironpython-users] Fix for #33663 In-Reply-To: References: Message-ID: Is there a specific reason you can't put this into a pull request? On Sun, Jan 27, 2013 at 7:58 PM, Michael van der Kolff < mvanderkolff at gmail.com> wrote: > Sorry, that broke something else. I've submitted a new and improved > fix that first tests that _self == _selfClass. Just pull it :) > > Cheers, > > Michael > > On Mon, Jan 28, 2013 at 12:54 PM, Michael van der Kolff > wrote: > > I couldn't make a pull request, so I instead attach a diff. I've put > > this on the issue, but I figured that I should probably distribute it > > here as well. > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users > -- Website: http://earl-of-code.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvanderkolff at gmail.com Mon Jan 28 03:59:24 2013 From: mvanderkolff at gmail.com (Michael van der Kolff) Date: Mon, 28 Jan 2013 13:59:24 +1100 Subject: [Ironpython-users] Fix for #33663 In-Reply-To: References: Message-ID: I've done so. For some crazy reason I just didn't see the option before (was probably blind or something). Cheers, Michael On Mon, Jan 28, 2013 at 1:58 PM, Slide wrote: > Is there a specific reason you can't put this into a pull request? > > > On Sun, Jan 27, 2013 at 7:58 PM, Michael van der Kolff > wrote: >> >> Sorry, that broke something else. I've submitted a new and improved >> fix that first tests that _self == _selfClass. Just pull it :) >> >> Cheers, >> >> Michael >> >> On Mon, Jan 28, 2013 at 12:54 PM, Michael van der Kolff >> wrote: >> > I couldn't make a pull request, so I instead attach a diff. I've put >> > this on the issue, but I figured that I should probably distribute it >> > here as well. >> _______________________________________________ >> Ironpython-users mailing list >> Ironpython-users at python.org >> http://mail.python.org/mailman/listinfo/ironpython-users > > > > > -- > Website: http://earl-of-code.com From no_reply at codeplex.com Mon Jan 28 14:11:07 2013 From: no_reply at codeplex.com (no_reply at codeplex.com) Date: 28 Jan 2013 05:11:07 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 1/27/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] super() does not preserve class 2. [New comment] super() does not preserve class ---------------------------------------------- ISSUES 1. [New comment] super() does not preserve class http://ironpython.codeplex.com/workitem/33663 User mvdk has commented on the issue: "Fix for this issue, along with test for it."----------------- 2. [New comment] super() does not preserve class http://ironpython.codeplex.com/workitem/33663 User cvolzke has commented on the issue: "I have experienced the same problem, which makes introducing a unit test subclass (which makes a 3 class deep hierarchy in my case) difficult without some hackery. " ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvanderkolff at gmail.com Wed Jan 30 00:41:57 2013 From: mvanderkolff at gmail.com (Michael van der Kolff) Date: Wed, 30 Jan 2013 10:41:57 +1100 Subject: [Ironpython-users] cp33663 fix - Any comments? Message-ID: I put a pull request in for the fix for cp33663. Are there any comments on the fix? I would really like it to be merged at some point, because maintaining our own tree just for this fix seems a little silly. A real use case: Acceptance testing with unittest that makes extensive use of setUpClass/tearDownClass (due to the expense of starting some processes remotely). Cheers, Michael From donspauldingii at gmail.com Wed Jan 30 01:19:05 2013 From: donspauldingii at gmail.com (Don Spaulding) Date: Tue, 29 Jan 2013 18:19:05 -0600 Subject: [Ironpython-users] Windows Service Applications? Message-ID: Hi all, I'm new to IronPython. I'm using IPy to wrap a .NET assembly. I've got my wrapper written and functional from the command line. Now I want to run the python wrapper as a windows service application. Anyone know how I can do that? I found a project on codeplex that seems to be solving this problem ( http://dlrhostservice.codeplex.com/). It's rather light on documentation and I haven't been able to make heads or tails out of how to use the project based on reading the source. Any help in this area would be appreciated. Thanks, Don Spaulding -------------- next part -------------- An HTML attachment was scrubbed... URL: From mvanderkolff at gmail.com Wed Jan 30 08:49:34 2013 From: mvanderkolff at gmail.com (Michael van der Kolff) Date: Wed, 30 Jan 2013 18:49:34 +1100 Subject: [Ironpython-users] struct.pack(format, *args) not thread safe Message-ID: When using paramiko with more than one process spawning, I occasionally get the following: System.InvalidOperationException: The LinkedList node already belongs to a LinkedList. at System.Collections.Generic.LinkedList`1.ValidateNewNode(LinkedListNode`1 node) at System.Collections.Generic.LinkedList`1.AddFirst(LinkedListNode`1 node) at IronPython.Modules.PythonStruct.pack(CodeContext context, String fmt, Object[] values) at CallSite.Target(Closure , CallSite , CodeContext , Object , String , Object ) at paramiko.message$37.add_int$491(PythonFunction $function, Object self, Object n) in C:\repo\trunk\external\python\paramiko\message.py:line 227 at paramiko.message$37.add_string$494(PythonFunction $function, Object self, Object s) in C:\repo\trunk\external\python\paramiko\message.py:line 259 at paramiko.transport$13.open_channel$273(PythonFunction $function, Object self, Object kind, Object dest_addr, Object src_addr) in C:\repo\trunk\external\python\paramiko\transport.py:line 773 ... Lots more in the stack trace. I think that this is due to PythonStruct.pack's usage of CacheDict, which is explicitly marked as not thread safe. A quick and dirty hack would be to force all users of _cache to lock it first, though I'm sure there's a better answer. Cheers, Michael From jdhardy at gmail.com Wed Jan 30 19:38:04 2013 From: jdhardy at gmail.com (Jeff Hardy) Date: Wed, 30 Jan 2013 10:38:04 -0800 Subject: [Ironpython-users] cp33663 fix - Any comments? In-Reply-To: References: Message-ID: Sorry, I've been crazy busy lately. I'll take a look this weekend. On Tue, Jan 29, 2013 at 3:41 PM, Michael van der Kolff wrote: > I put a pull request in for the fix for cp33663. Are there any > comments on the fix? I would really like it to be merged at some > point, because maintaining our own tree just for this fix seems a > little silly. A real use case: Acceptance testing with unittest that > makes extensive use of setUpClass/tearDownClass (due to the expense of > starting some processes remotely). > > Cheers, > > > Michael > _______________________________________________ > Ironpython-users mailing list > Ironpython-users at python.org > http://mail.python.org/mailman/listinfo/ironpython-users From unigee at gmail.com Thu Jan 31 13:18:36 2013 From: unigee at gmail.com (Ian Gorse) Date: Thu, 31 Jan 2013 12:18:36 +0000 Subject: [Ironpython-users] not a Zip file error Message-ID: Hello List, I am having a very weird error when trying to execute a very simple python script from within a C# 2010 express project Everytime the application executes the script, It crashes with the following error IronPython.Runtime.Exceptions.ImportException crossed a native/managed boundary not a Zip file I have managed to break down the issue into a small sample application as below. The project is a blank project, that only contains the following code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Microsoft.Scripting.Hosting; using IronPython.Hosting; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { ScriptEngine engine; ScriptSource source; ScriptScope sys; ScriptScope scope; String filename = @"c:\tmp\test.py"; engine = Python.CreateEngine(); source = engine.CreateScriptSourceFromFile(filename); sys = Python.GetSysModule(engine); scope = engine.CreateScope(); source.Execute(); // CRASHES HERE } } } and the test.py is even simpler import sys import clr clr.AddReference('System.Xml') from System.Xml import XmlDocument clr.AddReference('System.Windows.Forms') from System.Windows.Forms import MessageBox Oddly, if I comment out the 'from....' lines, then no error appears. What is even more confusing to me is that if I compile the application and run it using executable file, no error appears. My project was working fine 2 days ago, and the only change I made yesterday was that I un-installed C# 2010 express, rebooted and re-installed it. Does anyone know what is going wrong with my project Thanks From unigee at gmail.com Thu Jan 31 13:26:11 2013 From: unigee at gmail.com (Ian Gorse) Date: Thu, 31 Jan 2013 12:26:11 +0000 Subject: [Ironpython-users] not a Zip file error In-Reply-To: References: Message-ID: Please dis-regard this issue. I have solved it. I forgot that I turned on "Break when exceptions cross AppDomain or managed/native boundaries" in options. Thanks anyway On Thu, Jan 31, 2013 at 12:18 PM, Ian Gorse wrote: > Hello List, > > I am having a very weird error when trying to execute a very simple > python script from within a C# 2010 express project > Everytime the application executes the script, It crashes with the > following error > > IronPython.Runtime.Exceptions.ImportException crossed a native/managed boundary > not a Zip file > > I have managed to break down the issue into a small sample application as below. > > The project is a blank project, that only contains the following code: > > using System; > using System.Collections.Generic; > using System.ComponentModel; > using System.Data; > using System.Drawing; > using System.Linq; > using System.Text; > using System.Windows.Forms; > using Microsoft.Scripting.Hosting; > using IronPython.Hosting; > > namespace WindowsFormsApplication1 > { > public partial class Form1 : Form > { > public Form1() > { > InitializeComponent(); > } > > private void Form1_Load(object sender, EventArgs e) > { > ScriptEngine engine; > ScriptSource source; > ScriptScope sys; > ScriptScope scope; > > String filename = @"c:\tmp\test.py"; > engine = Python.CreateEngine(); > source = engine.CreateScriptSourceFromFile(filename); > sys = Python.GetSysModule(engine); > scope = engine.CreateScope(); > source.Execute(); // CRASHES HERE > } > } > } > > and the test.py is even simpler > > import sys > import clr > > clr.AddReference('System.Xml') > from System.Xml import XmlDocument > > clr.AddReference('System.Windows.Forms') > from System.Windows.Forms import MessageBox > > Oddly, if I comment out the 'from....' lines, then no error appears. > What is even more confusing to me is that if I compile the application > and run it using executable file, no error appears. > > My project was working fine 2 days ago, and the only change I made > yesterday was that I un-installed C# 2010 express, rebooted and > re-installed it. > > Does anyone know what is going wrong with my project > > Thanks From no_reply at codeplex.com Thu Jan 31 13:51:12 2013 From: no_reply at codeplex.com (CodePlex) Date: 31 Jan 2013 04:51:12 -0800 Subject: [Ironpython-users] IronPython, Daily Digest 1/30/2013 Message-ID: Hi ironpython, Here's your Daily Digest of new issues for project "IronPython". In today's digest:ISSUES 1. [New comment] Failure to bind base accessor if only one accessor is overridden in derived class 2. [New issue] struct.pack not threadsafe ---------------------------------------------- ISSUES 1. [New comment] Failure to bind base accessor if only one accessor is overridden in derived class http://ironpython.codeplex.com/workitem/31861 User mvdk has commented on the issue: "On line 228 of PythonTypeInfo.cs: res = FilterSpecialNames(binder.GetMember(curType, name), name, action); binder.GetMember(curType, name) needs flags to tell it to retrieve resp. GetField | GetProperty, SetField | SetProperty. Perhaps these should be higher priority resolvers."----------------- 2. [New issue] struct.pack not threadsafe http://ironpython.codeplex.com/workitem/33720 User mvdk has proposed the issue: "When using paramiko with more than one process spawning, I occasionally get the following: System.InvalidOperationException: The LinkedList node already belongs to a LinkedList. at System.Collections.Generic.LinkedList`1.ValidateNewNode(LinkedListNode`1 node) at System.Collections.Generic.LinkedList`1.AddFirst(LinkedListNode`1 node) at IronPython.Modules.PythonStruct.pack(CodeContext context, String fmt, Object[] values) at CallSite.Target(Closure , CallSite , CodeContext , Object , String , Object ) at paramiko.message$37.add_int$491(PythonFunction $function, Object self, Object n) in C:\repo\trunk\external\python\paramiko\message.py:line 227 at paramiko.message$37.add_string$494(PythonFunction $function, Object self, Object s) in C:\repo\trunk\external\python\paramiko\message.py:line 259 at paramiko.transport$13.open_channel$273(PythonFunction $function, Object self, Object kind, Object dest_addr, Object src_addr) in C:\repo\trunk\external\python\paramiko\transport.py:line 773 ... Lots more in the stack trace. I think that this is due to PythonStruct.pack's usage of CacheDict, which is explicitly marked as not thread safe. A quick and dirty hack would be to force all users of _cache to lock it first, though I'm sure there's a better answer. Reproducing this has been troublesome (with what we have, I found that it triggered maybe once every 10 runs), but I'm sure that someone can think of a way :)" ---------------------------------------------- ---------------------------------------------- You are receiving this email because you subscribed to notifications on CodePlex. To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: