44 < style type ="text/css "> <!- -
55
66body {
7- font: 8pt / 16pt geor gia, verdana;
7+ font: 12pt / 18pt geor gia, verdana;
88 text- decor ation: none;
99 color : # 555753;
1010 background: # ffffff ;
1111 margin: 0px;
1212}
1313
1414p {
15- font : 8 pt/16pt georgia;
15+ font : 12 pt/18pt georgia;
1616}
1717
1818h1 {
19- font : bold 14 pt ;
19+ font : bold 16 pt ;
2020 color : # 000044 ;
2121/*
2222 background-color: #EFEFFF;
6868}
6969
7070li {
71- font : 8 pt/16pt georgia, verdana;
71+ font : 12 pt/18pt georgia, verdana;
7272 text-decoration : none;
7373 color : # 555753 ;
7474}
7575
7676.spacer {
77- font : bold 14 pt ;
77+ font : bold 16 pt ;
7878}
7979
8080.menu {
@@ -122,71 +122,63 @@ <h1>Python for .NET</h1>
122122 </ ul >
123123 </ td >
124124 < td align ="left " valign ="top ">
125- < p > Python for .NET is a package that gives Python programmers
126- nearly seamless integration with the .NET Common Language Runtime
127- (CLR) and provides a powerful application scripting tool for .NET
125+ < p > Python for .NET (pythonnet) is a package that gives Python programmers
126+ nearly seamless integration with the .NET 4.0+ Common Language Runtime
127+ (CLR) on Windows and Mono runtime on Linux and OSX.
128+ Python for .NET provides a powerful application scripting tool for .NET
128129 developers. Using this package you can script .NET applications or
129130 build entire applications in Python, using .NET services and
130- components written in any language that targets the CLR (Managed
131- C++, C#, VB, JScript).
131+ components written in any language that targets the CLR (C#, VB.NET, F#, C++/CLI).
132132 </ p >
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)
135- from Python code. Rather, it is an integration of the C Python
136- engine with the .NET runtime. This approach allows you to use use
137- CLR services and continue to use existing Python code and C-based
135+ 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
137+ 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.3
144- and greater. Current releases are available at the < a href ="http://pythonnet.github.io/ ">
143+ < p > Python for .NET is currently compatible with Python releases 2.7, 3.3, 3.4, and 3.5.
144+ 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/ ">
147147 online archives </ a > of the list, see the < a href ="http://mail.python.org/mailman/listinfo/pythondotnet ">
148148 mailing list information </ a > page. </ p >
149149 < a name ="#installation "> </ a >
150150 < h2 > Installation</ h2 >
151- < p > Python for .NET is available as a source release and as a
152- Windows installer for various versions of Python and the common
153- language runtime from the < a href ="http://pythonnet.github.io/ ">
154- Python for .NET website </ a > . On Windows platforms, you can
155- choose to install .NET-awareness into an existing Python
156- installation as well as install Python for .NET as a standalone
157- package.
151+ < p > Python for .NET is available as a source release on
152+ < a href ="https://github.com/pythonnet/pythonnet/releases "> GitHub </ a >
153+ and as a binary wheel distribution for all supported versions of Python
154+ and the common language runtime from the < a href ="https://pypi.python.org/pypi/pythonnet ">
155+ Python Package Index </ a > .
158156 </ p >
159157
160158 < p > The source release is a self-contained "private" assembly. Just
161- unzip the package wherever you want it, cd to that directory and
162- run python.exe to start using it. Note that the source release
163- does not include a copy of the CPython runtime, so you will need
164- to have installed Python on your machine before using the source
165- release.
166- </ p >
167- < p > < strong > Running on Linux/Mono:</ strong > preliminary testing
159+ unzip the package wherever you want it, cd to that directory,
160+ build the solution < strong > python setup.py build_ext --inplace</ strong > .
161+ Once you start up Python or IPython interpreter in this directory or
162+ append this directory to < strong > sys.path</ strong > ,
163+ 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.
166+ Note that the source release does not include a copy of the CPython runtime,
167+ so you will need to have installed Python on your machine before using
168+ the source release.
169+ </ p >
170+ < p > < strong > Running on Linux/Mono:</ strong > Unit testing
168171 shows that PythonNet will run under < a href ="http://www.go-mono.com "> Mono</ a > ,
169- though the Mono runtime is not yet complete so there still may be
170- problems. The Python for .NET integration layer is 100% managed
171- code, so there should be no long-term issues under Mono - it
172- should work better and better as the Mono platform matures.
173- </ p >
174- < p > Note that if you are running under Mono on a *nix system, you
175- will need to have a compatible version of Python installed. You
176- will also need to create a symbolic link to the copy of
177- libpython2.x.so (in your existing Python installation) in the
178- PythonNet directory. This is needed to ensure that the mono
179- interop dll loader will find it by name. For example:
180- </ p >
181- < pre > ln -s /usr/lib/libpython2.4.so ./python24.so
182- </ pre >
172+ though the Mono runtime is less supported so there still may be
173+ problems.
174+ </ p >
183175 < a name ="getting_started "> </ a >
184176 < h2 > Getting Started</ h2 >
185177 < p > A key goal for this project has been that Python for .NET should
186178 "work just the way you'd expect in Python", except for cases that
187179 are .NET specific (in which case the goal is to work "just the way
188180 you'd expect in C#"). In addition, with the IronPython project
189- gaining traction , it is my goal that code written for IronPython
181+ having established a community , it is my goal that code written for IronPython
190182 run without modification under Python for .NET.
191183 </ p >
192184 < p > If you already know Python, you can probably finish this readme
@@ -195,18 +187,13 @@ <h2>Getting Started</h2>
195187 you probably just need to pick up one of the many good Python
196188 books or read the Python tutorial online to get started.
197189 </ p >
198- < p > A good way to start is to run < strong > python.exe</ strong > and
199- follow along with the examples in this document. If you get stuck,
190+ < p > A good way to start is to interactively explore
191+ .NET usage in python interpreter by
192+ following along with the examples in this document. If you get stuck,
200193 there are also a number of demos and unit tests located in the
201194 source directory of the distribution that can be helpful as
202195 examples.
203196 </ p >
204- < p > Note that if you have installed CLR support into your existing
205- Python installation (rather than using the included python.exe),
206- you will need to use the line: "'import clr" (lower-case!) to
207- initially load the clr extension module before trying the
208- following examples.
209- </ p >
210197 < a name ="importing "> </ a >
211198 < h2 > Importing Modules</ h2 >
212199 < p > Python for .NET allows CLR namespaces to be treated essentially
@@ -216,16 +203,6 @@ <h2>Importing Modules</h2>
216203 < pre > from System import String
217204 from System.Collections import *
218205</ pre >
219- < p >
220- < em > Note that earlier releases of Python for .NET required you to
221- import modules through a special top-level package named < code > CLR</ code > .
222- This is no longer required if you are starting python from the
223- managed python.exe from this distribution.< br >
224- < code > CLR</ code > has been deprecated in favor of the more
225- pythonic < code > clr</ code > , though the syntax is still supported
226- for backward compatibility.
227- </ em >
228- </ p >
229206 < p > Types from any loaded assembly may be imported and used in this
230207 manner. To load an assembly, use the "AddReference" function in
231208 the "clr" module:
@@ -276,8 +253,7 @@ <h2>Using Classes</h2>
276253</ pre >
277254 < a name ="generics "> </ a >
278255 < h2 > Using Generics</ h2 >
279- < p > When running under versions of the .NET runtime greater than
280- 2.0, you can use generic types. A generic type must be bound to
256+ < p > Pythonnet also supports generic types. A generic type must be bound to
281257 create a concrete type before it can be instantiated. Generic
282258 types support the subscript syntax to create bound types:
283259 </ p >
0 commit comments