[Zope-CVS] CVS: PythonNet - README.txt:1.4

Brian Lloyd brian@zope.com
Fri, 1 Aug 2003 10:30:43 -0400


Update of /cvs-repository/PythonNet
In directory cvs.zope.org:/tmp/cvs-serv14820

Modified Files:
	README.txt 
Log Message:
checkpoint refcount fixes

=== PythonNet/README.txt 1.3 => 1.4 ===
--- PythonNet/README.txt:1.3	Thu Jul 24 19:54:51 2003
+++ PythonNet/README.txt	Fri Aug  1 10:30:08 2003
@@ -34,17 +34,17 @@
 
     Mostly :) Some things to note about running under Mono:
 
-    One, it is not currently possible to *build* PS.NET using only the 
+    One, it is not currently possible to *build* PythonNet using only the 
     Mono tools, due to an issue involving the Mono assembler / disassembler. 
     Mono can, however, run the assembly as-is after being built with the 
     MS tools.
 
     Two, if you are running on a *nix system, you will likely need to 
     create a symbolic link to the libpython22.so on your system in the 
-    PS.NET directory so that Mono can find and load the Python shared 
+    PythonNet directory so that Mono can find and load the Python shared 
     library.
 
-    Third, Mono is under heavy development - while most of the PS.NET 
+    Third, Mono is under heavy development - while most of the PythonNet 
     unit tests run, it looks like there are still some parts of the 
     runtime that have yet to be implemented or still have issues that 
     might prevent you from doing certain things in Python.
@@ -123,7 +123,7 @@
 
     Note that if you are running using Mono on Linux you will probably need 
     to create a symbolic link to the copy of libpython22.so  (in your existing 
-    Python installation) in the PS.NET directory, for example:
+    Python installation) in the PythonNet directory, for example:
 
       ln -s /usr/lib/libpython2.2.so ./libpython22.so
 
@@ -198,6 +198,26 @@
           Environment.ExitCode = 1
 
 
+    **Using Indexers**
+
+      If a managed object implements one or more indexers, you can call 
+      the indexer using standard Python indexing:
+
+
+          from CLR.System.Collections import Hashtable
+
+          table = Hashtable()
+          table["key 1"] = "value 1"
+
+
+      Overloaded indexers are supported, using the same notation one 
+      would use in C#:
+
+          items[0, 2]
+
+          items[0, 2, 3]
+
+
     **Using Methods**
 
       Methods of CLR objects behave generally like normal Python methods. 
@@ -263,6 +283,34 @@
           result = object.SomeEvent(...)
 
 
+    **Using Arrays**
+
+      Managed arrays support the standard Python sequence protocols.
+
+          items = SomeObject.GetArray()
+
+          # Get first item
+          v = items[0]
+          items[0] = v
+
+          # Get last item
+          v = items[-1]
+          items[-1] = v
+
+          # Get length
+          l = len(items)
+
+          # Containment test
+          test = v in items
+
+      Multidimensional arrays support indexing using the same notation one 
+      would use in C#:
+
+          items[0, 2]
+
+          items[0, 2, 3]
+
+
     **Deriving From .NET Classes**
 
       This is nearly, but not quite working. It's actually only working 
@@ -278,7 +326,7 @@
       code.
 
       Note: currently you need to put the generated wrappers in the GAC 
-      or in the PS.NET assembly directory in order to load it. Future 
+      or in the PythonNet assembly directory in order to load it. Future 
       versions will likely come up with some way of extending the load 
       path (something like a sys.path for managed assemblies).
 
@@ -298,7 +346,7 @@
 
       Because Python code is inherently unverifiable, Python code runs 
       totally under the radar of the security infrastructure of the CLR. 
-      It hasn't been decided yet exactly what permissions the PS.NET 
+      It hasn't been decided yet exactly what permissions the PythonNet 
       assembly will demand to run, but it will 
 
 
@@ -314,7 +362,7 @@
 
   **Does it work with Zope?**
 
-    Yes, but PS.NET is based on Python 2.2, so you'll need to build a 
+    Yes, but PythonNet is based on Python 2.2, so you'll need to build a 
     Zope from source against Python 2.2. After that, change the z2.py 
     (or rather the start.bat file on windows) to point to the python.exe 
     in the managed assembly.