Several minutes to teach you how to configure Python programs

Source: Internet
Author: User

Python is a language that represents a simple thought. Reading a good Python program is like reading English. Although the requirements for this English language are very strict, I will describe the Python language and perform my own parsing.

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 is typically equivalent to CPython, its 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. Mark Hammond 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 takes it further 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 Python. useless information collection is inherited, as in JPython and JVM.

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.

Warsaw: we have created the JPython Successor "Jython" based on the public JPython 1.1 Release ". This is done to ensure the long term and Stability of the project. All of these are implemented based on the CNRI JPython 1.1.x license. We moved the entire development process to SourceForge.

And use the same open process management that is very suitable for CPython. Finn and I will undoubtedly participate in future development of Jython. Jython will use the OSI-approved CPython 2.0 license for release. It is very similar to the "formal" derivation you will obtain, so the current JPython community should be sure that Jython will never be much different from it. We hope they will eventually be migrated to Jython.

The code is still in the trial phase, but Finn and I will be working on several technical milestones for the Jython 2.0 release (which already contains the Finn errata. CPython 2.0 has enhanced assignment and extended printing features (list understanding will soon be included ).

We have integrated the free Apache Jakarta OROMatcher code to eliminate the need for dual-License and correct many errors. I don't know when the first alpha release of Jython 2.0 will appear, but all the current code is obtained in the SourceForge CVS tree.

  1. Python source code compilation skills
  2. Simple and Easy-to-use Python tools
  3. Introduction to the Python application field
  4. Python Android Object-Oriented Programming-Python applications
  5. How to Use the Python module to parse the configuration file?

Related Article

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.