[Zope-CVS] CVS: PythonNet - README.txt:1.6
Brian Lloyd
brian at zope.com
Sat Aug 9 00:54:19 EDT 2003
Update of /cvs-repository/PythonNet
In directory cvs.zope.org:/tmp/cvs-serv8616
Modified Files:
README.txt
Log Message:
readme fixes
=== PythonNet/README.txt 1.5 => 1.6 ===
--- PythonNet/README.txt:1.5 Fri Aug 8 23:29:46 2003
+++ PythonNet/README.txt Fri Aug 8 23:54:15 2003
@@ -7,7 +7,7 @@
The current released version of Python for .NET is preview-2.
- **What is Python Scripting For .NET?**
+ **What is Python For .NET?**
Python for .NET gives Python programmers near-seamless integration with
the .NET Common Language Runtime (CLR). Using this package you can script
@@ -207,7 +207,7 @@
**Using Indexers**
If a managed object implements one or more indexers, you can call
- the indexer using standard Python indexing:
+ the indexer using standard Python indexing::
from CLR.System.Collections import Hashtable
@@ -217,7 +217,7 @@
Overloaded indexers are supported, using the same notation one
- would use in C#:
+ would use in C#::
items[0, 2]
@@ -231,7 +231,7 @@
instance of the class. All public and protected methods of CLR objects
are accessible to Python::
- from CLR.System import Enviroment
+ from CLR.System import Environment
drives = Environment.GetLogicalDrives()
@@ -242,23 +242,22 @@
delegate type can be instantiated and passed a callable Python object
to get a delegate instance. The resulting delegate instance is a true
managed delegate that will invoke the given Python callable when it
- is called.::
+ is called::
def my_handler(source, args):
- ...
+ print 'my_handler called!'
# instantiate a delegate
-
d = AssemblyLoadEventHandler(my_handler)
# use it as an event handler
-
AppDomain.CurrentDomain.AssemblyLoad += d
Multicast delegates can be implemented by adding more callable objects
to a delegate instance::
+
d += self.method1
d += self.method2
d()
@@ -274,24 +273,21 @@
'+=' and '-=' operators in a way very similar to the C# idiom::
def handler(source, args):
- ...
+ print 'my_handler called!'
# register event handler
-
object.SomeEvent += handler
# unregister event handler
-
object.SomeEvent -= handler
# fire the event
-
result = object.SomeEvent(...)
**Using Arrays**
- Managed arrays support the standard Python sequence protocols.
+ Managed arrays support the standard Python sequence protocols::
items = SomeObject.GetArray()
@@ -310,7 +306,7 @@
test = v in items
Multidimensional arrays support indexing using the same notation one
- would use in C#:
+ would use in C#::
items[0, 2]
More information about the Zope-CVS
mailing list