Detailed analysis of Python script problems

Source: Internet
Author: User

David Mertz interviewed JPython and Python for. NET developers Mark Hammond, Finn Bock and Barry Warsaw. He learned from Mark about some of the latest proprietary news about Microsoft Development (of course, all content is under confidentiality contract restrictions) I also learned some information about JPython AND THE Jython project they are about to release from Finn and Barry.

Although Python scripts are typically equivalent to CPython, their specifications have been implemented many times elsewhere, including in Java and. NET applications. JPython compiles Python source code into Java bytecode and provides transparent access to Java classes.

Python for. NET is an application of Microsoft's cross-language technology platform. Interview with Mark Hammond, Finn Bock, and Barry Warsaw. I found more information about how JPython and Python for. NET are developed, and what preparations are made for these alternative Python implementations in the future.

Python for. NET is well-known to many Python programmers for its excellent development in the PythonWin environment and PythonCOM extension. Microsoft also values Mark for the same reason we admire Mark. They decided to ask for help in the implementation of Python for. NET. According to Mark, the working version of Python for. NET should be available soon, And now you should be able to get its alpha or beta version from ActiveState (see references ).

David Mertz: What is Python for. NET? I want to know the relationship between Python for. NET and your own PythonWin and PythonCOM extensions for CPython (they seem to be able to control Windows.

Mark Hammond: Python for. NET is a compiler and runtime that implements Python on Microsoft's. NET platform .. The. NET platform provides a runtime and metadata system designed to allow complete language interoperability. However, to achieve this, the language must be available during the runtime.

For example, if the Python class is public so that Visual Basic programmers can inherit it, the Python class must be implemented and described in. NET rather than CPython. The advantage of Python. NET is that it can interoperate with the. NET Framework. There are still many defects, mainly due to the immature implementation. However, this is only a matter of time. We are still in the beta stage of development and debugging.

Mertz: What do you think about the incompatibility between current Python for. NET and CPython? Hammond: Yes. Most modules have not yet been implemented, so the modules written in C cannot be exactly used. If your target is not a. NET Framework, it is best not to use Python. NET at this time.

Mertz: however, Python for. NET certainly has some major advantages, such as convenient inter-language communication and multi-language application development. But why do you say it is better than the existing ones-such as Python + C + SWIG (of course, the assumption ).

Hammond: the current development of Python + C + SWIG should be obvious. Inter-language calls should never be as difficult as using Python + C + SWIG. But SWIG is a great product in many other aspects. It unveil the mysteries of Python C extensions and only puts them into the difficult ranks.

It is more reasonable to compare. NET with COM or Corba. Both COM and Corba provide cross-language call "applicable" Solutions, without any manual involvement or compilation .. NET, and provides cross-language inheritance and exception capabilities. These advantages are very similar to those found in multi-language implementation under the Java Virtual Machine.

Mertz: Python for. NET compiles Python scripts into external Virtual Machine formats. Does. net vm support some external features of Stackless and Vyper, such as continuity, generator, collaborative program, tail recursion or delay evaluation?

Hammond: Yes, theoretically. However, some terms of the Microsoft Beta Protocol do not allow me to talk about performance issues. Let's focus on the features defined in core Python language references. Useless information collection is inherited, as in JPython and JVM.

Mertz: Next, let's talk about the policy theme. Why do you think Microsoft is developing Python for. NET?
Hammond: in this way, the target. NET user can use the Python script.

Microsoft has long been determined to participate in Python and many other languages to ensure that their VMS can be used without knowing the language. According to feedback from implementers of various languages, they have made a lot of changes to their VMS.

  1. Introduction to Python system files
  2. How to correctly use Python Functions
  3. Detailed introduction and analysis of Python build tools
  4. Advantages of Python in PythonAndroid
  5. How to Use the Python module to parse the configuration file?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.