On 15/03/2011 07:18, Vernon Cole wrote:

#!/usr/bin/ipy3

A shebang on the first line is the usual way of specifying which scripting engine to use on a posix system. If introspection were to be used to select between python versions, that would be the most obvious way to do it.

Windows (tm) prefers to use filename extensions, which is why .pyw is used to specify a GUI program. The command shell does not open the file to see what's inside AFAIK.

It was suggested in the past that .ipy might be used to specify IronPython programs. If that idea were carried to its logical end, one would use .ipy3w to specify an IronPython 3.x GUI script. That is a bit frightening.

What about the idea of a semi-standard python dispatch program which lives on the search path, introspects the script, and calls the appropriate engine? Perhaps it could even manage to capture tracebacks sent to stderr when a script dies?


There has been a long discussion recently on Python-dev [1] suggesting the creation of exactly such a launcher program for Python on Windows. Mark Hammond (copied) said he would implement it. Including IronPython support is a fine idea.

All the best,

Michael

[1] http://mail.python.org/pipermail/python-dev/2011-March/108872.html

--
Vernon Cole
(sent from my 'droid phone)

On Mar 15, 2011 3:20 AM, "Markus Schaber" <m.scha...@3s-software.com <mailto:m.scha...@3s-software.com>> wrote:
Hi, Jeff,

Von: Jeff Hardy


> With the 2.7 out the door, it's time to start thinking about 3.x. I've
> created a ipy-2.7-maint ...

Your plans sound good for us.

But we're just releasing a product hosting IronPython 2.6.2, as we're
still bound to .NET 2.0 for some months, but our plans to upgrade to
.NET 4.0 are on the way. So we are interested in smooth migration paths
for our customers.

Will it be possible to integrate / host both python 2.x (2.7.x) and 3.x
in the same application?

And is there some mechanism to auto-recognize whether a Script is python
2.x or 3.x syntax? Maybe some "from __future__ import Python3" or
something?

If there's work needed in that area, maybe I can convince my seniors
that we contribute.

(I used to work a lot with Python and contribute to free projects in
some of my former working places...)



Best regards

Markus Schaber

--
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Developer
Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 <tel:%2B49-831-54031-0> |
Fax +49-831-54031-50 <tel:%2B49-831-54031-50>

Email: m.scha...@3s-software.com <mailto:m.scha...@3s-software.com> | Web: http://www.3s-software.com
CoDeSys internet forum: http://forum.3s-software.com
Download CoDeSys sample projects:
http://www.3s-software.com/index.shtml?sample_projects

Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner |
Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915

_______________________________________________
Users mailing list
Users@lists.ironpython.com <mailto:Users@lists.ironpython.com>
http:/...


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


--
http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html

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

Reply via email to