Re: [IronPython] Sorting CSV file

2009-01-23 Thread Sheetal Gophane
Thank you all for your suggestions. I followed the following way 1.Define a class 2.In class overwrite __cmp__ function. 3.While reading file populate class object and append it in array. 4.Call array.sort() method. Internally it calls __cmp__ function. Thanks, Sheetal -Original Message-

Re: [IronPython] IronPython 2.0 Errors...

2009-01-23 Thread Dody Gunawinata
There may be a way to execute the show form without actually displaying it to the user - there must be some AppDomain magic available to be used somewhere. The code needs to be executed one way or another and what you are suggesting I think falls into the static verifier category which is a whole a

Re: [IronPython] IronPython 2.0 Errors...

2009-01-23 Thread António Piteira
Those classes probably won’t be triggered unless I execute the code. Consider this sample code: import sys,clr clr.AddReference(“System.Windows.Forms”) from System.Windows.Forms import * frm = Form() frm.Show() …#some error here, after the show If I execute the code the form

Re: [IronPython] IronPython 2.0 Errors...

2009-01-23 Thread Dody Gunawinata
Don't you think PythonException or related classes would be sufficient? On Fri, Jan 23, 2009 at 7:14 PM, António Piteira < antonio.pite...@wtvision.com> wrote: > I get it, I'm not really surprised… I was hoping that maybe there was a > way to use scriptSource.Compile(options,errorTracker), or so

Re: [IronPython] IronPython 2.0 Errors...

2009-01-23 Thread António Piteira
I get it, I’m not really surprised… I was hoping that maybe there was a way to use scriptSource.Compile(options,errorTracker), or something like that, and get the errors from errorTracker or some kind of sink. Very much apreciated for your time. ­­___

Re: [IronPython] IronPython 2.0 Errors...

2009-01-23 Thread Curt Hagenlocher
Are you familiar with "the halting problem"? :) ( http://en.wikipedia.org/wiki/Halting_problem) The only reliable way to find if a particular program returns a runtime error is to execute the program. For limited, targeted cases, (such as importing mo

Re: [IronPython] IronPython 2.0 Errors...

2009-01-23 Thread Slide
On Fri, Jan 23, 2009 at 9:45 AM, António Piteira wrote: > Hi, > > > > I'm trying get all runtime errors without actually executing the code. I can > get all syntax errors using the parser, but runtime errors like "import ys" > and stuff like that I', not able to. > > Is there any way to do this? >

[IronPython] IronPython 2.0 Errors...

2009-01-23 Thread António Piteira
Hi, I’m trying get all runtime errors without actually executing the code. I can get all syntax errors using the parser, but runtime errors like “import ys” and stuff like that I’, not able to. Is there any way to do this? Thanks, Vision ___ Us

Re: [IronPython] Sorting CSV file

2009-01-23 Thread Slide
On Fri, Jan 23, 2009 at 7:28 AM, Michael Foord wrote: > Slide wrote: >> >> On Fri, Jan 23, 2009 at 6:21 AM, Dody Gunawinata >> wrote: >> >>> >>> 1. Define a class to hold individual data >>> 2. Go through every single line >>> 3. Split based on ',' and insert the values to the object and add them

Re: [IronPython] Sorting CSV file

2009-01-23 Thread Michael Foord
Slide wrote: On Fri, Jan 23, 2009 at 6:21 AM, Dody Gunawinata wrote: 1. Define a class to hold individual data 2. Go through every single line 3. Split based on ',' and insert the values to the object and add them to the list 4. Sort the list based on the fields you want. On Fri, Jan 23, 200

Re: [IronPython] Sorting CSV file

2009-01-23 Thread Slide
On Fri, Jan 23, 2009 at 6:21 AM, Dody Gunawinata wrote: > 1. Define a class to hold individual data > 2. Go through every single line > 3. Split based on ',' and insert the values to the object and add them to > the list > 4. Sort the list based on the fields you want. > On Fri, Jan 23, 2009 at 10

Re: [IronPython] Sorting CSV file

2009-01-23 Thread Dody Gunawinata
1. Define a class to hold individual data2. Go through every single line 3. Split based on ',' and insert the values to the object and add them to the list 4. Sort the list based on the fields you want. On Fri, Jan 23, 2009 at 10:28 AM, Sheetal Gophane < sheetal_goph...@persistent.co.in> wrote: >

Re: [IronPython] Sorting CSV file

2009-01-23 Thread Michael Foord
Sheetal Gophane wrote: Hi All, I have csv file in following format LogTime,ApetClientID,OperationName,Status,StartTime,Duration 2009-01-07/10:41:03,1,fun1,1,2009-01-07/10:41:02,314.8173162 2009-01-07/10:41:03,1,Login,0,2009-01-07/10:41:02,618.2695007 2009-01-07/10:41:03,1,Login,1,2009-0

[IronPython] Sorting CSV file

2009-01-23 Thread Sheetal Gophane
Hi All, I have csv file in following format LogTime,ApetClientID,OperationName,Status,StartTime,Duration 2009-01-07/10:41:03,1,fun1,1,2009-01-07/10:41:02,314.8173162 2009-01-07/10:41:03,1,Login,0,2009-01-07/10:41:02,618.2695007 2009-01-07/10:41:03,1,Login,1,2009-01-07/10:40:52,10997.29274