C# Class Python.Runtime.PyString

Represents a Python (ansi) string object. See the documentation at http://www.python.org/doc/current/api/stringObjects.html for details.
Inheritance: PySequence
Mostra file Open project: fkarb/pythonnet Class Usage Examples

Public Methods

Method Description
IsStringType ( PyObject value ) : bool

IsStringType Method

Returns true if the given object is a Python string.

PyString ( IntPtr ptr ) : System

PyString Constructor

Creates a new PyString from an existing object reference. Note that the instance assumes ownership of the object reference. The object reference is not checked for type-correctness.

PyString ( PyObject o ) : System

PyString Constructor

Copy constructor - obtain a PyString from a generic PyObject. An ArgumentException will be thrown if the given object is not a Python string object.

PyString ( string s ) : System

PyString Constructor

Creates a Python string from a managed string.

Method Details

IsStringType() public static method

IsStringType Method
Returns true if the given object is a Python string.
public static IsStringType ( PyObject value ) : bool
value PyObject
return bool

PyString() public method

PyString Constructor
Creates a new PyString from an existing object reference. Note that the instance assumes ownership of the object reference. The object reference is not checked for type-correctness.
public PyString ( IntPtr ptr ) : System
ptr System.IntPtr
return System

PyString() public method

PyString Constructor
Copy constructor - obtain a PyString from a generic PyObject. An ArgumentException will be thrown if the given object is not a Python string object.
public PyString ( PyObject o ) : System
o PyObject
return System

PyString() public method

PyString Constructor
Creates a Python string from a managed string.
public PyString ( string s ) : System
s string
return System