3
3
[ ![ appveyor shield] [ ]] ( https://ci.appveyor.com/project/pythonnet/pythonnet/branch/master )
4
4
[ ![ travis shield] [ ]] ( https://travis-ci.org/pythonnet/pythonnet )
5
5
[ ![ codecov shield] [ ]] ( https://codecov.io/github/pythonnet/pythonnet )
6
+
6
7
[ ![ license shield] [ ]] ( ./LICENSE )
7
8
[ ![ pypi package version] [ ]] ( https://pypi.python.org/pypi/pythonnet )
8
9
[ ![ python supported shield] [ ]] ( https://pypi.python.org/pypi/pythonnet )
10
+ [ ![ stackexchange shield] [ ]] ( http://stackoverflow.com/questions/tagged/python.net )
11
+ [ ![ slack] [ ]] ( https://pythonnet.slack.com )
9
12
10
13
Python for .NET is a package that gives Python programmers nearly
11
14
seamless integration with the .NET Common Language Runtime (CLR) and
@@ -35,14 +38,14 @@ from System.Windows.Forms import Form
35
38
## Embedding Python in .NET
36
39
37
40
- All calls to python should be inside
38
- a ` using (Py.GIL()) {/_ Your code here _ /} ` block.
41
+ a ` using (Py.GIL()) {/* Your code here * /} ` block.
39
42
- Import python modules using ` dynamic mod = Py.Import("mod") ` ,
40
43
then you can call functions as normal, eg ` mod.func(args) ` .
41
44
- Use ` mod.func(args, Py.kw("keywordargname", keywordargvalue)) `
42
45
to apply keyword arguments.
43
46
- All python objects should be declared as ` dynamic ` type.
44
47
- Mathematical operations involving python and literal/managed types must
45
- have the python object first, eg ` np.pi_2 ` works, ` 2_np.pi ` doesn't.
48
+ have the python object first, eg. ` np.pi_2 ` works, ` 2_np.pi ` doesn't.
46
49
47
50
### Example
48
51
@@ -57,7 +60,7 @@ static void Main(string[] args)
57
60
Console .WriteLine (sin (5 ));
58
61
double c = np .cos (5 ) + sin (5 );
59
62
Console .WriteLine (c );
60
- /* this block is temporarily disabled due to regression
63
+ /* this block is temporarily disabled due to regression #249
61
64
dynamic a = np.array(new List<float> { 1, 2, 3 });
62
65
dynamic b = np.array(new List<float> { 6, 5, 4 }, Py.kw("dtype", np.int32));
63
66
Console.WriteLine(a.dtype);
@@ -81,12 +84,16 @@ int32
81
84
82
85
[ appveyor shield ] : https://img.shields.io/appveyor/ci/pythonnet/pythonnet/master.svg?label=AppVeyor
83
86
84
- [ codecov shield ] : https://img.shields.io/codecov/c/github/pythonnet/pythonnet/master.svg?label=codecov
87
+ [ codecov shield ] : https://img.shields.io/codecov/c/github/pythonnet/pythonnet/master.svg?label=Codecov
85
88
86
89
[ license shield ] : https://img.shields.io/badge/license-MIT-blue.svg?maxAge=3600
87
90
88
91
[ pypi package version ] : https://img.shields.io/pypi/v/pythonnet.svg
89
92
90
93
[ python supported shield ] : https://img.shields.io/pypi/pyversions/pythonnet.svg
91
94
95
+ [ slack ] : https://img.shields.io/badge/chat-slack-color.svg?style=social
96
+
97
+ [ stackexchange shield ] : https://img.shields.io/badge/StackOverflow-python.net-blue.svg
98
+
92
99
[ travis shield ] : https://img.shields.io/travis/pythonnet/pythonnet/master.svg?label=Travis
0 commit comments