Skip to content

Commit 2b1d825

Browse files
patstewtonyroberts
authored andcommitted
Fix readme formatting.
1 parent eebe879 commit 2b1d825

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@ pythonnet
33

44
This fork of http://sourceforge.net/projects/pythonnet/ allows easy calling of python functions from C#.
55

6-
All calls to python should be inside a "using (Py.GIL()) {/* Your code here */}" block.
7-
Import python modules using dynamic mod = Py.Import("mod"), then you can call functions as normal, eg
8-
mod.func(args).
9-
Use mod.func(args, Py.kw("keywordargname", keywordargvalue)) to apply keyword arguments.
10-
All python objects should be declared as 'dynamic' type.
11-
Mathematical operations involving python and literal/managed types must have the python object first, eg np.pi*2 works, 2*np.pi doesn't.
6+
+ All calls to python should be inside a "using (Py.GIL()) {/* Your code here */}" block.
7+
+ Import python modules using dynamic mod = Py.Import("mod"), then you can call functions as normal, eg mod.func(args).
8+
+ Use mod.func(args, Py.kw("keywordargname", keywordargvalue)) to apply keyword arguments.
9+
+ All python objects should be declared as 'dynamic' type.
10+
+ Mathematical operations involving python and literal/managed types must have the python object first, eg np.pi*2 works, 2*np.pi doesn't
1211

1312
EG:
14-
13+
```csharp
1514
static void Main(string[] args)
1615
{
1716
using (Py.GIL()) {
@@ -28,12 +27,13 @@ static void Main(string[] args)
2827
Console.ReadKey();
2928
}
3029
}
31-
32-
which outputs:
33-
34-
1.0
30+
```
31+
outputs:
32+
```
33+
1.0
3534
-0.958924274663
3635
-0.6752620892
3736
float64
3837
int32
3938
[ 6. 10. 12.]
39+
```

0 commit comments

Comments
 (0)