You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
though the Mono runtime is less supported so there still may be
problems.
</p>
<a name="getting_started"></a>
<h2>Getting Started</h2>
<p> A key goal for this project has been that Python for .NET should
"work just the way you'd expect in Python", except for cases that
are .NET specific (in which case the goal is to work "just the way
you'd expect in C#"). In addition, with the IronPython project
gaining traction, it is my goal that code written for IronPython
having established a community, it is my goal that code written for IronPython
run without modification under Python for .NET.
</p>
<p> If you already know Python, you can probably finish this readme
Expand All
@@ -195,18 +187,13 @@ <h2>Getting Started</h2>
you probably just need to pick up one of the many good Python
books or read the Python tutorial online to get started.
</p>
<p> A good way to start is to run <strong>python.exe</strong> and
follow along with the examples in this document. If you get stuck,
<p> A good way to start is to interactively explore
.NET usage in python interpreter by
following along with the examples in this document. If you get stuck,
there are also a number of demos and unit tests located in the
source directory of the distribution that can be helpful as
examples.
</p>
<p> Note that if you have installed CLR support into your existing
Python installation (rather than using the included python.exe),
you will need to use the line: "'import clr" (lower-case!) to
initially load the clr extension module before trying the
following examples.
</p>
<a name="importing"></a>
<h2>Importing Modules</h2>
<p> Python for .NET allows CLR namespaces to be treated essentially
Expand All
@@ -216,16 +203,6 @@ <h2>Importing Modules</h2>
<pre> from System import String
from System.Collections import *
</pre>
<p>
<em> Note that earlier releases of Python for .NET required you to
import modules through a special top-level package named <code>CLR</code>.
This is no longer required if you are starting python from the
managed python.exe from this distribution.<br>
<code>CLR</code> has been deprecated in favor of the more
pythonic <code>clr</code>, though the syntax is still supported
for backward compatibility.
</em>
</p>
<p> Types from any loaded assembly may be imported and used in this
manner. To load an assembly, use the "AddReference" function in
the "clr" module:
Expand DownExpand Up
@@ -276,8 +253,7 @@ <h2>Using Classes</h2>
</pre>
<a name="generics"></a>
<h2>Using Generics</h2>
<p> When running under versions of the .NET runtime greater than
2.0, you can use generic types. A generic type must be bound to
<p> Pythonnet also supports generic types. A generic type must be bound to
create a concrete type before it can be instantiated. Generic
types support the subscript syntax to create bound types:
</p>
Expand Down
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.