[Zope-CVS] CVS: PythonNet - README.txt:1.9
Brian Lloyd
cvs-admin at zope.org
Mon Oct 27 21:07:30 EST 2003
Update of /cvs-repository/PythonNet
In directory cvs.zope.org:/tmp/cvs-serv9370
Modified Files:
README.txt
Log Message:
Checkin for b1, before the cable bugs out again :(
=== PythonNet/README.txt 1.8 => 1.9 ===
--- PythonNet/README.txt:1.8 Wed Oct 22 22:53:08 2003
+++ PythonNet/README.txt Mon Oct 27 21:06:58 2003
@@ -2,7 +2,8 @@
Python for .NET is an integration of the C Python engine with the .NET
Common Language Runtime. If you have questions, comments or the answer
- to life, the universe and everything, send them to me: brian at zope.com.
+ to life, the universe and everything, send them to me (brian at zope.com)
+ or to the Python for .NET mailing list: python.net-list at python.org.
The current released version of Python for .NET is 1.0 beta 1.
@@ -260,6 +261,28 @@
drives = Environment.GetLogicalDrives()
+ It is also possible to call managed methods 'unbound' (passing the
+ instance as the first argument) just as with Python methods. This is
+ most often used to explicitly call methods of a base class.
+
+ *Note that there is one caveat related to calling unbound methods: it
+ is possible for a managed class to declare a static method and an
+ instance method with the same name. Since it is not possible for the
+ runtime to know the intent when such a method is called unbound, the
+ static method will always be called.*
+
+ The docstring of CLR a method (__doc__) can be used to view the
+ signature of the method, including overloads if the CLR method is
+ overloaded. You can also use the Python 'help' method to inspect
+ a managed class::
+
+ from CLR.System import Environment
+
+ print Environment.GetFolderPath.__doc__
+
+ help(Environment)
+
+
**Delegates And Events**
Delegates defined in managed code can be implemented in Python. A
@@ -339,8 +362,8 @@
**Using Collections**
- Managed arrays and managed objects that implement the IEnumerable interface
- can be iterated using the standard iteration Python idioms::
+ Managed arrays and managed objects that implement the IEnumerable
+ interface can be iterated using the standard iteration Python idioms::
domain = System.AppDomain.CurrentDomain
@@ -394,6 +417,24 @@
to document it clearly in the source). The rhythym is very similar to
using Python C++ wrapper solutions such as CXX.
+ At a very high level, to embed Python in your application you need to:
+
+ - Reference Python.Runtime.dll in your build environment
+
+ - Call PythonEngine.Intialize() to initialize Python
+
+ - Call PythonEngine.ImportModule(name) to import a module
+
+ The module you import can either start working with your managed app
+ environment at the time its imported, or you can explicitly lookup and
+ call objects in a module you import.
+
+ For general-purpose information on embedding Python in applications, use
+ www.python.org or Google to find (C) examples. Because Python for .NET is
+ so closely integrated with the managed environment, you will generally be
+ better off importing a module and deferring to Python code as early as
+ possible rather than writing a lot of managed embedding code.
+
**Does it work with Zope?**
@@ -405,6 +446,9 @@
**How can I report bugs?**
- I haven't yet set up a mailing list for the project - if there is
- enough interest I will do so. Until then, please email me with any
- issues: brian at zope.com.
+ The Python for .NET mailing list at python.net-list at python.org is the
+ best place to report any issues or problems you encounter. If at all
+ possible, a concise test case demonstrating the problem would be much
+ appreciated.
+
+
More information about the Zope-CVS
mailing list