@@ -133,14 +133,14 @@ <h1>Python for .NET</h1>
133133 < p > Note that this package does < em > not</ em > implement Python as a
134134 first-class CLR language - it does not produce managed code (IL)
135135 from Python code. Rather, it is an integration of the CPython
136- engine with the .NET or Mono runtime. This approach allows you to use use
136+ engine with the .NET or Mono runtime. This approach allows you to use
137137 CLR services and continue to use existing Python code and C-API
138138 extensions while maintaining native execution speeds for Python
139139 code. If you are interested in a pure managed-code implementation
140140 of the Python language, you should check out the < a href ="http://www.ironpython.com "> IronPython</ a >
141141 project, which is in active development.
142142 </ p >
143- < p > Python for .NET is currently compatible with Python releases 2.7, 3.3, 3.4, and 3.5 .
143+ < p > Python for .NET is currently compatible and tested with Python releases 2.7, 3.3, 3.4, 3.5, and 3.6 .
144144 Current releases are available at the < a href ="http://pythonnet.github.io/ ">
145145 Python for .NET website </ a > . To subscribe to the < a href ="http://mail.python.org/mailman/listinfo/pythondotnet ">
146146 Python for .NET mailing list </ a > or read the < a href ="http://mail.python.org/pipermail/pythondotnet/ ">
@@ -161,8 +161,8 @@ <h2>Installation</h2>
161161 Once you start up Python or IPython interpreter in this directory or
162162 append this directory to < strong > sys.path</ strong > ,
163163 then after < strong > import clr</ strong > statement .NET assemblies can be used.
164- You can also run npython .exe to check how python can be embedded
165- in console .NET application.
164+ You can also run < strong > nPython .exe</ strong > ( < strong > mono nPython.exe </ strong > on *nix)
165+ to check how python can be embedded in console .NET application.
166166 Note that the source release does not include a copy of the CPython runtime,
167167 so you will need to have installed Python on your machine before using
168168 the source release.
@@ -339,7 +339,7 @@ <h2>Using Methods</h2>
339339 </ p >
340340 < pre > from System import Environment
341341
342- print Environment.GetFolderPath.__doc__
342+ print( Environment.GetFolderPath.__doc__)
343343
344344 help(Environment)
345345</ pre >
@@ -375,7 +375,7 @@ <h2>Delegates And Events</h2>
375375 callable when it is called:
376376 </ p >
377377 < pre > def my_handler(source, args):
378- print 'my_handler called!'
378+ print( 'my_handler called!')
379379
380380 # instantiate a delegate
381381 d = AssemblyLoadEventHandler(my_handler)
@@ -401,7 +401,7 @@ <h2>Delegates And Events</h2>
401401 way very similar to the C# idiom:
402402 </ p >
403403 < pre > def handler(source, args):
404- print 'my_handler called!'
404+ print( 'my_handler called!')
405405
406406 # register event handler
407407 object.SomeEvent += handler
@@ -421,9 +421,9 @@ <h2>Exception Handling</h2>
421421
422422 try:
423423 raise NullReferenceException("aiieee!")
424- except NullReferenceException, e:
425- print e.Message
426- print e.Source
424+ except NullReferenceException as e:
425+ print( e.Message)
426+ print( e.Source)
427427</ pre >
428428 < p > </ p >
429429 < a name ="arrays "> </ a >
@@ -577,13 +577,16 @@ <h2>Embedding Python</h2>
577577 </ p >
578578 < p > The Python runtime assembly defines a number of public classes
579579 that provide a subset of the functionality provided by the Python
580- C API.
581- </ p >
582- < p > These classes include PyObject, PyList, PyDict, etc. The source
583- and the unit tests are currently the only API documentation.. The
584- rhythym is very similar to using Python C++ wrapper solutions such
585- as CXX.
580+ C-API.
586581 </ p >
582+ < p > These classes include PyObject, PyList, PyDict, PyTuple, etc.
583+ You can review the nPython.exe source code in in "Console.csproj" project
584+ for example of embedding CPython in console .NET app.
585+ Please refer to this README GitHub page for new simplified embedding API:
586+ </ p >
587+ < p >
588+ < a href ="https://github.com/pythonnet/pythonnet/blob/master/README.md "> README.md </ a >
589+ </ p >
587590 < p > At a very high level, to embed Python in your application you
588591 will need to:
589592 </ p >
@@ -607,7 +610,7 @@ <h2>Embedding Python</h2>
607610 free-threaded and uses a global interpreter lock to allow
608611 multi-threaded applications to interact safely with the Python
609612 interpreter. Much more information about this is available in the
610- Python C API documentation on the www.python.org Website.
613+ Python C- API documentation on the www.python.org Website.
611614 </ p >
612615 < p > When embedding Python in a managed application, you have to
613616 manage the GIL in just the same way you would when embedding
0 commit comments