Skip to content

Small fixes while reviewing the document #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ <h1>Python for .NET</h1>
<p> Note that this package does <em>not</em> 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 <a href="http://www.ironpython.com">IronPython</a>
project, which is in active development. </p>
<p> Python for .NET is currently compatible with Python releases 2.7, 3.3, 3.4, and 3.5.
<p> Python for .NET is currently compatible with Python releases 2.7, 3.3, 3.4, 3.5 and 3.6.
To subscribe to the <a href="http://mail.python.org/mailman/listinfo/pythondotnet">
Python for .NET mailing list </a> or read the <a href="http://mail.python.org/pipermail/pythondotnet/">
online archives </a> of the list, see the <a href="http://mail.python.org/mailman/listinfo/pythondotnet">
Expand Down
37 changes: 20 additions & 17 deletions readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ <h1>Python for .NET</h1>
<p> Note that this package does <em>not</em> 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 <a href="http://www.ironpython.com">IronPython</a>
project, which is in active development.
</p>
<p> Python for .NET is currently compatible with Python releases 2.7, 3.3, 3.4, and 3.5.
<p> 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 <a href="http://pythonnet.github.io/">
Python for .NET website </a>. To subscribe to the <a href="http://mail.python.org/mailman/listinfo/pythondotnet">
Python for .NET mailing list </a> or read the <a href="http://mail.python.org/pipermail/pythondotnet/">
Expand All @@ -161,8 +161,8 @@ <h2>Installation</h2>
Once you start up Python or IPython interpreter in this directory or
append this directory to <strong>sys.path</strong>,
then after <strong>import clr</strong> 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 <strong>nPython.exe</strong> (<strong>mono nPython.exe</strong> 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.
Expand Down Expand Up @@ -339,7 +339,7 @@ <h2>Using Methods</h2>
</p>
<pre> from System import Environment

print Environment.GetFolderPath.__doc__
print(Environment.GetFolderPath.__doc__)

help(Environment)
</pre>
Expand Down Expand Up @@ -375,7 +375,7 @@ <h2>Delegates And Events</h2>
callable when it is called:
</p>
<pre> def my_handler(source, args):
print 'my_handler called!'
print('my_handler called!')

# instantiate a delegate
d = AssemblyLoadEventHandler(my_handler)
Expand All @@ -401,7 +401,7 @@ <h2>Delegates And Events</h2>
way very similar to the C# idiom:
</p>
<pre> def handler(source, args):
print 'my_handler called!'
print('my_handler called!')

# register event handler
object.SomeEvent += handler
Expand All @@ -421,9 +421,9 @@ <h2>Exception Handling</h2>

try:
raise NullReferenceException("aiieee!")
except NullReferenceException, e:
print e.Message
print e.Source
except NullReferenceException as e:
print(e.Message)
print(e.Source)
</pre>
<p></p>
<a name="arrays"></a>
Expand Down Expand Up @@ -577,13 +577,16 @@ <h2>Embedding Python</h2>
</p>
<p> The Python runtime assembly defines a number of public classes
that provide a subset of the functionality provided by the Python
C API.
</p>
<p> 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.
</p>
<p> 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:
</p>
<p>
<a href="https://github.com/pythonnet/pythonnet/blob/master/README.md"> README.md </a>
</p>
<p> At a very high level, to embed Python in your application you
will need to:
</p>
Expand All @@ -607,7 +610,7 @@ <h2>Embedding Python</h2>
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.
</p>
<p> When embedding Python in a managed application, you have to
manage the GIL in just the same way you would when embedding
Expand Down