[IronPython] ANN: Resolver One 1.5 released

2009-06-03 Thread Giles Thomas
We are proud to announce the release of Resolver One, version 1.5.  
Resolver One is a Windows-based spreadsheet that integrates IronPython 
deeply into its recalculation loop, making the models you build more 
reliable and more maintainable.


For version 1.5, we've added a console; this new command-line window 
gives you a way to interact with your spreadsheet using Python 
statements.  Here's a screencast showing why this is worth doing:


   http://www.resolversystems.com/screencasts/console/

We have a 31-day free trial version, so if you would like to take a 
look, you can download it from our website:


   http://www.resolversystems.com/download/
   
If you want to use Resolver One in an Open Source project, we offer free 
licenses for that:


   http://www.resolversystems.com/opensource/
   
Many thanks for the ongoing work of the IronPython team to build the 
platform that makes this all possible!



Best regards,

Giles
--
Giles Thomas
giles.tho...@resolversystems.com
+44 (0) 20 7253 6372

Win up to $17,000 for a spreadsheet: 
http://www.resolversystems.com/competition/


17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79
Registered in England and Wales as company number 5467329.
Registered address: 843 Finchley Road, London NW11 8NA, UK

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] IronPython 2.6 CodePlex Source Update

2009-06-03 Thread merllab
This is an automated email letting you know that sources 
have recently been pushed out.  You can download these newer 
sources directly from 
http://ironpython.codeplex.com/SourceControl/changeset/view/53794.

MODIFIED SOURCES

$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Actions/TypeGroup.cs

$/IronPython/IronPython_Main/Src/Runtime/Microsoft.Scripting/Utils/CollectionUtils.cs



___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Debugging IronPython scripts + simulate a filename when loading a string

2009-06-03 Thread Patrick DeschĂȘnes
Hi,
I'm currently using IronPython to develop extensions to my program.  My
python scripts are compressed in a zip file along with other resources.

Everything works fine but I would be very happy if I could find a simple way
to debug my scripts.  I don't want anything complex for now.  If I could
only do something like this :

try:
   bugged code
except:
   print debug.stack.filename +  :  debug.stack.lineno


It would be perfect.  I looked for the *traceback* module but it doesn't
seems to work with IronPython.  Also, since I load my script from a zip
file, is there a way to
simulate a filename when loading a string.

So, if I could :

a) load a string as if it was a file
b) intercept the filename/linenum in the catch block

That would be a huge improvement.


- Patrick
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] Urgent : Unable to open MS Word file from Python

2009-06-03 Thread Sivaguru Perambalam
Hello,

I have written this small script, which is (part of an application that is)
supposed to open a MS Word Document and manipulate it (do a search and
replace) .
I am getting a weird exception when I try to run the script.
It says TypeError: expected clr.Reference, got str for the line where I try
to open the file.
But the same script runs fine on a colleague's computer .
I couldn't figure out what his computer has that mine doesn't.So I thought
of asking what are the necessary things (libs, dlls) that are needed to
Open/Work on MS Word File from Iron Python.

MS Excel interaction works fine in my computer though. I have Office 07, MS
Visual Studio 05, .NET Framework 2.0 installed in my computer. I have also
verified that Microsoft.Office.Interop.Word version 12.0.0.0 is found
registered in the Assembly Cache.

This issue has become a Show-stopper for the Application I am working on.
So, any helpful suggestions or directions would mean a lot !

Thanks !!


Script :

import clr
import System

clr.AddReference(Microsoft.Office.Interop.Word)

import Microsoft.Office.Interop.Word as Word

source_filename = 'C:\Sample_Report.doc'
destination_filename = 'c:\Validation Report.doc'

missing = System.Type.Missing
replaceAll = Word.WdReplace.wdReplaceAll

# Open the Report Template MSWord File
word_application = Word.ApplicationClass()
word_application.Visible = False
document = word_application.Documents.Open(source_filename)
print 'opened microsoft word'
document.SaveAs(destination_filename)
document.Close()
document = None
word_application.Quit()
word_application = None


Error Message :

 C:\Program Files\DotQuestLite\Bin\ipy.exe word.py
Traceback (most recent call last):

File C:\Documents and Settings\sp19206\Desktop\word.py, line 17, in
Initialize

TypeError: expected clr.Reference, got str


 Process Exit Code: 1
 Time Taken: 00:07
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


[IronPython] IronPython 2.0.1 repr of floats on non UK Windows

2009-06-03 Thread Michael Foord

Hello guys,

Is this a known issue?

WinXP SP3 Spanish

repr(0.1)

'0,10001'

Notice the comma instead of the decimal point. This is honoring the
locale but screwing anything that tries to use the string programattically.

Michael

--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython 2.0.1 repr of floats on non UK Windows

2009-06-03 Thread Dave Fugate
Thanks for reporting this Michael.  It's a known issue (see 
http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=14022), but 
actually should be working under IP 2.0...

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord
Sent: Wednesday, June 03, 2009 3:17 PM
To: Discussion of IronPython
Subject: [IronPython] IronPython 2.0.1 repr of floats on non UK Windows

Hello guys,

Is this a known issue?

WinXP SP3 Spanish
 repr(0.1)
'0,10001'

Notice the comma instead of the decimal point. This is honoring the
locale but screwing anything that tries to use the string programattically.

Michael

-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Urgent : Unable to open MS Word file from Python

2009-06-03 Thread Shri Borde
Try using this workaround.

import clr
r = clr.Reference[str]()
r.Value = source_filename
word_application.Documents.Open(r)

You should not have to do this with IPy 2.6, and probably even with 2.0. Using 
a str directly works for me. What version of IronPython are you using? I think 
the workaround might have been needed with IPy 1.X.

See 
http://blogs.msdn.com/shrib/archive/2008/07/30/idispatch-support-on-in-ironpython-beta-4.aspx
 for some details about using COM from IPy.

Thanks,
Shri

From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Sivaguru Perambalam
Sent: Wednesday, June 03, 2009 1:36 PM
To: users@lists.ironpython.com
Subject: [IronPython] Urgent : Unable to open MS Word file from Python

Hello,

I have written this small script, which is (part of an application that is) 
supposed to open a MS Word Document and manipulate it (do a search and replace) 
.
I am getting a weird exception when I try to run the script.
It says TypeError: expected clr.Reference, got str for the line where I try to 
open the file.
But the same script runs fine on a colleague's computer .
I couldn't figure out what his computer has that mine doesn't.So I thought of 
asking what are the necessary things (libs, dlls) that are needed to Open/Work 
on MS Word File from Iron Python.

MS Excel interaction works fine in my computer though. I have Office 07, MS 
Visual Studio 05, .NET Framework 2.0 installed in my computer. I have also 
verified that Microsoft.Office.Interop.Word version 12.0.0.0 is found 
registered in the Assembly Cache.

This issue has become a Show-stopper for the Application I am working on.
So, any helpful suggestions or directions would mean a lot !

Thanks !!


Script :

import clr
import System

clr.AddReference(Microsoft.Office.Interop.Word)

import Microsoft.Office.Interop.Word as Word

source_filename = 'C:\Sample_Report.doc'
destination_filename = 'c:\Validation Report.doc'

missing = System.Type.Missing
replaceAll = Word.WdReplace.wdReplaceAll

# Open the Report Template MSWord File
word_application = Word.ApplicationClass()
word_application.Visible = False
document = word_application.Documents.Open(source_filename)
print 'opened microsoft word'
document.SaveAs(destination_filename)
document.Close()
document = None
word_application.Quit()
word_application = None


Error Message :

 C:\Program Files\DotQuestLite\Bin\ipy.exe word.py
Traceback (most recent call last):

File C:\Documents and Settings\sp19206\Desktop\word.py, line 17, in Initialize

TypeError: expected clr.Reference, got str


 Process Exit Code: 1
 Time Taken: 00:07
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] IronPython 2.0.1 repr of floats on non UK Windows

2009-06-03 Thread Dave Fugate
Under German 32-bit Vista SP1 I get the following:
C:\Users\merllab.REDMOND\Desktop\IronPython-2.0.1ipy.exe
IronPython 2.0 (2.0.0.0) on .NET 2.0.50727.3074
Type help, copyright, credits or license for more information.
 repr(0.1)
'0.10001'
 #Make sure we're really localized
 try:
... 1/0
... except Exception, e:
... print e.message
...
Es wurde versucht, durch 0 (null) zu teilen.
 ^Z

C:\Users\merllab.REDMOND\Desktop\IronPython-2.0.1type blah.cs
using System;

public class Blah {
  public static void Main() {
System.Console.WriteLine(0.1);
}
}
C:\Users\merllab.REDMOND\Desktop\IronPython-2.0.1blah.exe
0,1

Are you sure this isn't IronPython 1.x?

Thanks,

Dave

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Dave Fugate
Sent: Wednesday, June 03, 2009 4:19 PM
To: Discussion of IronPython
Subject: Re: [IronPython] IronPython 2.0.1 repr of floats on non UK Windows

Thanks for reporting this Michael.  It's a known issue (see 
http://ironpython.codeplex.com/WorkItem/View.aspx?WorkItemId=14022), but 
actually should be working under IP 2.0...

-Original Message-
From: users-boun...@lists.ironpython.com 
[mailto:users-boun...@lists.ironpython.com] On Behalf Of Michael Foord
Sent: Wednesday, June 03, 2009 3:17 PM
To: Discussion of IronPython
Subject: [IronPython] IronPython 2.0.1 repr of floats on non UK Windows

Hello guys,

Is this a known issue?

WinXP SP3 Spanish
 repr(0.1)
'0,10001'

Notice the comma instead of the decimal point. This is honoring the
locale but screwing anything that tries to use the string programattically.

Michael

-- 
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com