Re: Difference between CPython, Python for .NET and IronPython?

2006-02-20 Thread Ian Bicking
Claudio Grondi wrote:
> I have asked similar 'question' some weeks ago in the German Python
> newsgroup.
> It seems, that that Pythonistas have generally not much interest in
> IronPython waiting for at least release 2.0 of it which is _perhaps_
> expected to support Mono.

My understanding is that Mono developers are trying to make each
release of Mono support whatever the last release of IronPython was.
So there might be a lag, or you have to run a version behind, to use
Mono.  But it is supported.  At least, I think I read something to that
effect in the IronPython archives; I haven't tried it.

My more vague impression is that most Python people are happy enough
with CPython (because they better be happy, because that's what we've
had), and at least people like myself dread nothing more than trying to
install software or platforms.  I suppose there's also a group who are
interested in these interpreter/runtime level issues, but are working
away on PyPy.  PyPy has stolen away at least one major developer from
Jython (though in all fairness I think he'd mostly left anyway).

That said, I think concrete instructions on exactly how to get
IronPython up and working -- for someone with no .NET experience or
familiarity with that toolset -- would be an excellent way to bring
more attention to IronPython from the existing Python community.

  Ian

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Difference between CPython, Python for .NET and IronPython?

2006-02-18 Thread Diez B. Roggisch
> For example, if I'm running IronPython, can I access modules such as Numeric
> and numarray?

AFAIK not. You can run pure python modules, but not extensions 
containing native code.

> As I understand it, interoperability with C# and .NET works in both
> directions with IronPython, but CPython modules cannot be imported, or? 

If they are pure python they can. However, there isn't e.g. a os-module 
in IronPython (at least on mono under MacOSX) - so I guess the situation 
is similar to Jython: you are basically limited to what the host-runtime 
delivers.

> With Python for .NET I can import the .NET Framework and continue using
> CPython modules, or?

Yes. It's a bridge. Problem is: you can't use Python-Objects in 
.NET-code, which is at least theoretically possible in IronPython (not 
sure if it has something like the jythonc of jython that makes that 
possible for jython, or if it can be done more automagically)

> 
> What is the roadmap for IronPython, will it be possible to import CPython
> modules in the near future?

I doubt it - it's just not the goal, after all you want the CLR 
precisely for _not_ needing bindings for C-libs on various platforms. 
However, I guess a goal is that you get all python modules in IronPython 
that are availablein the standard dist to make pure-python modules run 
out of the box. But I don't have any insights on that.

> One last question, is IronPython cross-platform. That is, can I use
> IronPython with Mono?


Yes, I did so under mono/MacOSX.

Diez
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Difference between CPython, Python for .NET and IronPython?

2006-02-18 Thread Claudio Grondi
Carl Johan Rehn wrote:
> What is the difference between CPython, Python for .NET, and IronPython?
> 
> For example, if I'm running IronPython, can I access modules such as Numeric
> and numarray?
>  
> As I understand it, interoperability with C# and .NET works in both
> directions with IronPython, but CPython modules cannot be imported, or? 
> 
> With Python for .NET I can import the .NET Framework and continue using
> CPython modules, or?
> 
> What is the roadmap for IronPython, will it be possible to import CPython
> modules in the near future?
> 
> One last question, is IronPython cross-platform. That is, can I use
> IronPython with Mono?
> 
> Carl
I have asked similar 'question' some weeks ago in the German Python 
newsgroup.
It seems, that that Pythonistas have generally not much interest in 
IronPython waiting for at least release 2.0 of it which is _perhaps_ 
expected to support Mono.
It seems, that usage of IronPython is currently limited to Windows 
platform, but I was not able to attract any expert on it to give a clear 
answer to that.
My own short test has shown, that compiled DLLs (extension modules) 
don't work in IronPython and the created .exe-s of simple Python scripts 
fail to run.
Curious to hear if there will be any expert response to your posting 
here (except replies from people like me, who have no idea about the 
subject themselves).

Claudio
-- 
http://mail.python.org/mailman/listinfo/python-list


Difference between CPython, Python for .NET and IronPython?

2006-02-18 Thread Carl Johan Rehn
What is the difference between CPython, Python for .NET, and IronPython?

For example, if I'm running IronPython, can I access modules such as Numeric
and numarray?
 
As I understand it, interoperability with C# and .NET works in both
directions with IronPython, but CPython modules cannot be imported, or? 

With Python for .NET I can import the .NET Framework and continue using
CPython modules, or?

What is the roadmap for IronPython, will it be possible to import CPython
modules in the near future?

One last question, is IronPython cross-platform. That is, can I use
IronPython with Mono?

Carl
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for .NET and IronPython

2005-11-03 Thread Gerard Flanagan

John Salerno wrote:
> Hi all. I'm currently learning C#, and I'm also interested in learning
> Python

In a similar position to yourself - learning both languages - I can
definitely recommend Python ( though C# 's curly brackets might annoy
you more than they did before!!)

> so it seems like a decent
> idea to want to integrate the two

FWIW, what I've been doing lately is calling Python scripts from
Windows.Forms apps, capturing their 'StdOut'.  There's an article on
http://www.thecodeproject.com which explains how you can do this
asynchronously, but the following (C#) code is what I'm using ( imagine
a Windows Form with a TextBox to enter the script name, another to
enter any arguments for the script, and 'Run', 'Cancel' and 'Browse'
CommandButtons).


(assumes the script requires no user interaction)

private void BrowseForScript_Click(object sender, System.EventArgs e)
{
if ( this.openFileDialog.ShowDialog() == DialogResult.OK )
{
this.txtIO.Clear();
this.txtIO.Focus();
this.txtIO.AppendText( openFileDialog.FileName);
}
}

private void Run_Click(object sender, System.EventArgs e)
{
System.Diagnostics.ProcessStartInfo startInfo;
System.Diagnostics.Process process;
string directory;
string pyArgs;
string script;

script = this.txtIO.Text.Trim();

if ( script == null || script.Length == 0 )
{
return;
}

try
{
directory = Path.GetDirectoryName( script );
script = Path.GetFileName( script );
}
catch (ArgumentException)
{
MessageBox.Show("The script file path contains invalid 
characters.",
"Invalid Script Path",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}

if ( script.Length == 0 )
{
MessageBox.Show("No script file has been specified.",
"Invalid Script Path",
MessageBoxButtons.OK,
MessageBoxIcon.Error);
return;
}

if ( directory == null || directory.Length == 0 )
{
directory = DEFAULT_SCRIPT_DIRECTORY;
}

pyArgs = this.txtArgs.Text.Trim();

startInfo = new ProcessStartInfo("python");
startInfo.WorkingDirectory = directory;
startInfo.Arguments = script + " " + pyArgs;
startInfo.UseShellExecute = false;
startInfo.CreateNoWindow = true;
startInfo.RedirectStandardOutput = true;
startInfo.RedirectStandardError = true;

process = new Process();
process.StartInfo = startInfo;
process.Start();

string s;
while ((s = process.StandardOutput.ReadLine()) != null)
{
this.__application.Write( s + "\n" );
}

while ((s = process.StandardError.ReadLine()) != null)
{
this.__application.Write( s + "\n" );
}
}


Gerard

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for .NET and IronPython

2005-11-03 Thread Luis M. Gonzalez
I just want to clarify that the above mentioned web site
(www.ironpython.com) is no longer maintained.
If you want to get updated information on IronPython, you should visit
this site:
www.gotdotnet.com/Workspaces/Workspace.
aspx?id=ad7acff7-ab1e-4bcb-99c0-57ac5a3a9742

Or the mailing list here:
http://lists.ironpython.com/pipermail/users-ironpython.com/

By the way, the current version is 0.9.3 and it's advancing at a pretty
fast pace towards version 1.0.

Luis

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for .NET and IronPython

2005-11-02 Thread Alex Martelli
hrh1818 <[EMAIL PROTECTED]> wrote:

> For more information on Iron Python see http://www.ironpython.com/
> My take on Iron Python is the new job the develolper of Iron Python
> started last year takes up just about all of his time and the developer
> is currently spending very little time actively developing Iron Python.
> I suspect it will be a long time before Iron Python will be a main
> stream product. Hence I suggest you spend your time learning Python and
> C# and you forget about Iron Python until it is more fully developed.

According to the guy who came present IronPython at EURO OScon, there's
now 1.5 people (both MS employees) working on IronPython -- the
presenter himself, fulltime, and Jim Hugunin, halftime.  The language is
just about ready (with a few last decisions to make, such as, stick to
unicode-only strings like Jython, or strive for greater practical
compatibility with current CPython?); it passes the CPython unit-tests,
with a few adjustments needed where the tests overspecify some aspects
of behavior compared to the Language Manual.

What's missing is a lot of the Python standard library -- most of the
parts that are written in C in CPython (and, I believe, in Java in
Jython).  My impression is that the realistic timeframe to implement
those is several months; meanwhile, IronPython is usable if you're
willing to make direct calls to the standard MSCLR libraries (i.e.,
forego ease of future moves to CPython).

A beginner might be best advised to stick with CPython (and, if DotNet
is needed, perhaps the Python-like language Boo) while IronPython
stabilizes and fleshes out, but I'm rather more optimistic than you
about the speed with which that will happen.


Alex
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for .NET and IronPython

2005-11-02 Thread Brett Hoerner

hrh1818 wrote:
> For more information on Iron Python see http://www.ironpython.com/
> My take on Iron Python is the new job the develolper of Iron Python
> started last year takes up just about all of his time and the developer
> is currently spending very little time actively developing Iron Python.

Actually, he just stopped updating ironpython.com (a bad idea, imo)
apparently.

Last release was 10/13 through Microsoft,
http://www.microsoft.com/downloads/details.aspx?FamilyID=c6a7fee3-6495-427f-8b1f-768a2715170c&DisplayLang=en

If that link doesn't work you can just search "IronPython" on
microsoft.com

Brett

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for .NET and IronPython

2005-11-02 Thread James
IronPython is good if you want to bring in Python into a .NET world.

Python for .NET is good if you want to bring in .NET into a Python
world.

As for your learning concerns, there need be none. There is really
nothing to learn extra for the integration. They just work. Once you
learn the .NET framework and Python, there isn't much to know
additionally.

While you are on topic, check out Boo. It is not the same as the ones
you mentioned but you might find it interesting and useful while
working with .NET if you have Python tastes.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for .NET and IronPython

2005-11-02 Thread hrh1818
For more information on Iron Python see http://www.ironpython.com/
My take on Iron Python is the new job the develolper of Iron Python
started last year takes up just about all of his time and the developer
is currently spending very little time actively developing Iron Python.
I suspect it will be a long time before Iron Python will be a main
stream product. Hence I suggest you spend your time learning Python and
C# and you forget about Iron Python until it is more fully developed.


Howard


John Salerno wrote:
> Hi all. I'm currently learning C#, and I'm also interested in learning
> Python (all of this just for fun, mind you), so it seems like a decent
> idea to want to integrate the two. But I don't quite understand the
> difference between these two Python implementations and I was hoping
> someone could explain.
>
> Does either one require learning something different than the core
> Python language? With IronPython, would you actually be writing .NET
> code? I know Python for .NET is treated as a true language in the CLR,
> but I don't quite grasp what all this means for each language, and what
> the learning process for either language would be like as a result.
> 
> Thanks,
> John

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for .NET and IronPython

2005-11-02 Thread Steve M
I was under the impression that IronPython is like CPython and Jython,
namely an implementation of the Python language. So in that sense it is
exactly like normal Python, although I don't know how convenient it is
to deploy.

I was also under the impression that Python for .NET is like an API
wrapper thingy, analagous to the win32com package that wraps that
interface and allows you to call functions and stuff provided by the
.NET API. It is not at all an implementation of Python.

I am confident that we will learn shortly whether I'm wrong.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python for .NET and IronPython

2005-11-02 Thread John Salerno
John Salerno wrote:

> code? I know Python for .NET is treated as a true language in the CLR, 
> but I don't quite grasp what all this means for each language

isn't* treated, I meant to say!
-- 
http://mail.python.org/mailman/listinfo/python-list


Python for .NET and IronPython

2005-11-02 Thread John Salerno
Hi all. I'm currently learning C#, and I'm also interested in learning 
Python (all of this just for fun, mind you), so it seems like a decent 
idea to want to integrate the two. But I don't quite understand the 
difference between these two Python implementations and I was hoping 
someone could explain.

Does either one require learning something different than the core 
Python language? With IronPython, would you actually be writing .NET 
code? I know Python for .NET is treated as a true language in the CLR, 
but I don't quite grasp what all this means for each language, and what 
the learning process for either language would be like as a result.

Thanks,
John
-- 
http://mail.python.org/mailman/listinfo/python-list