diff --git a/index.html b/index.html index a731010..b82f427 100644 --- a/index.html +++ b/index.html @@ -114,13 +114,13 @@

Python for .NET

Note that this package does not implement Python as a first-class CLR language - it does not produce managed code (IL) from Python code. Rather, it is an integration of the CPython - engine with the .NET or Mono runtime. This approach allows you to use use + engine with the .NET or Mono runtime. This approach allows you to use CLR services and continue to use existing Python code and C-based extensions while maintaining native execution speeds for Python code. If you are interested in a pure managed-code implementation of the Python language, you should check out the IronPython project, which is in active development.

-

Python for .NET is currently compatible with Python releases 2.7, 3.3, 3.4, and 3.5. +

Python for .NET is currently compatible with Python releases 2.7, 3.3, 3.4, 3.5 and 3.6. To subscribe to the Python for .NET mailing list or read the online archives of the list, see the diff --git a/readme.html b/readme.html index 91cd98c..b9ffe54 100644 --- a/readme.html +++ b/readme.html @@ -133,14 +133,14 @@

Python for .NET

Note that this package does not implement Python as a first-class CLR language - it does not produce managed code (IL) from Python code. Rather, it is an integration of the CPython - engine with the .NET or Mono runtime. This approach allows you to use use + engine with the .NET or Mono runtime. This approach allows you to use CLR services and continue to use existing Python code and C-API extensions while maintaining native execution speeds for Python code. If you are interested in a pure managed-code implementation of the Python language, you should check out the IronPython project, which is in active development.

-

Python for .NET is currently compatible with Python releases 2.7, 3.3, 3.4, and 3.5. +

Python for .NET is currently compatible and tested with Python releases 2.7, 3.3, 3.4, 3.5, and 3.6. Current releases are available at the Python for .NET website . To subscribe to the Python for .NET mailing list or read the @@ -161,8 +161,8 @@

Installation

Once you start up Python or IPython interpreter in this directory or append this directory to sys.path, then after import clr statement .NET assemblies can be used. - You can also run npython.exe to check how python can be embedded - in console .NET application. + You can also run nPython.exe (mono nPython.exe on *nix) + to check how python can be embedded in console .NET application. Note that the source release does not include a copy of the CPython runtime, so you will need to have installed Python on your machine before using the source release. @@ -339,7 +339,7 @@

Using Methods

    from System import Environment
 
-    print Environment.GetFolderPath.__doc__
+    print(Environment.GetFolderPath.__doc__)
 
     help(Environment)
 
@@ -375,7 +375,7 @@

Delegates And Events

callable when it is called:

    def my_handler(source, args):
-        print 'my_handler called!'
+        print('my_handler called!')
 
     # instantiate a delegate
     d = AssemblyLoadEventHandler(my_handler)
@@ -401,7 +401,7 @@ 

Delegates And Events

way very similar to the C# idiom:

    def handler(source, args):
-        print 'my_handler called!'
+        print('my_handler called!')
 
     # register event handler
     object.SomeEvent += handler
@@ -421,9 +421,9 @@ 

Exception Handling

try: raise NullReferenceException("aiieee!") - except NullReferenceException, e: - print e.Message - print e.Source + except NullReferenceException as e: + print(e.Message) + print(e.Source)

@@ -577,13 +577,16 @@

Embedding Python

The Python runtime assembly defines a number of public classes that provide a subset of the functionality provided by the Python - C API. -

-

These classes include PyObject, PyList, PyDict, etc. The source - and the unit tests are currently the only API documentation.. The - rhythym is very similar to using Python C++ wrapper solutions such - as CXX. + C-API.

+

These classes include PyObject, PyList, PyDict, PyTuple, etc. + You can review the nPython.exe source code in in "Console.csproj" project + for example of embedding CPython in console .NET app. + Please refer to this README GitHub page for new simplified embedding API: +

+

+ README.md +

At a very high level, to embed Python in your application you will need to:

@@ -607,7 +610,7 @@

Embedding Python

free-threaded and uses a global interpreter lock to allow multi-threaded applications to interact safely with the Python interpreter. Much more information about this is available in the - Python C API documentation on the www.python.org Website. + Python C-API documentation on the www.python.org Website.

When embedding Python in a managed application, you have to manage the GIL in just the same way you would when embedding pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy