<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 19/01/2010 21:17, Vernon Cole wrote:
<blockquote
 cite="mid:b7eb4a701001191317me36fef7se95c699d8bfced7c@mail.gmail.com"
 type="cite">Vincent:<br>
  <br>
I will try the first part of an answer to your question.&nbsp; It is a long
question, so you will probably get lots of different answers...<br>
  <br>
There are several different implementations of Python. I will talk
about the two which are most common on Windows systems. I use both.<br>
  <br>
CPython is implemented in the C++ language </blockquote>
<br>
Actually C and *not* C++, although that may change if unladen-swallow
is merged back in (unladen-swallow uses LLVM which is written in C++).<br>
<br>
To answer some of the the other questions.<br>
<br>
Yes you *can* create 'exe' files written from compiled Python using
IronPython. The user need never care that the program was written in
Python. You can either use the Pyc compiler to create these directly or
just write a simple '.exe' wrapper in C# that executes the Python code.<br>
<br>
.NET has an FFI (Foreign Function Interface) for integrating .NET
applications written in C/C++. This is what Ironclad uses to interface
with Python C extensions. You can use the FFI (PInvoke) directly for
working with other C/C++ libraries.<br>
<br>
Even though few on this list would recommend using Visual Studio to
edit your Python files you can use the standard .NET build system to
build your project from combined Python, C# and C/C++ sources
relatively easily.<br>
<br>
All the best,<br>
<br>
Michael Foord<br>
<blockquote
 cite="mid:b7eb4a701001191317me36fef7se95c699d8bfced7c@mail.gmail.com"
 type="cite">and uses the traditional (or OLD, depending on your point
of view) method of operating a Windows program.&nbsp; It is much more
mature, starts up much faster, and has lots of available modules,
including numpy, scipy and countless others. You find it at <a
 moz-do-not-send="true" href="http://python.org%20">http://python.org.</a>
To do Windows specific things with it, you also need <a
 moz-do-not-send="true" href="http://sourceforge.net/projects/pywin32">pywin32</a>
.&nbsp; It can be used on a web server, and several web engines such as
django, are written using it.&nbsp; It cannot be used as a client script on
a web page.<br>
  <br>
IronPython is new, written by Microsoft in the C# language, and uses
the new .NET way of hooking things together.&nbsp; It is a VERY good
implementation of standard Python, but since many of the add-on
libraries were written in C++, not C#, you cannot link to them. There
is a package called IronClad which seeks to make this happen, often
successfully. ( <a moz-do-not-send="true"
 href="http://www.resolversystems.com/products/ironclad/">http://www.resolversystems.com/products/ironclad/</a>
.) IronPython also suffers from the frustrating habit of ALL .NET
implementations of taking several seconds (which at times feels like
several minutes) to start a new process running. So while it may often
be FASTER than CPython after it finally gets going, don't even THINK
about using it for a quick command-line script.&nbsp; On the other hand, if
you are trying to interface with a new .NET project, it is only
reasonable way to go.&nbsp; It also runs on the Silverlight platform, so can
be used as a scripting language for a web client page, not only a
server page.<br>
  <br>
I have heard nothing but BAD reports about using Iron Python Studio.
However, there are several Integrated Development Environments which
work with CPython, IronPython, or both.&nbsp; I, personally, use Wing for
debugging, and the IDE which is built in to pywin32 for rough work.<br>
  <br>
Will Python code run as fast as C, or C++, or C# code?&nbsp; No.&nbsp; (or almost
never.)&nbsp; Will it run fast enough that a human user will never notice
the difference?&nbsp; Almost always.&nbsp; So what you do is prototype in Python,
where you are most productive, then if you find that some part of your
system actually needs the performance boost, you recode that piece in
C++ (or C#).&nbsp; I find that design changes usually do much more to boost
perceived speed than compiler changes do.&nbsp; Python excels at that.<br>
  <br>
So welcome aboard.&nbsp; You have discovered a great tool.<br>
--<br>
Vernon Cole<br>
  <br>
  <br>
  <div class="gmail_quote">On Tue, Jan 19, 2010 at 10:22 AM, Vicent <span
 dir="ltr">&lt;<a moz-do-not-send="true" href="mailto:vginer@gmail.com">vginer@gmail.com</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><font
 face="'trebuchet ms', sans-serif">Hello to all.</font>
    <div><font face="'trebuchet ms', sans-serif"><br>
    </font></div>
    <div><font face="'trebuchet ms', sans-serif">This is my first
message to the list. I would like to ask you some basic questions about
IronPython. First of all, sorry for my English.</font></div>
    <div><font face="'trebuchet ms', sans-serif"><br>
    </font></div>
    <div><font face="'trebuchet ms', sans-serif">I've just discovered
IronPython, and I am actually a&nbsp;new-by&nbsp;in Python, not an expert
programmer. So maybe you'll find my questions quite simple or naive.</font></div>
    <div><font face="'trebuchet ms', sans-serif"><br>
    </font></div>
    <div><font face="'trebuchet ms', sans-serif">I read the first
chapter of the classic book for IronPython (</font><span
 style="border-collapse: collapse;"><a moz-do-not-send="true"
 href="http://www.manning.com/foord/SampleChapter1.pdf"
 style="color: rgb(119, 153, 187);" target="_blank"><font
 face="'trebuchet ms', sans-serif">http://www.manning.com/foord/SampleChapter1.pdf</font></a><span
 style="border-collapse: separate;"><font
 face="'trebuchet ms', sans-serif">), and in pages 7-8 the author says:</font></span></span></div>
    <div><span style="border-collapse: collapse;"><span
 style="border-collapse: separate;"><font
 face="'trebuchet ms', sans-serif"><br>
    </font></span></span></div>
    <div><span style="border-collapse: collapse;"><span
 style="border-collapse: separate;"><font
 face="'trebuchet ms', sans-serif">"</font><span
 style="border-collapse: collapse;"><font
 face="'trebuchet ms', sans-serif">Visual Studio 2008 integration
exists in the form of IronPython Studio, which is&nbsp;implemented through
the Visual Studio Shell extensibility framework. IronPython&nbsp;Studio can
either be run standalone (without requiring Visual Studio to be
installed)&nbsp;or integrated into Visual Studio. It includes Windows Forms
and WPF designers and is&nbsp;capable of producing binary executables from
Python projects.</font><span style="border-collapse: separate;"><font
 face="'trebuchet ms', sans-serif">"</font></span></span></span></span></div>
    <div><span style="border-collapse: collapse;"><span
 style="border-collapse: separate;"><span
 style="border-collapse: collapse;"><span
 style="border-collapse: separate;"><font
 face="'trebuchet ms', sans-serif"><br>
    </font></span></span></span></span></div>
    <div><font face="'trebuchet ms', sans-serif">I am very interested
in fully understanding this sentence above, because I currently use C++
in MS Visual Studio 2008, but I like Python more.</font></div>
    <div><font face="'trebuchet ms', sans-serif"><br>
    </font></div>
    <div><font face="'trebuchet ms', sans-serif">So, with IronPython +
Visual Studio 2008:</font></div>
    <div><font face="'trebuchet ms', sans-serif"><br>
    </font></div>
    <div><font face="'trebuchet ms', sans-serif">(1) Can I obtain
compiled code from Python source, as efficient/fast/etc. as if it was
made from C++?</font></div>
    <div><font face="'trebuchet ms', sans-serif">(2)&nbsp;Can I obtain
executables (programs that people can install and use, in the "normal
user" language) as good/fast/efficient as I would obtain using Visual
C++?</font></div>
    <div><font face="'trebuchet ms', sans-serif">(3)&nbsp;Can I easily link
my Python code with existing external C/C++ libraries?</font></div>
    <div><font face="'trebuchet ms', sans-serif">(4)&nbsp;(Similar to the
previous one) Can I easily&nbsp;link my Python code with some&nbsp;C/C++&nbsp;source
code (I mean, mixing up Python and C in the same project, in a
transparent way)?</font></div>
    <div><font face="'trebuchet ms', sans-serif">(5) Can I use NumPy,
SciPy and other key (scientific) Python libraries in a transparent way?</font></div>
    <div><font face="'trebuchet ms', sans-serif"><br>
    </font></div>
    <div><font face="'trebuchet ms', sans-serif">(or am I just
dreaming??)</font></div>
    <div><font face="'trebuchet ms', sans-serif"><br>
    </font></div>
    <div><font face="'trebuchet ms', sans-serif">Any answer will be
appreciated. Thank you in advance.</font></div>
    <div><font face="'trebuchet ms', sans-serif"><br>
    </font></div>
    <div><font face="'trebuchet ms', sans-serif">--</font></div>
    <div><font face="'trebuchet ms', sans-serif">Vicent Giner</font></div>
    <br>
_______________________________________________<br>
Users mailing list<br>
    <a moz-do-not-send="true" href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
    <a moz-do-not-send="true"
 href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com"
 target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
    <br>
  </blockquote>
  </div>
  <br>
  <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a>
<a class="moz-txt-link-freetext" href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a>
  </pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.ironpythoninaction.com/">http://www.ironpythoninaction.com/</a>
<a class="moz-txt-link-freetext" href="http://www.voidspace.org.uk/blog">http://www.voidspace.org.uk/blog</a>

READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (&#8221;BOGUS AGREEMENTS&#8221;) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

</pre>
</body>
</html>