Re: [IronPython] Need a Good Embedded Example

2007-10-16 Thread Dino Viehland
Yep, we've temporarily ripped out all pre-compilation support from v2.0 to make 
the refactoring work easier so pyc definitely won't work there (and there's 
really no way to make it work there w/o a rather large amount of work).

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Davy Mitchell
Sent: Tuesday, October 16, 2007 2:40 PM
To: Discussion of IronPython
Subject: Re: [IronPython] Need a Good Embedded Example

Hi Dino,

Is this why I am having trouble with the pyc.py sample? It does say
1.01 in the description so maybe I should expect issues :-)

Traceback (most recent call last):
  File pyc.py, line 35, in Initialize
  File , line 0, in _stub_##227
AttributeError: 'NamespaceTracker' object has no attribute 'CompilerSink'

Thanks,
Davy

On 10/16/07, Dino Viehland <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Are you looking for samples in v1.0 or v2.0?  The code you quoted below is
> some version of v2.0 (we're still working on the final tweaks to what will
> become the new, final, hosting model).
>
>
>
>
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Joshua J. Pearce
>  Sent: Tuesday, October 16, 2007 2:08 PM
>  To: users@lists.ironpython.com
>  Subject: [IronPython] Need a Good Embedded Example
>
>
>
>
>
> I have been looking for a good example of embedding IronPython in a c#
> application. I am under the impression that there have been some major
> changes in the way this is done from version 1.1 to 2.0.
>
>
>
>
>
> This is what I found at the Python Cookbook site:
>
>
>
>
>
> namespace IronPythonScriptHost
>  {
>  class Program
>  {
>  static void Main(string[] args)
>  {
>  string code = "print \"Hello \" + Name";
>  Script.SetVariable ("Name", "Me");
>  Script.Execute("py", code);
>  }
>  }
>  }
>
>
>
>
>
> That's nice, but doesn't really help me to know how to get variable output
> from the script back to my c# code. I also need to know how to call scripts
> with multiple statements and whether all variables need to be set on the
> script object, or can their declaration just be part of the script code.
>
>
>
>
>
> Is there a good and simple example anywhere that shows how to host the
> IronPython engine in a c# app and let users manipulate your program objects
> via ipy scripts?
>
>
>
>
>
> Thanks!
>
>  --
>  Joshua Pearce
>
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>


--
Davy Mitchell
Blog - http://www.latedecember.co.uk/sites/personal/davy/
Twitter - http://twitter.com/daftspaniel
Skype - daftspaniel
needgod.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Need a Good Embedded Example

2007-10-16 Thread Davy Mitchell
Hi Dino,

Is this why I am having trouble with the pyc.py sample? It does say
1.01 in the description so maybe I should expect issues :-)

Traceback (most recent call last):
  File pyc.py, line 35, in Initialize
  File , line 0, in _stub_##227
AttributeError: 'NamespaceTracker' object has no attribute 'CompilerSink'

Thanks,
Davy

On 10/16/07, Dino Viehland <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Are you looking for samples in v1.0 or v2.0?  The code you quoted below is
> some version of v2.0 (we're still working on the final tweaks to what will
> become the new, final, hosting model).
>
>
>
>
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Joshua J. Pearce
>  Sent: Tuesday, October 16, 2007 2:08 PM
>  To: users@lists.ironpython.com
>  Subject: [IronPython] Need a Good Embedded Example
>
>
>
>
>
> I have been looking for a good example of embedding IronPython in a c#
> application. I am under the impression that there have been some major
> changes in the way this is done from version 1.1 to 2.0.
>
>
>
>
>
> This is what I found at the Python Cookbook site:
>
>
>
>
>
> namespace IronPythonScriptHost
>  {
>  class Program
>  {
>  static void Main(string[] args)
>  {
>  string code = "print \"Hello \" + Name";
>  Script.SetVariable ("Name", "Me");
>  Script.Execute("py", code);
>  }
>  }
>  }
>
>
>
>
>
> That's nice, but doesn't really help me to know how to get variable output
> from the script back to my c# code. I also need to know how to call scripts
> with multiple statements and whether all variables need to be set on the
> script object, or can their declaration just be part of the script code.
>
>
>
>
>
> Is there a good and simple example anywhere that shows how to host the
> IronPython engine in a c# app and let users manipulate your program objects
> via ipy scripts?
>
>
>
>
>
> Thanks!
>
>  --
>  Joshua Pearce
>
> ___
> Users mailing list
> Users@lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
>


-- 
Davy Mitchell
Blog - http://www.latedecember.co.uk/sites/personal/davy/
Twitter - http://twitter.com/daftspaniel
Skype - daftspaniel
needgod.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] Need a Good Embedded Example

2007-10-16 Thread Dino Viehland
Are you looking for samples in v1.0 or v2.0?  The code you quoted below is some 
version of v2.0 (we're still working on the final tweaks to what will become 
the new, final, hosting model).

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua J. Pearce
Sent: Tuesday, October 16, 2007 2:08 PM
To: users@lists.ironpython.com
Subject: [IronPython] Need a Good Embedded Example

I have been looking for a good example of embedding IronPython in a c# 
application. I am under the impression that there have been some major changes 
in the way this is done from version 1.1 to 2.0.

This is what I found at the Python Cookbook site:

namespace IronPythonScriptHost
{
class Program
{
static void Main(string[] args)
{
string code = "print \"Hello \" + Name";
Script.SetVariable ("Name", "Me");
Script.Execute("py", code);
}
}
}

That's nice, but doesn't really help me to know how to get variable output from 
the script back to my c# code. I also need to know how to call scripts with 
multiple statements and whether all variables need to be set on the script 
object, or can their declaration just be part of the script code.

Is there a good and simple example anywhere that shows how to host the 
IronPython engine in a c# app and let users manipulate your program objects via 
ipy scripts?

Thanks!

--
Joshua Pearce

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


[IronPython] Need a Good Embedded Example

2007-10-16 Thread Joshua J. Pearce
I have been looking for a good example of embedding IronPython in a c#
application. I am under the impression that there have been some major
changes in the way this is done from version 1.1 to 2.0.

This is what I found at the Python Cookbook site:

namespace IronPythonScriptHost
{
class Program
{
static void Main(string[] args)
{
string code = "print \"Hello \" + Name";
Script.SetVariable("Name", "Me");
Script.Execute("py", code);
}
}
}

That's nice, but doesn't really help me to know how to get variable output
from the script back to my c# code. I also need to know how to call scripts
with multiple statements and whether all variables need to be set on the
script object, or can their declaration just be part of the script code.

Is there a good and simple example anywhere that shows how to host the
IronPython engine in a c# app and let users manipulate your program objects
via ipy scripts?

Thanks!

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


Re: [IronPython] Announcement: Project to get some CPython C extensions running under IronPython

2007-10-16 Thread Davy Mitchell
>  What would the issues be with NumPy - just the size of the API that

I was most concerned with data types (and converting) which for
statistical based computing needs to be exact. It is a great plus for
DotNet to have common types between languages. After working for years
in mixed VB6/C++ COM applications I really appreciate that :-)

Are Resolver Users looking to reuse their existing code in
spreadsheets or just have the same facilities? If the latter then SWIG
for Dotnet seems a better option than COM and is more Mono friendly.

Cheers,
Davy

On 10/15/07, Giles Thomas <[EMAIL PROTECTED]> wrote:
>
>  Davy,
>
>  What would the issues be with NumPy - just the size of the API that would
> have to be wrapped?  I must admin that my biggest concern with this would be
> getting everything running under Mono...
>
>
>  Cheers,
>
>  Giles
>
>
>  Davy Mitchell wrote:
>  On 10/12/07, Giles Thomas
> <[EMAIL PROTECTED]> wrote:
>
>
>  Python and .NET, but also the existing CPython C extensions.
>
>  Hi Giles,
>
> Sounds like a good idea and the approaches mentioned seemed solid.
>
> One strategy I was considering for a port of my Mood News site to
> Ironpython (but not tried yet!) is wrapping a CPython Lib into a COM
> object using the win32 stuff and getting it into .Net via the COM
> interop support.
>
> Maybe not practical for Numpy :-) Does have the advantage of not
> having to modify the original lib...
>
> Cheers,
> Davy
>
>
>
>  --
> Giles Thomas
> MD & CTO, Resolver Systems Ltd.
> [EMAIL PROTECTED]
> +44 (0) 20 7253 6372
>
> We're hiring! http://www.resolversystems.com/jobs/
>
> 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
>
>


-- 
Davy Mitchell
Blog - http://www.latedecember.co.uk/sites/personal/davy/
Twitter - http://twitter.com/daftspaniel
Skype - daftspaniel
needgod.com
___
Users mailing list
Users@lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


Re: [IronPython] [python] Re: Announcement: Project to get some CPythonCextensions running under IronPython

2007-10-16 Thread Giles Thomas
I've set up a Google Group for the project; if you're interested in 
participating, you can sign up here:





Thanks,

Giles


Giles Thomas wrote:

In an appropriately Pythonesque manner, this is getting very silly :-)

Let's go for "C Extensions for IronPython".  I'll set up a mailing 
list and post the details here.



Regards,

Giles


Michael Foord wrote:

Personally, I like the name "C Extensions for IronPython".  It's descriptive.

  



CexFIP

Cex for IronPython ??

:-)

Michael


  

Joe
___
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
  


--
Giles Thomas
MD & CTO, Resolver Systems Ltd.
[EMAIL PROTECTED]
+44 (0) 20 7253 6372

We're hiring! http://www.resolversystems.com/jobs/ 


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
  


--
Giles Thomas
MD & CTO, Resolver Systems Ltd.
[EMAIL PROTECTED]
+44 (0) 20 7253 6372

We're hiring! http://www.resolversystems.com/jobs/ 


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


Re: [IronPython] [python] Re: Announcement: Project to get some CPythonCextensions running under IronPython

2007-10-16 Thread Giles Thomas

In an appropriately Pythonesque manner, this is getting very silly :-)

Let's go for "C Extensions for IronPython".  I'll set up a mailing list 
and post the details here.



Regards,

Giles


Michael Foord wrote:

Personally, I like the name "C Extensions for IronPython".  It's descriptive.

  



CexFIP

Cex for IronPython ??

:-)

Michael


  

Joe
___
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
  


--
Giles Thomas
MD & CTO, Resolver Systems Ltd.
[EMAIL PROTECTED]
+44 (0) 20 7253 6372

We're hiring! http://www.resolversystems.com/jobs/ 


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